mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
fix(route): jin10 vip title (#11817)
This commit is contained in:
@@ -27,14 +27,14 @@ module.exports = async (ctx) => {
|
||||
);
|
||||
|
||||
const item = data.map((item) => {
|
||||
const titleMatch = item.data.content.match(/【(.*?)】/);
|
||||
const titleMatch = item.data.content.match(/^【(.*?)】/);
|
||||
let title;
|
||||
let content = item.data.content;
|
||||
if (titleMatch) {
|
||||
title = titleMatch[1];
|
||||
content = content.replace(titleMatch[0], '');
|
||||
} else {
|
||||
title = item.data.content;
|
||||
title = item.data.vip_title || item.data.content;
|
||||
}
|
||||
|
||||
return {
|
||||
@@ -44,6 +44,7 @@ module.exports = async (ctx) => {
|
||||
pic: item.data.pic,
|
||||
}),
|
||||
pubDate: timezone(parseDate(item.time), 8),
|
||||
link: item.data.link,
|
||||
guid: `jin10:index:${item.id}`,
|
||||
important: item.important,
|
||||
};
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
{{@ content }}
|
||||
{{ if content }}{{@ content }}{{ /if }}
|
||||
{{ if pic }}<br><img src="{{ pic }}">{{ /if }}
|
||||
|
||||
Reference in New Issue
Block a user