fix: zaker some url 302 (#2559)
This commit is contained in:
@@ -43,14 +43,19 @@ module.exports = async (ctx) => {
|
||||
Referer: link,
|
||||
},
|
||||
});
|
||||
|
||||
const $ = cheerio.load(response.data);
|
||||
|
||||
$('img').each((index, elem) => {
|
||||
const $elem = $(elem);
|
||||
const src = $elem.attr('data-original');
|
||||
if (src && src !== '') {
|
||||
$elem.attr('src', `${src}`);
|
||||
}
|
||||
$elem.attr('referrerpolicy', 'no-referrer');
|
||||
});
|
||||
const description = $('div.article_content div')
|
||||
.html()
|
||||
.replace(/data-original/g, `src`);
|
||||
|
||||
const description = $('div.article_content div').html() || '原文已被删除';
|
||||
|
||||
const date = $('span.time').text();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user