mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
@@ -15,6 +15,14 @@ const ProcessFeed = async (list, cache) => {
|
||||
|
||||
const $ = cheerio.load(response.data);
|
||||
|
||||
const __INITIAL_STATE__ = Function(
|
||||
'let window={};' +
|
||||
$('*')
|
||||
.html()
|
||||
.match(/window\.__INITIAL_STATE__.*};/gm)[0] +
|
||||
'return window.__INITIAL_STATE__'
|
||||
)();
|
||||
|
||||
$('.article__content')
|
||||
.find('.lazyImg')
|
||||
.each((i, e) => {
|
||||
@@ -34,9 +42,8 @@ const ProcessFeed = async (list, cache) => {
|
||||
|
||||
let description = '';
|
||||
|
||||
const videoMatch = response.data.match(/"hd_link":"(.*)"/);
|
||||
if (videoMatch !== null) {
|
||||
description += `<video height="100%" controls="controls" src="${videoMatch[1].replace(/\\u002F/g, '/')}"></video>`;
|
||||
if ('video_info' in __INITIAL_STATE__.articleDetail.articleDetail) {
|
||||
description += `<video height="100%" cover="${__INITIAL_STATE__.articleDetail.articleDetail.video_info.cover}" controls src="${__INITIAL_STATE__.articleDetail.articleDetail.video_info.hd_link}"></video>`;
|
||||
}
|
||||
if ($('.top-img').html() !== null) {
|
||||
description += $('.top-img').html();
|
||||
|
||||
Reference in New Issue
Block a user