mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-10-29 18:06:31 +08:00
fix(route): 站酷发现有视频条目 (#8044)
This commit is contained in:
@@ -57,6 +57,7 @@ module.exports = async (ctx) => {
|
||||
}
|
||||
queries.limit = '20';
|
||||
queries.page = '1';
|
||||
|
||||
} else {
|
||||
switch (query) {
|
||||
case 'home':
|
||||
@@ -116,15 +117,16 @@ module.exports = async (ctx) => {
|
||||
|
||||
const videos = detailResponse.data.match(/source: '(https:\/\/video\.zcool\.cn\/.*)',/g);
|
||||
|
||||
let i = 0;
|
||||
content('.video-content-box').each(function () {
|
||||
if (i >= videos.length) {
|
||||
return;
|
||||
}
|
||||
content(this).append(`<video src="${videos[i++].match(/source: '(https:\/\/video\.zcool\.cn\/.*)'/)[1]}" controls="controls">`);
|
||||
});
|
||||
if (videos) {
|
||||
content('.video-content-box').each(function (i) {
|
||||
if (i >= videos.length) {
|
||||
return;
|
||||
}
|
||||
content(this).append(`<video src="${videos[i].match(/source: '(https:\/\/video\.zcool\.cn\/.*)'/)[1]}" controls="controls">`);
|
||||
});
|
||||
}
|
||||
|
||||
item.description = item.link.indexOf('article') < 0 ? content('.work-content-wrap').html() : content('.article-content-wraper').html();
|
||||
item.description = item.link.includes('article') ? content('.work-content-wrap').html() : content('.article-content-wraper').html();
|
||||
|
||||
return item;
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user