mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-05 04:11:26 +08:00
@@ -43,18 +43,18 @@ module.exports = async (ctx) => {
|
|||||||
|
|
||||||
const videos = [];
|
const videos = [];
|
||||||
|
|
||||||
content('.thread-video-wrap').each(function () {
|
content('.hupu-post-video').each(function () {
|
||||||
videos.push(content('video').attr('src'));
|
videos.push({
|
||||||
content(this).remove();
|
source: content(this).attr('src'),
|
||||||
|
poster: content(this).attr('poster'),
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
content('.bbs-user-info-time span').remove();
|
item.author = content('.bbs-user-wrapper-content-name-span').first().text();
|
||||||
|
item.pubDate = item.pubDate ?? timezone(parseRelativeDate(content('.second-line-user-info').first().text()), +8);
|
||||||
item.author = content('.bbs-user-info-name').first().text();
|
|
||||||
item.pubDate = item.pubDate ?? timezone(parseRelativeDate(content('.bbs-user-info-time').first().text()), +8);
|
|
||||||
item.description = art(path.join(__dirname, 'templates/description.art'), {
|
item.description = art(path.join(__dirname, 'templates/description.art'), {
|
||||||
videos,
|
videos,
|
||||||
description: content('.bbs-thread-content').html(),
|
description: content('.bbs-content').first().html(),
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// no-empty
|
// no-empty
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ module.exports = async (ctx) => {
|
|||||||
|
|
||||||
const result = detailResponse.data.result;
|
const result = detailResponse.data.result;
|
||||||
|
|
||||||
item.description = art(path.join(__dirname, 'templates/description.art'), {
|
item.description = art(path.join(__dirname, 'templates/match.art'), {
|
||||||
image: result.img,
|
image: result.img,
|
||||||
description: result.beginContent,
|
description: result.beginContent,
|
||||||
keyEvent: result.keyEvent,
|
keyEvent: result.keyEvent,
|
||||||
|
|||||||
@@ -1,22 +1,11 @@
|
|||||||
{{ if image }}
|
{{ if videos }}
|
||||||
<img src="{{ image }}">
|
{{ each videos video }}
|
||||||
|
<video poster= "video.poster" controls>
|
||||||
|
<source src="{{ video.source }}" type="video/mp4">
|
||||||
|
</video>
|
||||||
|
{{ /each }}
|
||||||
{{ /if }}
|
{{ /if }}
|
||||||
|
|
||||||
{{ if description }}
|
{{ if description }}
|
||||||
<p>{{ description }}</p>
|
{{@ description }}
|
||||||
{{ /if }}
|
|
||||||
|
|
||||||
{{ if keyEvent }}
|
|
||||||
<h1>关键事件</h1>
|
|
||||||
{{ each keyEvent event }}
|
|
||||||
<p>{{ event.title }}</p>
|
|
||||||
{{ each event.gifImgs gif }}
|
|
||||||
<img src="{{ gif }}">
|
|
||||||
{{ /each }}
|
|
||||||
{{ /each }}
|
|
||||||
{{ /if }}
|
|
||||||
|
|
||||||
{{ if playerImage }}
|
|
||||||
<h1>球员评分</h1>
|
|
||||||
<img src="{{ playerImage }}">
|
|
||||||
{{ /if }}
|
{{ /if }}
|
||||||
22
lib/v2/hupu/templates/match.art
Normal file
22
lib/v2/hupu/templates/match.art
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{{ if image }}
|
||||||
|
<img src="{{ image }}">
|
||||||
|
{{ /if }}
|
||||||
|
|
||||||
|
{{ if description }}
|
||||||
|
<p>{{ description }}</p>
|
||||||
|
{{ /if }}
|
||||||
|
|
||||||
|
{{ if keyEvent }}
|
||||||
|
<h1>关键事件</h1>
|
||||||
|
{{ each keyEvent event }}
|
||||||
|
<p>{{ event.title }}</p>
|
||||||
|
{{ each event.gifImgs gif }}
|
||||||
|
<img src="{{ gif }}">
|
||||||
|
{{ /each }}
|
||||||
|
{{ /each }}
|
||||||
|
{{ /if }}
|
||||||
|
|
||||||
|
{{ if playerImage }}
|
||||||
|
<h1>球员评分</h1>
|
||||||
|
<img src="{{ playerImage }}">
|
||||||
|
{{ /if }}
|
||||||
Reference in New Issue
Block a user