feat: 移除瘾科技无用 DOM (#5082)

This commit is contained in:
Henry Wang 2020-06-29 08:02:47 +01:00 committed by GitHub
parent c478d3813f
commit 455033b7fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -12,8 +12,10 @@ module.exports = async (ctx) => {
if (ctx.params.lang === 'us') {
$('div#engadget-article-footer').remove();
$('div#right-ads-rail').remove();
$('.t-meta.c-gray-3.mb-35').remove();
return $('div#page_body').html();
} else {
$('span#end-legacy-contents').remove();
$('#post-slideshow figcaption').remove();
$('#post-slideshow div.pagination button').remove();
$('#post-slideshow img.scrollview-image-embedded').each((i, el) => {
@ -36,10 +38,7 @@ module.exports = async (ctx) => {
return Promise.resolve(JSON.parse(cache));
}
const response = await got({
method: 'get',
url: item.link,
});
const response = await got.get(item.link);
const description = ProcessFeed(response.data);
const single = {