diff --git a/lib/routes/10000link/news.js b/lib/routes/10000link/news.js
index 470e345d5..dee7fb9b9 100644
--- a/lib/routes/10000link/news.js
+++ b/lib/routes/10000link/news.js
@@ -1,7 +1,6 @@
const got = require('@/utils/got');
const cheerio = require('cheerio');
const url = require('url');
-const { addNoReferrer } = require('@/utils/common-utils');
module.exports = async (ctx) => {
const category = ctx.params.category;
@@ -22,8 +21,6 @@ module.exports = async (ctx) => {
const $ = cheerio.load(response.data);
- addNoReferrer($, '#news_body');
-
return $('#news_body').html();
};
diff --git a/lib/routes/21caijing/channel.js b/lib/routes/21caijing/channel.js
index 36359e2b1..1700d029b 100644
--- a/lib/routes/21caijing/channel.js
+++ b/lib/routes/21caijing/channel.js
@@ -1,7 +1,6 @@
const got = require('@/utils/got');
const date = require('@/utils/date');
const cheerio = require('cheerio');
-const { addNoReferrer } = require('@/utils/common-utils');
module.exports = async (ctx) => {
const channel = ctx.params.name;
@@ -53,8 +52,6 @@ module.exports = async (ctx) => {
}
});
- addNoReferrer($, 'div.txtContent img', 'data-original');
-
const content = $('div.txtContent').html();
const single = {
diff --git a/lib/routes/8btc/author.js b/lib/routes/8btc/author.js
index 8f2915584..6c90ea4f0 100644
--- a/lib/routes/8btc/author.js
+++ b/lib/routes/8btc/author.js
@@ -1,6 +1,5 @@
const got = require('@/utils/got');
const cheerio = require('cheerio');
-const { addNoReferrer } = require('@/utils/common-utils');
module.exports = async (ctx) => {
const authorid = ctx.params.authorid;
@@ -9,7 +8,6 @@ module.exports = async (ctx) => {
const ProcessFeed = (data) => {
const $ = cheerio.load(data);
- addNoReferrer($, '.bbt-html');
// 提取内容
return $('.bbt-html').html();
};
diff --git a/lib/routes/archdaily/home.js b/lib/routes/archdaily/home.js
index 41c2fdcc6..0874e0d20 100644
--- a/lib/routes/archdaily/home.js
+++ b/lib/routes/archdaily/home.js
@@ -1,7 +1,6 @@
const got = require('@/utils/got');
const cheerio = require('cheerio');
const parser = require('@/utils/rss-parser');
-const { addNoReferrer } = require('@/utils/common-utils');
module.exports = async (ctx) => {
const feed = await parser.parseURL('https://feeds.feedburner.com/ArchdailyCN');
@@ -14,8 +13,6 @@ module.exports = async (ctx) => {
const $ = cheerio.load(response.data);
- addNoReferrer($, '#single-content');
-
// 提取内容
return $('#single-content').html();
};
diff --git a/lib/routes/bilibili/followings_article.js b/lib/routes/bilibili/followings_article.js
index ef01a72b6..7589ee208 100644
--- a/lib/routes/bilibili/followings_article.js
+++ b/lib/routes/bilibili/followings_article.js
@@ -2,7 +2,6 @@ const got = require('@/utils/got');
const cache = require('./cache');
const config = require('@/config');
const cheerio = require('cheerio');
-const { addNoReferrer } = require('@/utils/common-utils');
module.exports = async (ctx) => {
const uid = String(ctx.params.uid);
@@ -33,8 +32,6 @@ module.exports = async (ctx) => {
const $ = cheerio.load(result.data);
- addNoReferrer($, '.article-holder', 'data-src');
-
return $('.article-holder').html();
});
diff --git a/lib/routes/cfan/news.js b/lib/routes/cfan/news.js
index ffc532c2e..e96e96392 100644
--- a/lib/routes/cfan/news.js
+++ b/lib/routes/cfan/news.js
@@ -1,6 +1,5 @@
const got = require('@/utils/got');
const cheerio = require('cheerio');
-const { addNoReferrer } = require('@/utils/common-utils');
module.exports = async (ctx) => {
const pageUrl = 'http://www.cfan.com.cn/news/';
@@ -15,8 +14,6 @@ module.exports = async (ctx) => {
});
const $ = cheerio.load(response.data);
- addNoReferrer($, '.maincontent');
-
return $('.maincontent').html() || '文章已被删除';
};
diff --git a/lib/routes/cnbeta/home.js b/lib/routes/cnbeta/home.js
index ee732eea9..854c1b7dd 100644
--- a/lib/routes/cnbeta/home.js
+++ b/lib/routes/cnbeta/home.js
@@ -1,7 +1,6 @@
const got = require('@/utils/got');
const cheerio = require('cheerio');
const parser = require('@/utils/rss-parser');
-const { addNoReferrer } = require('@/utils/common-utils');
module.exports = async (ctx) => {
const feed = await parser.parseURL('https://rss.cnbeta.com/');
@@ -9,7 +8,6 @@ module.exports = async (ctx) => {
const ProcessFeed = (data) => {
const $ = cheerio.load(data);
- addNoReferrer($, '.article-content', 'data-original');
// 提取内容
return $('.article-summary p').html() + '
' + $('.article-content').html();
};
diff --git a/lib/routes/codeceo/category.js b/lib/routes/codeceo/category.js
index 46f9ae1ad..3ab379c75 100644
--- a/lib/routes/codeceo/category.js
+++ b/lib/routes/codeceo/category.js
@@ -1,7 +1,6 @@
const got = require('@/utils/got');
const cheerio = require('cheerio');
const parser = require('@/utils/rss-parser');
-const { addNoReferrer } = require('@/utils/common-utils');
module.exports = async (ctx) => {
const type = ctx.params.type || 'category';
@@ -16,8 +15,6 @@ module.exports = async (ctx) => {
const $ = cheerio.load(response.data);
- addNoReferrer($, '.article-entry');
-
$('.article-entry script').remove();
$('.article-entry .adsbygoogle')
.parent()
diff --git a/lib/routes/codeceo/home.js b/lib/routes/codeceo/home.js
index 20b88b2ee..40e69d3a7 100644
--- a/lib/routes/codeceo/home.js
+++ b/lib/routes/codeceo/home.js
@@ -1,7 +1,6 @@
const got = require('@/utils/got');
const cheerio = require('cheerio');
const parser = require('@/utils/rss-parser');
-const { addNoReferrer } = require('@/utils/common-utils');
module.exports = async (ctx) => {
const feed = await parser.parseURL('http://www.codeceo.com/feed');
@@ -14,8 +13,6 @@ module.exports = async (ctx) => {
const $ = cheerio.load(response.data);
- addNoReferrer($, '.article-entry');
-
$('.article-entry script').remove();
$('.article-entry .adsbygoogle')
.parent()
diff --git a/lib/routes/daxiaamu/home.js b/lib/routes/daxiaamu/home.js
index 68b9470ea..e8e701735 100644
--- a/lib/routes/daxiaamu/home.js
+++ b/lib/routes/daxiaamu/home.js
@@ -1,7 +1,6 @@
const got = require('@/utils/got');
const cheerio = require('cheerio');
const parser = require('@/utils/rss-parser');
-const { addNoReferrer } = require('@/utils/common-utils');
module.exports = async (ctx) => {
const feed = await parser.parseURL('http://www.daxiaamu.com/rss');
@@ -13,7 +12,6 @@ module.exports = async (ctx) => {
});
const $ = cheerio.load(response.data);
- addNoReferrer($, '.main-content');
return $('.main-content').html();
};
diff --git a/lib/routes/dockone/weekly.js b/lib/routes/dockone/weekly.js
index 55ab6db94..e39ac439f 100644
--- a/lib/routes/dockone/weekly.js
+++ b/lib/routes/dockone/weekly.js
@@ -1,6 +1,5 @@
const got = require('@/utils/got');
const cheerio = require('cheerio');
-const { addNoReferrer } = require('@/utils/common-utils');
module.exports = async (ctx) => {
const baseUrl = 'http://weekly.dockone.io';
@@ -19,8 +18,6 @@ module.exports = async (ctx) => {
const ProcessFeed = (data) => {
const $ = cheerio.load(data);
- addNoReferrer($, '.aw-question-detail .content');
-
// 提取内容
return $('.aw-question-detail .content').html();
};
diff --git a/lib/routes/gcores/category.js b/lib/routes/gcores/category.js
index ed820600f..62411d21a 100644
--- a/lib/routes/gcores/category.js
+++ b/lib/routes/gcores/category.js
@@ -1,6 +1,5 @@
const got = require('@/utils/got');
const cheerio = require('cheerio');
-const { addNoReferrer } = require('@/utils/common-utils');
module.exports = async (ctx) => {
const category = ctx.params.category;
@@ -44,8 +43,6 @@ module.exports = async (ctx) => {
const itemPage = itemRes.data;
$ = cheerio.load(itemPage);
- addNoReferrer($, '.story', 'data-original');
-
const cover = $('img.newsPage_cover');
const content = $('.story.story-show').html();
const single = {
diff --git a/lib/routes/indienova/article.js b/lib/routes/indienova/article.js
index 77410c6f3..ef8fd9db3 100644
--- a/lib/routes/indienova/article.js
+++ b/lib/routes/indienova/article.js
@@ -1,7 +1,6 @@
const got = require('@/utils/got');
const cheerio = require('cheerio');
const url = require('url');
-const { addNoReferrer } = require('@/utils/common-utils');
module.exports = async (ctx) => {
const type = ctx.params.type;
@@ -31,7 +30,6 @@ module.exports = async (ctx) => {
const $$$ = cheerio.load(resp.data);
- addNoReferrer($$$, '.indienova-single-post');
const description = $$$('.indienova-single-post').html();
const single = {
diff --git a/lib/routes/jianshu/utils.js b/lib/routes/jianshu/utils.js
index c0e6f0e81..63d8882b6 100644
--- a/lib/routes/jianshu/utils.js
+++ b/lib/routes/jianshu/utils.js
@@ -1,7 +1,6 @@
const got = require('@/utils/got');
const cheerio = require('cheerio');
const url = require('url');
-const { addNoReferrer } = require('@/utils/common-utils');
// 加载文章页
async function load(link) {
@@ -18,8 +17,6 @@ async function load(link) {
const serverOffset = date.getTimezoneOffset() / 60;
const pubDate = new Date(date.getTime() - 60 * 60 * 1000 * (timeZone + serverOffset)).toUTCString();
- addNoReferrer($, '.show-content-free', 'data-original-src', 'https:');
-
// 去除样式
$('.image-container, .image-container-fill').removeAttr('style');
// 处理视频
diff --git a/lib/routes/kkj/news.js b/lib/routes/kkj/news.js
index 1d23157ba..37a838766 100644
--- a/lib/routes/kkj/news.js
+++ b/lib/routes/kkj/news.js
@@ -1,7 +1,6 @@
const got = require('@/utils/got');
const cheerio = require('cheerio');
const parser = require('@/utils/rss-parser');
-const { addNoReferrer } = require('@/utils/common-utils');
module.exports = async (ctx) => {
const feed = await parser.parseURL('http://rss.mydrivers.com/rss.aspx?Tid=1');
@@ -9,8 +8,6 @@ module.exports = async (ctx) => {
const ProcessFeed = (data) => {
const $ = cheerio.load(data);
- addNoReferrer($, '.news_info', '', 'https:');
-
// 移除广告等内容
$('.news_info .weixin ~ div').remove();
$('.news_info .weixin').remove();
diff --git a/lib/routes/latexstudio/home.js b/lib/routes/latexstudio/home.js
index 11ba14c7d..067bc209e 100644
--- a/lib/routes/latexstudio/home.js
+++ b/lib/routes/latexstudio/home.js
@@ -1,6 +1,5 @@
const got = require('@/utils/got');
const cheerio = require('cheerio');
-const { addNoReferrer } = require('@/utils/common-utils');
module.exports = async (ctx) => {
const res = await got({
@@ -17,7 +16,6 @@ module.exports = async (ctx) => {
});
const $ = cheerio.load(detail.data);
$('.tac').remove();
- addNoReferrer($, '.article-content');
const author = $('.article-meta .item:last-child')
.text()
.replace('稿源:', '');
diff --git a/lib/routes/leetcode/articles.js b/lib/routes/leetcode/articles.js
index 377c65d6b..c169b4d89 100644
--- a/lib/routes/leetcode/articles.js
+++ b/lib/routes/leetcode/articles.js
@@ -1,7 +1,6 @@
const got = require('@/utils/got');
const cheerio = require('cheerio');
const url = require('url');
-const { addNoReferrer } = require('@/utils/common-utils');
const host = 'https://leetcode.com';
@@ -44,8 +43,6 @@ module.exports = async (ctx) => {
const response = await got.get(itemUrl);
const $ = cheerio.load(response.data);
- addNoReferrer($, '', 'src', itemUrl);
-
const description =
$('#question-preview')
.html()
diff --git a/lib/routes/meituan/tech/home.js b/lib/routes/meituan/tech/home.js
index d8790c813..441d9a268 100644
--- a/lib/routes/meituan/tech/home.js
+++ b/lib/routes/meituan/tech/home.js
@@ -1,7 +1,6 @@
const got = require('@/utils/got');
const cheerio = require('cheerio');
const parser = require('@/utils/rss-parser');
-const { addNoReferrer } = require('@/utils/common-utils');
module.exports = async (ctx) => {
const feed = await parser.parseURL('https://tech.meituan.com/feed/');
@@ -13,7 +12,6 @@ module.exports = async (ctx) => {
});
const $ = cheerio.load(response.data);
- addNoReferrer($, '.content');
return $('.content').html();
};
diff --git a/lib/routes/qdaily/index.js b/lib/routes/qdaily/index.js
index 93df07e1a..5ad4454c7 100644
--- a/lib/routes/qdaily/index.js
+++ b/lib/routes/qdaily/index.js
@@ -1,6 +1,5 @@
const cheerio = require('cheerio');
const got = require('@/utils/got');
-const { addNoReferrer } = require('@/utils/common-utils');
module.exports = async (ctx) => {
let type;
@@ -65,7 +64,6 @@ module.exports = async (ctx) => {
$('.article-detail-bd .author-share').remove();
$('.article-detail-ft').remove();
- addNoReferrer($, '.main .com-article-detail', 'data-src');
if (out[indexList[i]].link.match('/weeklies/')) {
out[indexList[i]].description = $('.packery-container').html();
} else {
diff --git a/lib/routes/sixthtone/news.js b/lib/routes/sixthtone/news.js
index cfd569c5b..da378de22 100644
--- a/lib/routes/sixthtone/news.js
+++ b/lib/routes/sixthtone/news.js
@@ -1,7 +1,6 @@
const got = require('@/utils/got');
const cheerio = require('cheerio');
const parser = require('@/utils/rss-parser');
-const { addNoReferrer } = require('@/utils/common-utils');
module.exports = async (ctx) => {
const feed = await parser.parseURL('https://www.sixthtone.com/rss');
@@ -12,8 +11,6 @@ module.exports = async (ctx) => {
// 移除广告等内容
$('[class*="advertise-"]').remove();
- addNoReferrer($, '.content');
-
// 提取内容
return $('.content').html();
};
diff --git a/lib/routes/tencent/wechat/miniprogram/plugins.js b/lib/routes/tencent/wechat/miniprogram/plugins.js
index fd6edbb02..ecf2c1b74 100644
--- a/lib/routes/tencent/wechat/miniprogram/plugins.js
+++ b/lib/routes/tencent/wechat/miniprogram/plugins.js
@@ -1,6 +1,5 @@
const got = require('@/utils/got');
const cheerio = require('cheerio');
-const { addNoReferrer } = require('@/utils/common-utils');
module.exports = async (ctx) => {
const link = 'https://developers.weixin.qq.com/community/plugins';
@@ -39,8 +38,6 @@ module.exports = async (ctx) => {
const id = 'x-rsshub';
const $ = cheerio.load(`