mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-05 12:21:31 +08:00
fix: remove new ads for ftchinese.com (#1587)
This commit is contained in:
@@ -27,7 +27,7 @@ const ProcessFeed = ($, link) => {
|
||||
author = author.trim();
|
||||
|
||||
// 去除头部主题, 头部重复标题, 冗余元数据, 植入广告, 植入 js, 社交分享按钮, 底部版权声明, 空白 DOM
|
||||
content.find('div.story-theme, h1.story-headline, div.story-byline, div.mpu-container-instory,script, div#story-action-placeholder, div.copyrightstatement-container, div.clearfloat').each((i, e) => {
|
||||
content.find('div.story-theme, h1.story-headline, div.story-byline, div.mpu-container-instory,script, div#story-action-placeholder, div.copyrightstatement-container, div.clearfloat, div.o-ads').each((i, e) => {
|
||||
$(e).remove();
|
||||
});
|
||||
content = content.html();
|
||||
@@ -57,10 +57,7 @@ const getData = async ({ site = 'www', channel }) => {
|
||||
|
||||
const items = await Promise.all(
|
||||
feed.items.splice(0, 10).map(async (item) => {
|
||||
const response = await axios({
|
||||
method: 'get',
|
||||
url: `${item.link}?full=y&archive`,
|
||||
});
|
||||
const response = await axios.get(`${item.link}?full=y&archive`);
|
||||
|
||||
const $ = cheerio.load(response.data);
|
||||
const result = ProcessFeed($, item.link);
|
||||
|
||||
Reference in New Issue
Block a user