mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-06 13:08:14 +08:00
fix: 龙腾网无内容 (#2054)
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
const axios = require('../../utils/axios'); // get web content
|
const axios = require('../../utils/axios'); // get web content
|
||||||
const cheerio = require('cheerio'); // html parser
|
const cheerio = require('cheerio'); // html parser
|
||||||
const iconv = require('iconv-lite');
|
|
||||||
|
|
||||||
const domain = 'http://www.ltaaa.com';
|
const domain = 'http://www.ltaaa.com';
|
||||||
|
|
||||||
@@ -15,7 +14,7 @@ module.exports = async function get_article(url) {
|
|||||||
responseType: 'arraybuffer',
|
responseType: 'arraybuffer',
|
||||||
});
|
});
|
||||||
const data = response.data;
|
const data = response.data;
|
||||||
const $ = cheerio.load(iconv.decode(data, 'CP936'));
|
const $ = cheerio.load(data);
|
||||||
|
|
||||||
const title = $('div.post-title > strong').text();
|
const title = $('div.post-title > strong').text();
|
||||||
const author = $('div.post-param > a').text();
|
const author = $('div.post-param > a').text();
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ module.exports = async (ctx) => {
|
|||||||
|
|
||||||
let a = $(target).find('a.rtitle');
|
let a = $(target).find('a.rtitle');
|
||||||
if (!a || a.length <= 0) {
|
if (!a || a.length <= 0) {
|
||||||
a = $(target).find('div.dtop > a');
|
a = $(target).find('div.li-title > a');
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let i = 0; i < a.length; ++i) {
|
for (let i = 0; i < a.length; ++i) {
|
||||||
|
|||||||
Reference in New Issue
Block a user