mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-19 06:38:55 +08:00
* style: prefer object shorthand syntax * refactor: prefer Array#map over Array#forEach * style: prefer arrow callback * chore(eslint): update rules * style: auto fix by eslint
29 lines
912 B
JavaScript
29 lines
912 B
JavaScript
const got = require('@/utils/got');
|
|
|
|
module.exports = async (ctx) => {
|
|
const link = `https://www.nosetime.com/perfume.php`;
|
|
|
|
const response = await got({
|
|
method: 'GET',
|
|
url: 'https://www.nosetime.com/app/smart.php?page=1&type=discovery',
|
|
headers: {
|
|
Referer: link,
|
|
},
|
|
});
|
|
|
|
const items = response.data.items.map((item) => ({
|
|
title: `${'★★★★★☆☆☆☆☆'.slice(5 - item.uwscore, 10 - item.uwscore)} ${item.ifullname}`,
|
|
description: item.udcontent,
|
|
pubDate: new Date(item.uface * 1000).toUTCString(),
|
|
link: `https://www.nosetime.com/xiangshui/${item.iid}-${item.iurl}.html`,
|
|
author: item.uname,
|
|
}));
|
|
|
|
ctx.state.data = {
|
|
title: `香水时代`,
|
|
link,
|
|
description: '最新香水评论|发现香水圈的新鲜事 - 香水时代NoseTime.com',
|
|
item: items,
|
|
};
|
|
};
|