fix: 少数派更新导致的无法抓取正文的bug (#3385)

This commit is contained in:
SunShinenny
2019-11-06 17:18:53 +08:00
committed by DIYgod
parent 3444697b40
commit fc8f8b7e3c
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ module.exports = async (ctx) => {
} else {
const response = await got({ method: 'get', url: link });
const $ = cheerio.load(response.data);
description = $('div.content.wangEditor-txt.clock').html();
description = $('#app > div.postPage.article-wrapper > div.article-detail > article > div.article-body').html();
ctx.cache.set(key, description);
}
+1 -1
View File
@@ -43,7 +43,7 @@ module.exports = async (ctx) => {
const response = await got.get(itemUrl);
const $ = cheerio.load(response.data);
const description = $('div.content.wangEditor-txt.clock').html();
const description = $('#app > div.postPage.article-wrapper > div.article-detail > article > div.article-body').html();
const single = {
title: title,
+1 -1
View File
@@ -21,7 +21,7 @@ module.exports = async (ctx) => {
} else {
const response = await got({ method: 'get', url: link });
const $ = cheerio.load(response.data);
description = $('div.content.wangEditor-txt.clock').html();
description = $('#app > div.postPage.article-wrapper > div.article-detail > article > div.article-body').html();
ctx.cache.set(key, description);
}
+1 -1
View File
@@ -30,7 +30,7 @@ module.exports = async (ctx) => {
}
const response = await got.get(itemUrl);
const $ = cheerio.load(response.data);
const description = $('div.content.wangEditor-txt.clock').html();
const description = $('#app > div.postPage.article-wrapper > div.article-detail > article > div.article-body').html();
const single = {
title: title,