mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-10-24 12:15:32 +08:00
fix: 孔夫子旧书网用户动态 (#5651)
This commit is contained in:
@@ -7,12 +7,33 @@ module.exports = async (ctx) => {
|
||||
url: userUrl,
|
||||
});
|
||||
|
||||
const list = response.data.result.feedList.map((item) => ({
|
||||
title: item.title || item.postTime,
|
||||
link: `https://t.kongfz.com/detail/${item.feedId}`,
|
||||
description: item.type === 'text' ? item.content : `<a href="https://t.kongfz.com/detail/${item.feedId}">商品上架</a>`,
|
||||
pubDate: new Date(item.postDateTime).toUTCString(),
|
||||
}));
|
||||
const list = response.data.result.feedList.map((item) => {
|
||||
let description;
|
||||
if (item.content === '件商品') {
|
||||
description = '<ul>';
|
||||
for (const i of item.itemList) {
|
||||
const link = i.defaultItem.linkUrl;
|
||||
const name = i.product.itemName;
|
||||
const author = i.product.author;
|
||||
const quality = i.product.quality;
|
||||
const price = i.product.price;
|
||||
const image = i.product.imgBig;
|
||||
description += `<li><ul><li><a href="${link}">${name}</a></li><li>作者:${author}</li><li>品相:${quality}</li><li>价格:${price}</li><li><img src="${image}"></li></ul></li>`;
|
||||
}
|
||||
description += '</ul>';
|
||||
} else {
|
||||
if (item.content === '转发动态') {
|
||||
item = item.itemList[0].feed;
|
||||
}
|
||||
description = item.content;
|
||||
}
|
||||
return {
|
||||
title: item.title || item.postTime,
|
||||
link: `https://t.kongfz.com/detail/${item.feedId}`,
|
||||
description,
|
||||
pubDate: new Date(item.postDateTime).toUTCString(),
|
||||
};
|
||||
});
|
||||
|
||||
const userInfo = response.data.result.userInfo;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user