mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
fix: hk01 null author (#3817)
This commit is contained in:
@@ -13,7 +13,7 @@ module.exports = async (ctx) => {
|
||||
link: data.category.publishUrl,
|
||||
item: list.map((item) => ({
|
||||
title: item.data.title,
|
||||
author: item.data.authors.map((e) => e.publishName).join(', '),
|
||||
author: item.data.authors && item.data.authors.map((e) => e.publishName).join(', '),
|
||||
description: `<p>${item.data.description}…</p><img style="width: 100%" src="${item.data.mainImage.cdnUrl}" />`,
|
||||
pubDate: new Date(item.data.lastModifyTime * 1000),
|
||||
link: item.data.canonicalUrl,
|
||||
|
||||
@@ -11,7 +11,7 @@ module.exports = async (ctx) => {
|
||||
link: data.meta.canonicalUrl,
|
||||
item: list.map((item) => ({
|
||||
title: item.data.title,
|
||||
author: item.data.authors.map((e) => e.publishName).join(', '),
|
||||
author: item.data.authors && item.data.authors.map((e) => e.publishName).join(', '),
|
||||
description: `<p>${item.data.description}</p><img style="width: 100%" src="${item.data.mainImage.cdnUrl}" />`,
|
||||
pubDate: new Date(item.data.lastModifyTime * 1000),
|
||||
link: item.data.canonicalUrl,
|
||||
|
||||
@@ -13,7 +13,7 @@ module.exports = async (ctx) => {
|
||||
link: data.issue.publishUrl,
|
||||
item: list.map((item) => ({
|
||||
title: item.data.title,
|
||||
author: item.data.authors.map((e) => e.publishName).join(', '),
|
||||
author: item.data.authors && item.data.authors.map((e) => e.publishName).join(', '),
|
||||
description: `<p>${item.data.description}…</p><img style="width: 100%" src="${item.data.mainImage.cdnUrl}" />`,
|
||||
pubDate: new Date(item.data.lastModifyTime * 1000),
|
||||
link: item.data.canonicalUrl,
|
||||
|
||||
@@ -13,7 +13,7 @@ module.exports = async (ctx) => {
|
||||
link: data.tag.publishUrl,
|
||||
item: list.map((item) => ({
|
||||
title: item.data.title,
|
||||
author: item.data.authors.map((e) => e.publishName).join(', '),
|
||||
author: item.data.authors && item.data.authors.map((e) => e.publishName).join(', '),
|
||||
description: `<p>${item.data.description}</p><img style="width: 100%" src="${item.data.mainImage.cdnUrl}" />`,
|
||||
pubDate: new Date(item.data.lastModifyTime * 1000),
|
||||
link: item.data.canonicalUrl,
|
||||
|
||||
@@ -17,7 +17,7 @@ module.exports = async (ctx) => {
|
||||
let pubDate;
|
||||
switch (item.type) {
|
||||
case 1:
|
||||
author = item.data.authors.map((e) => e.publishName).join(', ');
|
||||
author = item.data.authors && item.data.authors.map((e) => e.publishName).join(', ');
|
||||
description = `<p>${item.data.description}</p><img style="width: 100%" src="${item.data.mainImage.cdnUrl}" />`;
|
||||
pubDate = new Date(item.data.lastModifyTime * 1000);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user