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 = [];
|
||||
|
||||
content('.thread-video-wrap').each(function () {
|
||||
videos.push(content('video').attr('src'));
|
||||
content(this).remove();
|
||||
content('.hupu-post-video').each(function () {
|
||||
videos.push({
|
||||
source: content(this).attr('src'),
|
||||
poster: content(this).attr('poster'),
|
||||
});
|
||||
});
|
||||
|
||||
content('.bbs-user-info-time span').remove();
|
||||
|
||||
item.author = content('.bbs-user-info-name').first().text();
|
||||
item.pubDate = item.pubDate ?? timezone(parseRelativeDate(content('.bbs-user-info-time').first().text()), +8);
|
||||
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.description = art(path.join(__dirname, 'templates/description.art'), {
|
||||
videos,
|
||||
description: content('.bbs-thread-content').html(),
|
||||
description: content('.bbs-content').first().html(),
|
||||
});
|
||||
} catch (e) {
|
||||
// no-empty
|
||||
|
||||
@@ -60,7 +60,7 @@ module.exports = async (ctx) => {
|
||||
|
||||
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,
|
||||
description: result.beginContent,
|
||||
keyEvent: result.keyEvent,
|
||||
|
||||
@@ -1,22 +1,11 @@
|
||||
{{ if image }}
|
||||
<img src="{{ image }}">
|
||||
{{ if videos }}
|
||||
{{ each videos video }}
|
||||
<video poster= "video.poster" controls>
|
||||
<source src="{{ video.source }}" type="video/mp4">
|
||||
</video>
|
||||
{{ /each }}
|
||||
{{ /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 }}">
|
||||
{{@ description }}
|
||||
{{ /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