mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-07 05:36:08 +08:00
fix: leetcode article image path (#2823)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
const url = require('url');
|
||||
const { addNoReferrer } = require('@/utils/common-utils');
|
||||
|
||||
const host = 'https://leetcode.com';
|
||||
|
||||
@@ -42,6 +43,9 @@ module.exports = async (ctx) => {
|
||||
|
||||
const response = await got.get(itemUrl);
|
||||
const $ = cheerio.load(response.data);
|
||||
|
||||
addNoReferrer($, '', 'src', itemUrl);
|
||||
|
||||
const description =
|
||||
$('#question-preview')
|
||||
.html()
|
||||
|
||||
Reference in New Issue
Block a user