mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-10-13 00:35:19 +08:00
fix: handle 9to5 missing cover photo (#1544)
This commit is contained in:
@@ -4,6 +4,11 @@ const ProcessFeed = (data) => {
|
||||
const $ = cheerio.load(data);
|
||||
const content = $('div[itemprop="articleBody"]');
|
||||
|
||||
const cover = $('meta[property="og:image"]');
|
||||
if (cover.length > 0) {
|
||||
$(`<img src=${cover[0].attribs.content}>`).insertBefore(content[0].firstChild);
|
||||
}
|
||||
|
||||
// remove useless DOMs
|
||||
content
|
||||
.find('hr')
|
||||
|
||||
Reference in New Issue
Block a user