Authored by 郭成尧

rss-link-err-fixed

... ... @@ -33,10 +33,9 @@ const index = (req, res, next) => {
});
_.forEach(result, item => {
item.url = item.url.indexOf('http') >= 0 ? item.url : 'http://' + item.url;
feed.addItem({
title: item.title,
link: `${item.url}&ref=rss`,
link: `https://m.yohobuy.com/guang/${item.id}.html?ref=rss`,
description: item.intro,
author: [{
name: (item.author && item.author.name) || ' '
... ... @@ -60,7 +59,7 @@ const rss = (req, res, next, gmt) => {
return next();
}
_.forEach(result, item => {
item.url = item.url.indexOf('http') >= 0 ? item.url : 'http://' + item.url;
item.url = `https://m.yohobuy.com/guang/${item.id}.html?ref=rss`;
let time = new Date(item.publishTimeLong &&
parseFloat(item.publishTimeLong) || moment(item.publishTime, 'MM月DD日 HH:mm'));
let format = gmt ? 'ddd, MM MMM YYYY hh:mm:ss +0800' : 'YYYY-MM-DD hh:mm:ss +0800';
... ...
<?xml version='1.0' encoding='utf-8'?>
<rss version='2.0'>
<channel>
<language>zh-cn</language>
<language>zh-cn</language>
<title><![CDATA[有货逛]]></title>
<link><![CDATA[http://yohobuy.com]]></link>
<description><![CDATA[Yoho!Buy有货 | 年轻人潮流购物中心]]></description>
... ... @@ -17,13 +17,13 @@
{{# items}}
<item>
<title><![CDATA[{{title}}]]></title>
<link><![CDATA[{{{url}}}&ref=rss]]></link>
<link><![CDATA[{{{url}}}]]></link>
<description><![CDATA[{{{intro}}}]]></description>
<pubDate><![CDATA[{{publishTime}}]]></pubDate>
<source><![CDATA[有货逛]]></source>
<author>有货</author>
</item>
{{/items}}
</channel>
</rss>
\ No newline at end of file
</rss>
... ...