rsshub 1.0.0-master.fe4f650 → 1.0.0-master.fe560d2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/lib/config.js +1 -1
- package/lib/middleware/parameter.js +3 -3
- package/lib/radar-rules.js +0 -46
- package/lib/router.js +28 -28
- package/lib/routes/v2ex/post.js +3 -0
- package/lib/utils/puppeteer-utils.js +63 -0
- package/lib/utils/puppeteer.js +13 -8
- package/lib/utils/request-wrapper.js +38 -100
- package/lib/utils/unify-proxy.js +116 -0
- package/lib/utils/wechat-mp.js +2 -0
- package/lib/v2/18comic/utils.js +2 -2
- package/lib/v2/36kr/index.js +29 -24
- package/lib/v2/agora0/maintainer.js +1 -0
- package/lib/v2/agora0/pen0.js +43 -0
- package/lib/v2/agora0/radar.js +12 -1
- package/lib/v2/agora0/router.js +1 -0
- package/lib/v2/aiea/index.js +39 -0
- package/lib/v2/aiea/maintainer.js +3 -0
- package/lib/v2/aiea/radar.js +13 -0
- package/lib/v2/aiea/router.js +3 -0
- package/lib/v2/baidu/radar.js +6 -6
- package/lib/v2/bangumi/online/online.js +4 -2
- package/lib/v2/bangumi/tv/group/reply.js +13 -1
- package/lib/v2/bangumi/tv/group/topic.js +22 -9
- package/lib/v2/bilibili/cache.js +34 -1
- package/lib/v2/bilibili/userCollection.js +1 -2
- package/lib/v2/bilibili/utils.js +10 -0
- package/lib/v2/bilibili/video-all.js +5 -2
- package/lib/v2/bilibili/video.js +3 -1
- package/lib/v2/bytes/bytes.js +25 -0
- package/lib/v2/bytes/maintainer.js +4 -0
- package/lib/v2/bytes/radar.js +13 -0
- package/lib/v2/bytes/router.js +3 -0
- package/lib/v2/caijing/maintainer.js +3 -0
- package/lib/v2/caijing/radar.js +13 -0
- package/lib/v2/caijing/roll.js +46 -0
- package/lib/v2/caijing/router.js +3 -0
- package/lib/v2/cdzjryb/maintainer.js +3 -0
- package/lib/v2/cdzjryb/projectList.js +49 -0
- package/lib/v2/cdzjryb/radar.js +13 -0
- package/lib/v2/cdzjryb/router.js +3 -0
- package/lib/v2/cdzjryb/templates/projectList.art +23 -0
- package/lib/v2/chsi/kydt.js +51 -0
- package/lib/v2/chsi/maintainer.js +3 -0
- package/lib/v2/chsi/radar.js +13 -0
- package/lib/v2/chsi/router.js +3 -0
- package/lib/v2/cnbeta/radar.js +6 -6
- package/lib/v2/cnbeta/router.js +1 -1
- package/lib/v2/cnbeta/type.js +6 -12
- package/lib/v2/cnbeta/utils.js +5 -8
- package/lib/v2/cngal/entry.js +25 -0
- package/lib/v2/cngal/maintainer.js +4 -0
- package/lib/v2/cngal/radar.js +19 -0
- package/lib/v2/cngal/router.js +4 -0
- package/lib/v2/cngal/templates/entry-description.art +4 -0
- package/lib/v2/cngal/templates/weekly-description.art +4 -0
- package/lib/v2/cngal/weekly.js +20 -0
- package/lib/v2/cnki/author.js +45 -0
- package/lib/v2/cnki/journals.js +2 -23
- package/lib/v2/cnki/maintainer.js +1 -0
- package/lib/v2/cnki/radar.js +8 -0
- package/lib/v2/cnki/router.js +1 -0
- package/lib/v2/cnki/utils.js +26 -0
- package/lib/v2/codeforces/maintainer.js +1 -0
- package/lib/v2/codeforces/radar.js +8 -0
- package/lib/v2/codeforces/recent_actions.js +47 -0
- package/lib/v2/codeforces/router.js +1 -0
- package/lib/v2/curius/links.js +43 -0
- package/lib/v2/curius/maintainer.js +3 -0
- package/lib/v2/curius/radar.js +13 -0
- package/lib/v2/curius/router.js +3 -0
- package/lib/v2/curius/templates/description.art +16 -0
- package/lib/v2/douyin/hashtag.js +20 -19
- package/lib/v2/douyin/live.js +2 -21
- package/lib/v2/douyin/user.js +2 -17
- package/lib/v2/douyin/utils.js +85 -0
- package/lib/v2/{acm-ecnu → ecnu}/contest.js +1 -4
- package/lib/v2/ecnu/maintainer.js +4 -0
- package/lib/v2/ecnu/radar.js +30 -0
- package/lib/v2/ecnu/router.js +4 -0
- package/lib/v2/{acm-ecnu → ecnu}/templates/description.art +0 -0
- package/lib/v2/ecnu/yjs.js +37 -0
- package/lib/v2/ehentai/ehapi.js +23 -12
- package/lib/v2/foresightnews/index.js +8 -11
- package/lib/v2/foreverblog/feeds.js +36 -0
- package/lib/v2/foreverblog/maintainer.js +3 -0
- package/lib/v2/foreverblog/radar.js +13 -0
- package/lib/v2/foreverblog/router.js +3 -0
- package/lib/v2/freewechat/maintainer.js +3 -0
- package/lib/v2/freewechat/profile.js +61 -0
- package/lib/v2/freewechat/radar.js +13 -0
- package/lib/v2/freewechat/router.js +3 -0
- package/lib/v2/gcores/category.js +16 -6
- package/lib/v2/good/index.js +15 -14
- package/lib/v2/gov/customs/list.js +1 -1
- package/lib/v2/gov/dianbai/dianbai.js +18 -0
- package/lib/v2/gov/gaozhou/gaozhou.js +19 -0
- package/lib/v2/gov/general/general.js +250 -0
- package/lib/v2/gov/general/templates/zcjdpt.art +128 -0
- package/lib/v2/gov/gz/index.js +38 -0
- package/lib/v2/gov/huazhou/huazhou.js +19 -0
- package/lib/v2/gov/hunan/changsha/major-email.js +52 -0
- package/lib/v2/gov/maintainer.js +19 -2
- package/lib/v2/gov/maoming/maoming.js +417 -0
- package/lib/v2/gov/maonan/maonan.js +100 -0
- package/lib/v2/gov/mgs/mgs.js +19 -0
- package/lib/v2/gov/mmht/mmht.js +19 -0
- package/lib/v2/gov/nmpa/generic.js +1 -1
- package/lib/v2/gov/radar.js +197 -0
- package/lib/v2/gov/router.js +18 -2
- package/lib/v2/gov/sasac/generic.js +42 -0
- package/lib/v2/gov/sdb/sdb.js +19 -0
- package/lib/v2/gov/shanghai/yjj/index.js +3 -1
- package/lib/v2/gov/xinyi/xinyi.js +19 -0
- package/lib/v2/gov/zhengce/govall.js +55 -0
- package/lib/v2/gov/zhengce/wenjian.js +47 -0
- package/lib/v2/gov/zhengce/zhengceku.js +22 -0
- package/lib/v2/gov/zhengce/zuixin.js +39 -0
- package/lib/v2/guanhai/index.js +47 -0
- package/lib/v2/guanhai/maintainer.js +4 -0
- package/lib/v2/guanhai/radar.js +13 -0
- package/lib/v2/guanhai/router.js +3 -0
- package/lib/v2/hackernews/index.js +6 -0
- package/lib/v2/hellogithub/volume.js +15 -32
- package/lib/v2/{heu → hrbeu}/gx/card.js +5 -10
- package/lib/v2/{heu → hrbeu}/gx/list.js +12 -20
- package/lib/v2/hrbeu/job/bigemploy.js +25 -0
- package/lib/v2/{heu → hrbeu}/job/calendar.js +8 -16
- package/lib/v2/{heu → hrbeu}/job/list.js +11 -16
- package/lib/v2/{heu → hrbeu}/maintainer.js +2 -1
- package/lib/v2/{heu → hrbeu}/radar.js +18 -10
- package/lib/v2/{heu → hrbeu}/router.js +3 -2
- package/lib/v2/{heu → hrbeu}/uae/list.js +12 -17
- package/lib/v2/hrbeu/ugs/news.js +98 -0
- package/lib/v2/{heu → hrbeu}/yjsy/list.js +8 -16
- package/lib/v2/ieee-security/maintainer.js +3 -0
- package/lib/v2/ieee-security/radar.js +13 -0
- package/lib/v2/ieee-security/router.js +3 -0
- package/lib/v2/ieee-security/sp.js +36 -0
- package/lib/v2/javbus/index.js +8 -2
- package/lib/v2/javbus/templates/description.art +12 -1
- package/lib/v2/jike/user.js +1 -0
- package/lib/v2/lang/maintainer.js +3 -0
- package/lib/v2/lang/radar.js +13 -0
- package/lib/v2/lang/room.js +40 -0
- package/lib/v2/lang/router.js +3 -0
- package/lib/v2/lang/templates/room.art +1 -0
- package/lib/v2/liulinblog/utils.js +7 -4
- package/lib/v2/luogu/daily.js +1 -1
- package/lib/v2/mangadex/index.js +73 -0
- package/lib/v2/mangadex/maintainer.js +3 -0
- package/lib/v2/mangadex/radar.js +13 -0
- package/lib/v2/mangadex/router.js +3 -0
- package/lib/v2/mihoyo/ys/news.js +3 -2
- package/lib/v2/mirror/index.js +15 -8
- package/lib/v2/mrdx/daily.js +79 -0
- package/lib/v2/mrdx/maintainer.js +3 -0
- package/lib/v2/mrdx/radar.js +13 -0
- package/lib/v2/mrdx/router.js +3 -0
- package/lib/v2/mrdx/utils.js +17 -0
- package/lib/v2/mtime/news.js +1 -1
- package/lib/v2/nautil/maintainer.js +3 -0
- package/lib/v2/nautil/radar.js +13 -0
- package/lib/v2/nautil/router.js +3 -0
- package/lib/v2/nautil/templates/description.art +6 -0
- package/lib/v2/nautil/topics.js +57 -0
- package/lib/v2/ndss-symposium/maintainer.js +3 -0
- package/lib/v2/ndss-symposium/ndss.js +80 -0
- package/lib/v2/ndss-symposium/radar.js +13 -0
- package/lib/v2/ndss-symposium/router.js +3 -0
- package/lib/v2/nextapple/realtime.js +1 -1
- package/lib/v2/nintendo/direct.js +31 -0
- package/lib/v2/nintendo/eshop_cn.js +44 -0
- package/lib/v2/nintendo/eshop_hk.js +79 -0
- package/lib/v2/nintendo/eshop_jp.js +34 -0
- package/lib/v2/nintendo/eshop_us.js +32 -0
- package/lib/v2/nintendo/maintainer.js +7 -0
- package/lib/v2/nintendo/news.js +23 -0
- package/lib/v2/nintendo/news_china.js +35 -0
- package/lib/v2/nintendo/radar.js +70 -0
- package/lib/v2/nintendo/router.js +10 -0
- package/lib/{routes → v2}/nintendo/system-update.js +2 -2
- package/lib/v2/nintendo/templates/direct.art +6 -0
- package/lib/v2/nintendo/templates/eshop_cn.art +21 -0
- package/lib/v2/nintendo/templates/eshop_hk.art +61 -0
- package/lib/v2/nintendo/templates/eshop_jp.art +3 -0
- package/lib/v2/nintendo/templates/eshop_us.art +24 -0
- package/lib/{routes → v2}/nintendo/utils.js +34 -50
- package/lib/v2/njxzc/home.js +13 -9
- package/lib/v2/nmtv/column.js +53 -0
- package/lib/v2/nmtv/maintainer.js +3 -0
- package/lib/v2/nmtv/radar.js +13 -0
- package/lib/v2/nmtv/router.js +3 -0
- package/lib/v2/nmtv/templates/description.art +9 -0
- package/lib/v2/nua/lib.js +39 -0
- package/lib/v2/nua/maintainer.js +1 -0
- package/lib/v2/nua/radar.js +8 -0
- package/lib/v2/nua/router.js +1 -0
- package/lib/v2/nua/utils.js +7 -12
- package/lib/v2/nuaa/utils/pypasswaf.js +3 -2
- package/lib/v2/nyaa/main.js +16 -23
- package/lib/v2/nyaa/maintainer.js +7 -4
- package/lib/v2/nyaa/radar.js +27 -29
- package/lib/v2/nyaa/router.js +4 -2
- package/lib/v2/odaily/post.js +15 -20
- package/lib/v2/odaily/utils.js +1 -1
- package/lib/v2/paradigm/maintainer.js +3 -0
- package/lib/v2/paradigm/radar.js +13 -0
- package/lib/v2/paradigm/router.js +3 -0
- package/lib/v2/paradigm/writing.js +44 -0
- package/lib/v2/picuki/maintainer.js +1 -1
- package/lib/v2/picuki/profile.js +10 -8
- package/lib/v2/picuki/utils.js +21 -0
- package/lib/v2/pixiv/api/getRanking.js +1 -1
- package/lib/v2/pixiv/ranking.js +3 -0
- package/lib/v2/producthunt/templates/descImg.art +2 -2
- package/lib/v2/qlu/maintainer.js +3 -0
- package/lib/v2/qlu/notice.js +54 -0
- package/lib/v2/qlu/radar.js +13 -0
- package/lib/v2/qlu/router.js +3 -0
- package/lib/v2/reactnewsletter/maintainer.js +4 -0
- package/lib/v2/reactnewsletter/radar.js +13 -0
- package/lib/v2/reactnewsletter/reactnewsletter.js +25 -0
- package/lib/v2/reactnewsletter/router.js +3 -0
- package/lib/v2/researchgate/maintainer.js +3 -0
- package/lib/v2/researchgate/publications.js +70 -0
- package/lib/v2/researchgate/radar.js +13 -0
- package/lib/v2/researchgate/router.js +3 -0
- package/lib/v2/saraba1st/digest.js +79 -0
- package/lib/v2/saraba1st/maintainer.js +1 -0
- package/lib/v2/saraba1st/radar.js +12 -3
- package/lib/v2/saraba1st/router.js +1 -0
- package/lib/v2/saraba1st/templates/digest.art +5 -0
- package/lib/v2/sctv/maintainer.js +1 -1
- package/lib/v2/sctv/programme.js +39 -17
- package/lib/v2/sctv/router.js +1 -1
- package/lib/v2/shmtu/jwc.js +57 -0
- package/lib/v2/shmtu/maintainer.js +5 -0
- package/lib/v2/shmtu/portal.js +81 -0
- package/lib/v2/shmtu/radar.js +29 -0
- package/lib/v2/shmtu/router.js +5 -0
- package/lib/v2/shmtu/templates/portal.art +30 -0
- package/lib/v2/shmtu/www.js +58 -0
- package/lib/v2/sigsac/ccs.js +57 -0
- package/lib/v2/sigsac/maintainer.js +3 -0
- package/lib/v2/sigsac/radar.js +13 -0
- package/lib/v2/sigsac/router.js +3 -0
- package/lib/v2/simpleinfo/index.js +50 -0
- package/lib/v2/simpleinfo/maintainer.js +3 -0
- package/lib/v2/simpleinfo/radar.js +19 -0
- package/lib/v2/simpleinfo/router.js +3 -0
- package/lib/v2/simpleinfo/templates/description.art +6 -0
- package/lib/v2/sse/maintainer.js +1 -1
- package/lib/v2/telegram/channel.js +54 -38
- package/lib/v2/tencent/maintainer.js +2 -0
- package/lib/v2/tencent/news/coronavirus/data.js +71 -0
- package/lib/v2/tencent/news/coronavirus/total.js +34 -0
- package/lib/v2/tencent/news/coronavirus/utils.js +17 -0
- package/lib/v2/tencent/radar.js +8 -0
- package/lib/v2/tencent/router.js +2 -0
- package/lib/v2/tencent/templates/coronavirus/chinaTotal.art +6 -0
- package/lib/v2/tencent/templates/coronavirus/data.art +4 -0
- package/lib/v2/test/index.js +8 -0
- package/lib/v2/theverge/index.js +9 -1
- package/lib/v2/theverge/maintainer.js +1 -1
- package/lib/v2/theverge/radar.js +2 -2
- package/lib/v2/theverge/router.js +1 -1
- package/lib/v2/tingshuitz/changsha.js +43 -0
- package/lib/v2/tingshuitz/maintainer.js +1 -0
- package/lib/v2/tingshuitz/radar.js +10 -0
- package/lib/v2/tingshuitz/router.js +1 -0
- package/lib/v2/twitter/web-api/twitter-api.js +19 -15
- package/lib/v2/twreporter/category.js +17 -8
- package/lib/v2/uber/blog.js +59 -0
- package/lib/v2/uber/maintainer.js +3 -0
- package/lib/v2/uber/radar.js +13 -0
- package/lib/v2/uber/router.js +3 -0
- package/lib/v2/usenix/maintainer.js +3 -0
- package/lib/v2/usenix/radar.js +13 -0
- package/lib/v2/usenix/router.js +3 -0
- package/lib/v2/usenix/usenix.js +63 -0
- package/lib/v2/usepanda/index.js +26 -0
- package/lib/v2/usepanda/maintainer.js +3 -0
- package/lib/v2/usepanda/radar.js +11 -0
- package/lib/v2/usepanda/router.js +3 -0
- package/lib/v2/uw/gix/news.js +67 -0
- package/lib/v2/uw/maintainer.js +3 -0
- package/lib/v2/uw/radar.js +13 -0
- package/lib/v2/uw/router.js +3 -0
- package/lib/v2/verse/articles.js +42 -0
- package/lib/v2/verse/maintainer.js +3 -0
- package/lib/v2/verse/radar.js +13 -0
- package/lib/v2/verse/router.js +3 -0
- package/lib/{routes → v2}/weibo/keyword.js +2 -2
- package/lib/v2/weibo/maintainer.js +8 -0
- package/lib/v2/weibo/oasis/user.js +20 -0
- package/lib/v2/weibo/radar.js +48 -0
- package/lib/v2/weibo/router.js +8 -0
- package/lib/{routes → v2}/weibo/search/hot.js +2 -0
- package/lib/{routes → v2}/weibo/super_index.js +2 -2
- package/lib/{routes → v2}/weibo/timeline.js +2 -2
- package/lib/{routes → v2}/weibo/user.js +2 -2
- package/lib/{routes → v2}/weibo/utils.js +49 -14
- package/lib/v2/ymgal/article.js +61 -0
- package/lib/v2/ymgal/game.js +41 -0
- package/lib/v2/ymgal/maintainer.js +4 -0
- package/lib/v2/ymgal/radar.js +31 -0
- package/lib/v2/ymgal/router.js +4 -0
- package/lib/v2/ymgal/templates/description.art +7 -0
- package/lib/v2/zhihu/pin/utils.js +49 -41
- package/package.json +26 -27
- package/lib/routes/blogs/foreverblog.js +0 -33
- package/lib/routes/gov/zhengce/govall.js +0 -59
- package/lib/routes/gov/zhengce/wenjian.js +0 -53
- package/lib/routes/gov/zhengce/zuixin.js +0 -42
- package/lib/routes/langlive/room.js +0 -33
- package/lib/routes/nautilus/topics.js +0 -45
- package/lib/routes/nintendo/direct.js +0 -34
- package/lib/routes/nintendo/eshop_cn.js +0 -51
- package/lib/routes/nintendo/eshop_hk.js +0 -26
- package/lib/routes/nintendo/eshop_jp.js +0 -20
- package/lib/routes/nintendo/eshop_us.js +0 -36
- package/lib/routes/nintendo/news.js +0 -25
- package/lib/routes/nintendo/news_china.js +0 -41
- package/lib/routes/researchgate/publications.js +0 -60
- package/lib/routes/universities/ecnuyjs/ecnuyjs.js +0 -23
- package/lib/routes/universities/shmtu/jwc.js +0 -75
- package/lib/routes/universities/shmtu/www.js +0 -61
- package/lib/routes/weibo/oasis/user.js +0 -17
- package/lib/v2/acm-ecnu/maintainer.js +0 -3
- package/lib/v2/acm-ecnu/radar.js +0 -19
- package/lib/v2/acm-ecnu/router.js +0 -3
- package/lib/v2/cnbeta/index.js +0 -16
- package/lib/v2/heu/job/bigemploy.js +0 -42
|
@@ -1,5 +1,47 @@
|
|
|
1
1
|
const { parseDate } = require('@/utils/parse-date');
|
|
2
2
|
|
|
3
|
+
const generateDescription = (target, init) =>
|
|
4
|
+
target.content.reduce((description, item) => {
|
|
5
|
+
switch (item.type) {
|
|
6
|
+
case 'text':
|
|
7
|
+
description += `<div>${item.content}</div>`;
|
|
8
|
+
break;
|
|
9
|
+
|
|
10
|
+
case 'image':
|
|
11
|
+
description += `<img src="${item.url.replace(/_.+\.jpg/g, '.jpg')}" />`;
|
|
12
|
+
break;
|
|
13
|
+
|
|
14
|
+
case 'video':
|
|
15
|
+
try {
|
|
16
|
+
description += `<video
|
|
17
|
+
controls="controls"
|
|
18
|
+
width="${item.playlist.hd.width}"
|
|
19
|
+
height="${item.playlist.hd.height}"
|
|
20
|
+
poster="${item.cover_info.thumbnail}"
|
|
21
|
+
src="${item.playlist.hd.play_url}"
|
|
22
|
+
>`;
|
|
23
|
+
} catch (e) {
|
|
24
|
+
description += `<video
|
|
25
|
+
controls="controls"
|
|
26
|
+
width="${item.playlist.pop().width}"
|
|
27
|
+
height="${item.playlist.pop().height}"
|
|
28
|
+
poster="${item.thumbnail}"
|
|
29
|
+
src="${item.playlist.pop().play_url}"
|
|
30
|
+
>`;
|
|
31
|
+
}
|
|
32
|
+
break;
|
|
33
|
+
|
|
34
|
+
case 'link':
|
|
35
|
+
description += `<div><a href="${item.url}">${item.title}</a><br><img src="${item.image_url}" /></div>`;
|
|
36
|
+
break;
|
|
37
|
+
|
|
38
|
+
default:
|
|
39
|
+
description += '未知类型,请点击<a href="https://github.com/DIYgod/RSSHub/issues">链接</a>提交issue';
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return description;
|
|
43
|
+
}, init);
|
|
44
|
+
|
|
3
45
|
module.exports = {
|
|
4
46
|
generateData: (data) =>
|
|
5
47
|
data.map((item) => {
|
|
@@ -8,47 +50,13 @@ module.exports = {
|
|
|
8
50
|
const author = target.author.name;
|
|
9
51
|
const title = `${author}:${target.excerpt_title}`;
|
|
10
52
|
const link = `https://www.zhihu.com/pin/${target.id}`;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
description += `<img src="${item.url.replace(/_.+\.jpg/g, '.jpg')}" />`;
|
|
19
|
-
break;
|
|
20
|
-
|
|
21
|
-
case 'video':
|
|
22
|
-
try {
|
|
23
|
-
description += `<video
|
|
24
|
-
controls="controls"
|
|
25
|
-
width="${item.playlist.hd.width}"
|
|
26
|
-
height="${item.playlist.hd.height}"
|
|
27
|
-
poster="${item.cover_info.thumbnail}"
|
|
28
|
-
src="${item.playlist.hd.play_url}"
|
|
29
|
-
>`;
|
|
30
|
-
} catch (e) {
|
|
31
|
-
description += `<video
|
|
32
|
-
controls="controls"
|
|
33
|
-
width="${item.playlist.pop().width}"
|
|
34
|
-
height="${item.playlist.pop().height}"
|
|
35
|
-
poster="${item.thumbnail}"
|
|
36
|
-
src="${item.playlist.pop().play_url}"
|
|
37
|
-
>`;
|
|
38
|
-
}
|
|
39
|
-
break;
|
|
40
|
-
|
|
41
|
-
case 'link':
|
|
42
|
-
description += `<div><a href="${item.url}">${item.title}</a><br><img src="${item.image_url}" /></div>`;
|
|
43
|
-
break;
|
|
44
|
-
|
|
45
|
-
default:
|
|
46
|
-
description += '未知类型,请点击<a href="https://github.com/DIYgod/RSSHub/issues">链接</a>提交issue';
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
return description;
|
|
50
|
-
}, `<a href="https://www.zhihu.com${target.author.url}">${author}</a>:`);
|
|
51
|
-
|
|
53
|
+
let description = generateDescription(target, `<a href="https://www.zhihu.com${target.author.url}">${author}</a>:`);
|
|
54
|
+
if (target.origin_pin !== undefined) {
|
|
55
|
+
const t = target.origin_pin;
|
|
56
|
+
const origin_link = `<a href="https://www.zhihu.com/pin/${t.id}">转发原文</a>:`;
|
|
57
|
+
const origin_description = generateDescription(t, `<a href="https://www.zhihu.com${t.author.url}">${t.author.name}</a>:`);
|
|
58
|
+
description = `${description} ${origin_link} ${origin_description}`;
|
|
59
|
+
}
|
|
52
60
|
return {
|
|
53
61
|
title,
|
|
54
62
|
description,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rsshub",
|
|
3
|
-
"version": "1.0.0-master.
|
|
3
|
+
"version": "1.0.0-master.fe560d2",
|
|
4
4
|
"description": "Make RSS Great Again!",
|
|
5
5
|
"main": "lib/pkg.js",
|
|
6
6
|
"files": [
|
|
@@ -50,24 +50,24 @@
|
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@napi-rs/pinyin": "1.7.1",
|
|
52
52
|
"@types/koa": "2.13.5",
|
|
53
|
-
"@vercel/nft": "0.22.
|
|
53
|
+
"@vercel/nft": "0.22.6",
|
|
54
54
|
"@vuepress/plugin-back-to-top": "1.9.7",
|
|
55
55
|
"@vuepress/plugin-google-analytics": "1.9.7",
|
|
56
56
|
"@vuepress/plugin-pwa": "1.9.7",
|
|
57
57
|
"@vuepress/shared-utils": "1.9.7",
|
|
58
58
|
"cross-env": "7.0.3",
|
|
59
|
-
"eslint": "8.
|
|
59
|
+
"eslint": "8.30.0",
|
|
60
60
|
"eslint-config-prettier": "8.5.0",
|
|
61
61
|
"eslint-plugin-prettier": "4.2.1",
|
|
62
|
-
"eslint-plugin-yml": "1.
|
|
63
|
-
"fs-extra": "
|
|
64
|
-
"jest": "29.
|
|
65
|
-
"jest-junit": "
|
|
66
|
-
"meilisearch": "0.
|
|
62
|
+
"eslint-plugin-yml": "1.4.0",
|
|
63
|
+
"fs-extra": "11.1.0",
|
|
64
|
+
"jest": "29.3.1",
|
|
65
|
+
"jest-junit": "15.0.0",
|
|
66
|
+
"meilisearch": "0.30.0",
|
|
67
67
|
"mockdate": "3.0.5",
|
|
68
68
|
"nock": "13.2.9",
|
|
69
69
|
"nodemon": "2.0.20",
|
|
70
|
-
"prettier": "2.
|
|
70
|
+
"prettier": "2.8.1",
|
|
71
71
|
"prettier-check": "2.0.0",
|
|
72
72
|
"pretty-quick": "3.1.3",
|
|
73
73
|
"remark": "13.0.0",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"request-promise-native": "1.0.9",
|
|
81
81
|
"staged-git-files": "1.3.0",
|
|
82
82
|
"string-width": "4.2.3",
|
|
83
|
-
"supertest": "6.3.
|
|
83
|
+
"supertest": "6.3.3",
|
|
84
84
|
"tosource": "2.0.0-alpha.3",
|
|
85
85
|
"unified": "9.2.2",
|
|
86
86
|
"vuepress": "1.9.7",
|
|
@@ -91,52 +91,52 @@
|
|
|
91
91
|
"dependencies": {
|
|
92
92
|
"@koa/router": "12.0.0",
|
|
93
93
|
"@postlight/parser": "2.2.3",
|
|
94
|
-
"@sentry/node": "7.
|
|
94
|
+
"@sentry/node": "7.28.1",
|
|
95
95
|
"aes-js": "3.1.2",
|
|
96
96
|
"art-template": "4.13.2",
|
|
97
97
|
"bbcodejs": "0.0.4",
|
|
98
98
|
"cheerio": "1.0.0-rc.12",
|
|
99
|
-
"chrono-node": "2.
|
|
99
|
+
"chrono-node": "2.5.0",
|
|
100
100
|
"city-timezones": "1.2.1",
|
|
101
101
|
"crypto-js": "4.1.1",
|
|
102
102
|
"currency-symbol-map": "5.1.0",
|
|
103
|
-
"dayjs": "1.11.
|
|
103
|
+
"dayjs": "1.11.7",
|
|
104
104
|
"dotenv": "16.0.3",
|
|
105
105
|
"emailjs-imap-client": "3.1.0",
|
|
106
106
|
"entities": "3.0.1",
|
|
107
107
|
"etag": "1.8.1",
|
|
108
108
|
"fanfou-sdk": "4.2.0",
|
|
109
109
|
"git-rev-sync": "3.0.2",
|
|
110
|
-
"googleapis": "
|
|
111
|
-
"got": "11.8.
|
|
110
|
+
"googleapis": "110.0.0",
|
|
111
|
+
"got": "11.8.6",
|
|
112
112
|
"https-proxy-agent": "5.0.1",
|
|
113
113
|
"iconv-lite": "0.6.3",
|
|
114
114
|
"instagram-private-api": "1.45.3",
|
|
115
|
-
"ioredis": "5.2.
|
|
115
|
+
"ioredis": "5.2.4",
|
|
116
116
|
"ip-regex": "4.3.0",
|
|
117
117
|
"is-localhost-ip": "2.0.0",
|
|
118
|
-
"jsdom": "20.0.
|
|
118
|
+
"jsdom": "20.0.3",
|
|
119
119
|
"json-bigint": "1.0.0",
|
|
120
|
-
"json5": "2.2.
|
|
121
|
-
"koa": "2.
|
|
120
|
+
"json5": "2.2.2",
|
|
121
|
+
"koa": "2.14.1",
|
|
122
122
|
"koa-basic-auth": "4.0.0",
|
|
123
123
|
"koa-favicon": "2.1.0",
|
|
124
124
|
"koa-mount": "4.0.0",
|
|
125
|
-
"lru-cache": "7.14.
|
|
125
|
+
"lru-cache": "7.14.1",
|
|
126
126
|
"lz-string": "1.4.4",
|
|
127
|
-
"mailparser": "3.
|
|
127
|
+
"mailparser": "3.6.3",
|
|
128
128
|
"markdown-it": "13.0.1",
|
|
129
129
|
"module-alias": "2.2.2",
|
|
130
130
|
"parse-torrent": "9.1.5",
|
|
131
131
|
"pidusage": "3.0.2",
|
|
132
132
|
"plist": "3.0.6",
|
|
133
133
|
"proxy-chain": "2.2.0",
|
|
134
|
-
"puppeteer": "19.
|
|
134
|
+
"puppeteer": "19.4.1",
|
|
135
135
|
"puppeteer-extra": "3.3.4",
|
|
136
136
|
"puppeteer-extra-plugin-stealth": "2.11.1",
|
|
137
|
-
"query-string": "7.1.
|
|
138
|
-
"rand-user-agent": "1.0.
|
|
139
|
-
"re2": "1.
|
|
137
|
+
"query-string": "7.1.3",
|
|
138
|
+
"rand-user-agent": "1.0.96",
|
|
139
|
+
"re2": "1.18.0",
|
|
140
140
|
"require-all": "3.0.0",
|
|
141
141
|
"rss-parser": "3.12.0",
|
|
142
142
|
"showdown": "2.1.0",
|
|
@@ -146,8 +146,7 @@
|
|
|
146
146
|
"tiny-async-pool": "2.1.0",
|
|
147
147
|
"torrent-search-api": "2.1.4",
|
|
148
148
|
"tough-cookie": "4.1.2",
|
|
149
|
-
"
|
|
150
|
-
"twitter-api-v2": "1.12.9",
|
|
149
|
+
"twitter-api-v2": "1.13.0",
|
|
151
150
|
"winston": "3.8.2",
|
|
152
151
|
"xml2js": "0.4.23"
|
|
153
152
|
},
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
const got = require('@/utils/got');
|
|
2
|
-
const cheerio = require('cheerio');
|
|
3
|
-
|
|
4
|
-
module.exports = async (ctx) => {
|
|
5
|
-
const response = await got({
|
|
6
|
-
method: 'get',
|
|
7
|
-
url: 'https://www.foreverblog.cn/feeds.html',
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
const data = response.data;
|
|
11
|
-
|
|
12
|
-
const $ = cheerio.load(data);
|
|
13
|
-
const list = $('article[class="post post-type-normal"]');
|
|
14
|
-
|
|
15
|
-
ctx.state.data = {
|
|
16
|
-
title: '十年之约 - 订阅',
|
|
17
|
-
link: 'https://www.foreverblog.cn/feeds.html',
|
|
18
|
-
language: 'zh-cn',
|
|
19
|
-
item:
|
|
20
|
-
list &&
|
|
21
|
-
list
|
|
22
|
-
.map((index, item) => {
|
|
23
|
-
item = $(item);
|
|
24
|
-
return {
|
|
25
|
-
title: item.find('a.post-title-link>span').text(),
|
|
26
|
-
description: item.find('div.post-author').text(),
|
|
27
|
-
link: item.find('a.post-title-link').attr('href'),
|
|
28
|
-
pubDate: item.find('time.post-time').text(),
|
|
29
|
-
};
|
|
30
|
-
})
|
|
31
|
-
.get(),
|
|
32
|
-
};
|
|
33
|
-
};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
const got = require('@/utils/got');
|
|
2
|
-
const cheerio = require('cheerio');
|
|
3
|
-
|
|
4
|
-
module.exports = async (ctx) => {
|
|
5
|
-
const { advance } = ctx.params;
|
|
6
|
-
const link = `http://sousuo.gov.cn/list.htm`;
|
|
7
|
-
const params = new URLSearchParams({
|
|
8
|
-
n: 20,
|
|
9
|
-
t: 'govall',
|
|
10
|
-
sort: 'pubtime',
|
|
11
|
-
advance: 'true',
|
|
12
|
-
});
|
|
13
|
-
const query = `${params.toString()}&${advance}`;
|
|
14
|
-
const res = await got.get(link, {
|
|
15
|
-
searchParams: query.replace(/([\u4e00-\u9fa5])/g, (str) => encodeURIComponent(str)),
|
|
16
|
-
});
|
|
17
|
-
const $list = cheerio.load(res.data);
|
|
18
|
-
|
|
19
|
-
ctx.state.data = {
|
|
20
|
-
title: `信息稿件 - 中国政府网`,
|
|
21
|
-
link: `${link}?${query}`,
|
|
22
|
-
item: await Promise.all(
|
|
23
|
-
$list('body > div.dataBox > table > tbody > tr')
|
|
24
|
-
.slice(1)
|
|
25
|
-
.map(async (_, el) => {
|
|
26
|
-
const item = $list(el);
|
|
27
|
-
|
|
28
|
-
const number = item.find('td.info').next();
|
|
29
|
-
const title = item.find('td.info > a');
|
|
30
|
-
const href = title.attr('href');
|
|
31
|
-
|
|
32
|
-
const key = `gov_zhengce: ${href}`;
|
|
33
|
-
let description;
|
|
34
|
-
const value = await ctx.cache.get(key);
|
|
35
|
-
|
|
36
|
-
if (value) {
|
|
37
|
-
description = value;
|
|
38
|
-
} else {
|
|
39
|
-
try {
|
|
40
|
-
const contentData = await got.get(href);
|
|
41
|
-
const $content = cheerio.load(contentData.data);
|
|
42
|
-
description = $content('#UCAP-CONTENT').html();
|
|
43
|
-
} catch (error) {
|
|
44
|
-
description = '文章已被删除';
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
ctx.cache.set(key, description);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
return {
|
|
51
|
-
title: number.text() + ' | ' + title.text(),
|
|
52
|
-
description,
|
|
53
|
-
link: href,
|
|
54
|
-
};
|
|
55
|
-
})
|
|
56
|
-
.get()
|
|
57
|
-
),
|
|
58
|
-
};
|
|
59
|
-
};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
const got = require('@/utils/got');
|
|
2
|
-
const cheerio = require('cheerio');
|
|
3
|
-
const queryString = require('query-string');
|
|
4
|
-
|
|
5
|
-
module.exports = async (ctx) => {
|
|
6
|
-
const { pcodeJiguan } = ctx.params;
|
|
7
|
-
const link = `http://sousuo.gov.cn/list.htm`;
|
|
8
|
-
const res = await got.get(link, {
|
|
9
|
-
searchParams: queryString.stringify({
|
|
10
|
-
n: 20,
|
|
11
|
-
sort: 'pubtime',
|
|
12
|
-
t: 'paper',
|
|
13
|
-
pcodeJiguan: pcodeJiguan ? pcodeJiguan : '',
|
|
14
|
-
}),
|
|
15
|
-
});
|
|
16
|
-
const $list = cheerio.load(res.data);
|
|
17
|
-
|
|
18
|
-
ctx.state.data = {
|
|
19
|
-
title: `最新文件 - 中国政府网`,
|
|
20
|
-
link,
|
|
21
|
-
item: await Promise.all(
|
|
22
|
-
$list('body > div.dataBox > table > tbody > tr')
|
|
23
|
-
.slice(1)
|
|
24
|
-
.map(async (_, el) => {
|
|
25
|
-
const item = $list(el);
|
|
26
|
-
|
|
27
|
-
const number = item.find('td.info').next();
|
|
28
|
-
const title = item.find('td.info > a');
|
|
29
|
-
const href = title.attr('href');
|
|
30
|
-
|
|
31
|
-
const key = `gov_zhengce: ${href}`;
|
|
32
|
-
let description;
|
|
33
|
-
const value = await ctx.cache.get(key);
|
|
34
|
-
|
|
35
|
-
if (value) {
|
|
36
|
-
description = value;
|
|
37
|
-
} else {
|
|
38
|
-
const contentData = await got.get(href);
|
|
39
|
-
const $content = cheerio.load(contentData.data);
|
|
40
|
-
description = $content('#UCAP-CONTENT').html();
|
|
41
|
-
ctx.cache.set(key, description);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
return {
|
|
45
|
-
title: number.text() + ' | ' + title.text(),
|
|
46
|
-
description,
|
|
47
|
-
link: href,
|
|
48
|
-
};
|
|
49
|
-
})
|
|
50
|
-
.get()
|
|
51
|
-
),
|
|
52
|
-
};
|
|
53
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
const got = require('@/utils/got');
|
|
2
|
-
const cheerio = require('cheerio');
|
|
3
|
-
|
|
4
|
-
module.exports = async (ctx) => {
|
|
5
|
-
const link = `http://www.gov.cn/zhengce/zuixin.htm`;
|
|
6
|
-
const listData = await got.get(link);
|
|
7
|
-
const $list = cheerio.load(listData.data);
|
|
8
|
-
ctx.state.data = {
|
|
9
|
-
title: `最新政策 - 中国政府网`,
|
|
10
|
-
link,
|
|
11
|
-
item: await Promise.all(
|
|
12
|
-
$list('.news_box .list li:not(.line)')
|
|
13
|
-
.map(async (_, el) => {
|
|
14
|
-
const $el = $list(el);
|
|
15
|
-
const $a = $el.find('h4 a');
|
|
16
|
-
const href = $a.attr('href');
|
|
17
|
-
const link = href.startsWith('/zhengce') ? `http://www.gov.cn${href}` : href;
|
|
18
|
-
const key = `gov_zhengce_zuixin: ${link}`;
|
|
19
|
-
let description;
|
|
20
|
-
const value = await ctx.cache.get(key);
|
|
21
|
-
|
|
22
|
-
if (value) {
|
|
23
|
-
description = value;
|
|
24
|
-
} else {
|
|
25
|
-
const contentData = await got.get(link);
|
|
26
|
-
const $content = cheerio.load(contentData.data);
|
|
27
|
-
description = $content('#UCAP-CONTENT').html();
|
|
28
|
-
ctx.cache.set(key, description);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
return {
|
|
32
|
-
title: $a.text(),
|
|
33
|
-
description,
|
|
34
|
-
guid: href,
|
|
35
|
-
link,
|
|
36
|
-
pubDate: new Date($el.find('.date').text()).toUTCString(),
|
|
37
|
-
};
|
|
38
|
-
})
|
|
39
|
-
.get()
|
|
40
|
-
),
|
|
41
|
-
};
|
|
42
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
const got = require('@/utils/got');
|
|
2
|
-
|
|
3
|
-
module.exports = async (ctx) => {
|
|
4
|
-
const id = ctx.params.id;
|
|
5
|
-
const url = `https://play.lang.live/${id}`;
|
|
6
|
-
|
|
7
|
-
const api = `https://game-api.lang.live/webapi/v1/room/info?room_id=${id}`;
|
|
8
|
-
const response = await got({
|
|
9
|
-
method: 'get',
|
|
10
|
-
url: api,
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
let item = [];
|
|
14
|
-
let name = '';
|
|
15
|
-
if (response.data.data.live_info.live_status === 1) {
|
|
16
|
-
name = response.data.data.live_info.nickname;
|
|
17
|
-
item = [
|
|
18
|
-
{
|
|
19
|
-
title: response.data.data.live_info.nickname + '开播了',
|
|
20
|
-
link: url,
|
|
21
|
-
guid: response.data.data.live_info.live_id,
|
|
22
|
-
description: response.data.data.live_info.describe,
|
|
23
|
-
},
|
|
24
|
-
];
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
ctx.state.data = {
|
|
28
|
-
title: `${name}的浪Play直播`,
|
|
29
|
-
link: url,
|
|
30
|
-
item,
|
|
31
|
-
allowEmpty: true,
|
|
32
|
-
};
|
|
33
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
const cheerio = require('cheerio');
|
|
2
|
-
const got = require('@/utils/got');
|
|
3
|
-
|
|
4
|
-
module.exports = async (ctx) => {
|
|
5
|
-
const url = `http://nautil.us/term/f/${ctx.params.tid}`;
|
|
6
|
-
|
|
7
|
-
const res = await got.get(url);
|
|
8
|
-
const $ = cheerio.load(res.data);
|
|
9
|
-
const list = $('article.search-result').get();
|
|
10
|
-
|
|
11
|
-
const out = await Promise.all(
|
|
12
|
-
list.map(async (item) => {
|
|
13
|
-
const $ = cheerio.load(item);
|
|
14
|
-
const title = $('h3 > a').text();
|
|
15
|
-
const partial = $('h3 > a').attr('href');
|
|
16
|
-
const address = `http://nautil.us${partial}`;
|
|
17
|
-
const cache = await ctx.cache.get(address);
|
|
18
|
-
if (cache) {
|
|
19
|
-
return Promise.resolve(JSON.parse(cache));
|
|
20
|
-
}
|
|
21
|
-
const res = await got.get(address);
|
|
22
|
-
const capture = cheerio.load(res.data);
|
|
23
|
-
capture('div.reco').remove();
|
|
24
|
-
const banner = capture('div.banner').html();
|
|
25
|
-
const textWithTime = capture('div.byline').text();
|
|
26
|
-
const author = capture('div.byline > span:nth-child(2)').text();
|
|
27
|
-
const contents = banner + capture('div.page-content').html();
|
|
28
|
-
const single = {
|
|
29
|
-
title,
|
|
30
|
-
author,
|
|
31
|
-
description: contents,
|
|
32
|
-
link: address,
|
|
33
|
-
guid: address,
|
|
34
|
-
pubDate: new Date(textWithTime).toUTCString(),
|
|
35
|
-
};
|
|
36
|
-
ctx.cache.set(address, JSON.stringify(single));
|
|
37
|
-
return Promise.resolve(single);
|
|
38
|
-
})
|
|
39
|
-
);
|
|
40
|
-
ctx.state.data = {
|
|
41
|
-
title: 'Nautilus | ' + $('title').text(),
|
|
42
|
-
link: url,
|
|
43
|
-
item: out,
|
|
44
|
-
};
|
|
45
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
const got = require('@/utils/got');
|
|
2
|
-
const cheerio = require('cheerio');
|
|
3
|
-
|
|
4
|
-
module.exports = async (ctx) => {
|
|
5
|
-
const response = await got({
|
|
6
|
-
method: 'get',
|
|
7
|
-
url: 'https://www.nintendo.com/nintendo-direct/archive/',
|
|
8
|
-
});
|
|
9
|
-
const data = response.data;
|
|
10
|
-
|
|
11
|
-
const $ = cheerio.load(data);
|
|
12
|
-
const list = $('.news-tiles li').get().slice(0, 9);
|
|
13
|
-
|
|
14
|
-
const result = list.map((item) => {
|
|
15
|
-
const $ = cheerio.load(item);
|
|
16
|
-
return {
|
|
17
|
-
title: $('.b7').html(),
|
|
18
|
-
cover: $('img ').attr('src').replace('../', 'https://www.nintendo.com/nintendo-direct/'),
|
|
19
|
-
des: $('p').html(),
|
|
20
|
-
url: $('a').attr('href').replace('../', 'https://www.nintendo.com/nintendo-direct/'),
|
|
21
|
-
};
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
ctx.state.data = {
|
|
25
|
-
title: `Nintendo Direct (任天堂直面会)`,
|
|
26
|
-
link: `https://www.nintendo.com/nintendo-direct/archive/`,
|
|
27
|
-
description: `最新的任天堂直面会日程信息`,
|
|
28
|
-
item: result.map((item) => ({
|
|
29
|
-
title: item.title,
|
|
30
|
-
description: `<img src="${item.cover}" /><br>${item.des}`,
|
|
31
|
-
link: item.url,
|
|
32
|
-
})),
|
|
33
|
-
};
|
|
34
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
const got = require('@/utils/got');
|
|
2
|
-
const util = require('./utils');
|
|
3
|
-
const software_url = 'https://www.nintendoswitch.com.cn/software/';
|
|
4
|
-
|
|
5
|
-
module.exports = async (ctx) => {
|
|
6
|
-
const response = await got({
|
|
7
|
-
method: 'get',
|
|
8
|
-
url: software_url,
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
// 获取Nuxt对象
|
|
12
|
-
const result = await util.nuxtReader(response.data);
|
|
13
|
-
|
|
14
|
-
/* expectedReleaseNS[]
|
|
15
|
-
coverImageUrl: "//switch-cn.gtgres.com/global-images/c50e3390-14e5-11ea-9b40-236e671bca9e.png"
|
|
16
|
-
expectedReleaseDate: 0
|
|
17
|
-
expectedReleaseDateFuzzy: ""
|
|
18
|
-
gameName: "Mario Tennis Aces"
|
|
19
|
-
id: 1852
|
|
20
|
-
newsPageUrl: ""
|
|
21
|
-
softwareData[]
|
|
22
|
-
gameProductCode: "HAC-P-ADALB"
|
|
23
|
-
image: "//switch-cn.gtgres.com/global-images/c247f0e0-1654-11ea-9b40-236e671bca9e.png"
|
|
24
|
-
name: "新 超级马力欧兄弟U 豪华版"
|
|
25
|
-
nsUid: "70010000027088"
|
|
26
|
-
publisher: "任天堂"
|
|
27
|
-
releaseDatetime: 1575907200000
|
|
28
|
-
softcardType: (2)[]
|
|
29
|
-
*/
|
|
30
|
-
if (!result.softwareData) {
|
|
31
|
-
throw new Error('软件信息不存在,请报告这个问题');
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
let data = result.softwareData.map((item) => ({
|
|
35
|
-
title: item.name,
|
|
36
|
-
author: item.publisher,
|
|
37
|
-
description: util.generateImageLink(`https${item.image}`),
|
|
38
|
-
category: item.softcardType,
|
|
39
|
-
link: `${software_url}${item.nsUid}`,
|
|
40
|
-
pubDate: new Date(parseInt(item.releaseTime)).toUTCString(),
|
|
41
|
-
}));
|
|
42
|
-
|
|
43
|
-
data = await util.ProcessItemChina(data, ctx.cache);
|
|
44
|
-
|
|
45
|
-
ctx.state.data = {
|
|
46
|
-
title: `Nintendo eShop (国服) 新游戏`,
|
|
47
|
-
link: `https://www.nintendo.com.hk/topics`,
|
|
48
|
-
description: `Nintendo (国服) 新上架的游戏`,
|
|
49
|
-
item: data,
|
|
50
|
-
};
|
|
51
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
const got = require('@/utils/got');
|
|
2
|
-
const util = require('./utils');
|
|
3
|
-
|
|
4
|
-
module.exports = async (ctx) => {
|
|
5
|
-
const response = await got({
|
|
6
|
-
method: 'get',
|
|
7
|
-
url: 'https://www.nintendo.com.hk/data/json/switch_software.json',
|
|
8
|
-
});
|
|
9
|
-
const data = response.data.slice(0, 9).filter(({ link }) => link.startsWith('https://'));
|
|
10
|
-
|
|
11
|
-
// 获取游戏描述
|
|
12
|
-
const result = await util.ProcessItem(data, ctx.cache);
|
|
13
|
-
|
|
14
|
-
ctx.state.data = {
|
|
15
|
-
title: `Nintendo eShop (港服) 新游戏`,
|
|
16
|
-
link: `https://www.nintendo.com.hk/software/switch/index.html`,
|
|
17
|
-
description: `Nintendo eShop (港服) 新上架的游戏`,
|
|
18
|
-
item: result.map((item) => ({
|
|
19
|
-
title: item.title,
|
|
20
|
-
description: `<img src="https://www.nintendo.com.hk/software/img/bnr/${item.thumb_img}"><br><strong>发售日期:</strong>${item.release_date}<br><strong>价格:</strong>${item.price}港币<br><strong>支持中文:</strong>${
|
|
21
|
-
item.lang === 'CN' ? '是' : '否'
|
|
22
|
-
}<br><strong>发行商:</strong>${item.maker_publisher}<br>${item.content}`,
|
|
23
|
-
link: item.link,
|
|
24
|
-
})),
|
|
25
|
-
};
|
|
26
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
const got = require('@/utils/got');
|
|
2
|
-
|
|
3
|
-
module.exports = async (ctx) => {
|
|
4
|
-
const response = await got({
|
|
5
|
-
method: 'get',
|
|
6
|
-
url: `https://search.nintendo.jp/nintendo_soft/search.json?opt_sshow=1&fq=ssitu_s%3Aonsale%20OR%20ssitu_s%3Apreorder%20OR%20memo_bg%3Aforced&limit=24&page=1&c=50310840317994813&opt_osale=1&opt_hard=1_HAC&sort=sodate%20desc%2Cscore`,
|
|
7
|
-
});
|
|
8
|
-
const data = response.data.result.items.slice(0, 9);
|
|
9
|
-
|
|
10
|
-
ctx.state.data = {
|
|
11
|
-
title: `Nintendo eShop (日服) 新游戏`,
|
|
12
|
-
link: `https://www.nintendo.co.jp/software/switch/index.html`,
|
|
13
|
-
description: `Nintendo eShop (日服) 新上架的游戏`,
|
|
14
|
-
item: data.map((item) => ({
|
|
15
|
-
title: item.title,
|
|
16
|
-
description: `<img src="https://img-eshop.cdn.nintendo.net/i/${item.iurl}.jpg"><br><strong>发售日期:</strong>${item.pdate}<br><strong>价格:</strong>${item.dprice}円`,
|
|
17
|
-
link: `https://ec.nintendo.com/JP/ja/titles/${item.id}`,
|
|
18
|
-
})),
|
|
19
|
-
};
|
|
20
|
-
};
|