rsshub 1.0.0-master.cb996d3 → 1.0.0-master.cbe111a
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/lib/router.js +21 -24
- package/lib/utils/wechat-mp.js +1 -0
- package/lib/v2/8world/index.js +8 -8
- package/lib/v2/8world/maintainer.js +1 -0
- package/lib/v2/8world/radar.js +6 -0
- package/lib/v2/8world/router.js +1 -1
- package/lib/v2/aljazeera/index.js +87 -0
- package/lib/v2/aljazeera/maintainer.js +5 -0
- package/lib/v2/aljazeera/radar.js +62 -0
- package/lib/v2/aljazeera/router.js +3 -0
- package/lib/v2/aljazeera/templates/description.art +8 -0
- package/lib/v2/anquanke/category.js +21 -7
- package/lib/v2/anquanke/maintainer.js +1 -1
- package/lib/v2/anquanke/router.js +1 -1
- package/lib/v2/baidu/tieba/forum.js +1 -1
- package/lib/v2/bilibili/cache.js +30 -7
- package/lib/v2/bilibili/video-all.js +26 -8
- package/lib/v2/bilibili/video.js +9 -3
- package/lib/v2/cnbc/maintainer.js +3 -0
- package/lib/v2/cnbc/radar.js +21 -0
- package/lib/v2/cnbc/router.js +3 -0
- package/lib/v2/cnbc/rss.js +54 -0
- package/lib/{routes → v2}/coolapk/dyh.js +2 -6
- package/lib/{routes → v2}/coolapk/hot.js +1 -3
- package/lib/{routes → v2}/coolapk/huati.js +1 -3
- package/lib/v2/coolapk/maintainer.js +9 -0
- package/lib/v2/coolapk/radar.js +31 -0
- package/lib/v2/coolapk/router.js +9 -0
- package/lib/{routes → v2}/coolapk/toutiao.js +1 -3
- package/lib/{routes → v2}/coolapk/tuwen.js +2 -4
- package/lib/{routes → v2}/coolapk/userDynamic.js +1 -3
- package/lib/{routes → v2}/coolapk/utils.js +7 -9
- package/lib/v2/creative-comic/book.js +60 -0
- package/lib/v2/creative-comic/maintainer.js +3 -0
- package/lib/v2/creative-comic/radar.js +13 -0
- package/lib/v2/creative-comic/router.js +3 -0
- package/lib/v2/creative-comic/templates/chapter.art +11 -0
- package/lib/v2/creative-comic/utils.js +96 -0
- package/lib/v2/cw/master.js +4 -1
- package/lib/v2/cw/sub.js +4 -1
- package/lib/v2/cw/today.js +4 -1
- package/lib/v2/cw/utils.js +14 -2
- package/lib/{routes → v2}/dedao/index.js +11 -8
- package/lib/v2/dedao/knowledge.js +64 -0
- package/lib/{routes → v2}/dedao/list.js +16 -10
- package/lib/v2/dedao/maintainer.js +8 -0
- package/lib/v2/dedao/radar.js +50 -0
- package/lib/v2/dedao/router.js +6 -0
- package/lib/v2/dedao/templates/knowledge.art +29 -0
- package/lib/v2/dedao/templates/user.art +38 -0
- package/lib/v2/dedao/user.js +79 -0
- package/lib/v2/docschina/jsweekly.js +114 -0
- package/lib/v2/docschina/maintainer.js +3 -0
- package/lib/v2/docschina/radar.js +13 -0
- package/lib/v2/docschina/router.js +3 -0
- package/lib/v2/ft/maintainer.js +2 -2
- package/lib/v2/ft/utils.js +10 -7
- package/lib/v2/good/index.js +52 -0
- package/lib/v2/good/maintainer.js +3 -0
- package/lib/v2/good/radar.js +13 -0
- package/lib/v2/good/router.js +3 -0
- package/lib/v2/gov/beijing/bphc/index.js +54 -0
- package/lib/v2/gov/ccdi/utils.js +33 -9
- package/lib/v2/gov/maintainer.js +1 -0
- package/lib/v2/gov/radar.js +11 -0
- package/lib/v2/gov/router.js +1 -0
- package/lib/v2/hackernews/index.js +10 -7
- package/lib/v2/hellogithub/index.js +102 -0
- package/lib/v2/hellogithub/maintainer.js +7 -3
- package/lib/v2/hellogithub/radar.js +35 -11
- package/lib/v2/hellogithub/report.js +56 -0
- package/lib/v2/hellogithub/router.js +6 -3
- package/lib/v2/hellogithub/templates/description.art +99 -0
- package/lib/v2/hellogithub/templates/report.art +118 -0
- package/lib/v2/hellogithub/templates/volume.art +36 -0
- package/lib/v2/hellogithub/volume.js +66 -0
- package/lib/v2/hupu/all.js +8 -8
- package/lib/v2/hupu/bbs.js +1 -1
- package/lib/v2/hupu/templates/description.art +7 -18
- package/lib/v2/hupu/templates/match.art +22 -0
- package/lib/v2/ifeng/maintainer.js +1 -0
- package/lib/v2/ifeng/news.js +54 -0
- package/lib/v2/ifeng/radar.js +7 -0
- package/lib/v2/ifeng/router.js +1 -0
- package/lib/v2/ifeng/templates/description.art +16 -0
- package/lib/v2/jandan/index.js +17 -51
- package/lib/v2/jandan/maintainer.js +1 -1
- package/lib/v2/lianxh/index.js +61 -0
- package/lib/v2/lianxh/maintainer.js +3 -0
- package/lib/v2/lianxh/radar.js +13 -0
- package/lib/v2/lianxh/router.js +3 -0
- package/lib/{routes → v2}/linkresearcher/index.js +16 -13
- package/lib/v2/linkresearcher/maintainer.js +3 -0
- package/lib/v2/linkresearcher/radar.js +19 -0
- package/lib/v2/linkresearcher/router.js +3 -0
- package/lib/v2/lkong/forum.js +3 -2
- package/lib/v2/lofter/user.js +6 -1
- package/lib/v2/luogu/contest.js +72 -0
- package/lib/v2/luogu/daily.js +33 -0
- package/lib/v2/luogu/maintainer.js +5 -0
- package/lib/v2/luogu/radar.js +25 -0
- package/lib/v2/luogu/router.js +5 -0
- package/lib/v2/luogu/userFeed.js +30 -0
- package/lib/v2/mckinsey/cn/categoryMap.js +79 -0
- package/lib/v2/mckinsey/cn/index.js +37 -0
- package/lib/v2/mckinsey/radar.js +14 -0
- package/lib/v2/mckinsey/router.js +3 -0
- package/lib/v2/nua/dc.js +14 -4
- package/lib/v2/nua/gra.js +1 -1
- package/lib/v2/nua/index.js +1 -1
- package/lib/v2/nua/sxw.js +1 -1
- package/lib/v2/nua/utils.js +41 -21
- package/lib/v2/picuki/profile.js +14 -2
- package/lib/v2/picuki/templates/video.art +3 -0
- package/lib/v2/qipamaijia/index.js +7 -1
- package/lib/v2/qipamaijia/maintainer.js +1 -1
- package/lib/v2/radio/album.js +106 -0
- package/lib/v2/radio/index.js +25 -18
- package/lib/v2/radio/maintainer.js +2 -0
- package/lib/v2/radio/radar.js +15 -3
- package/lib/v2/radio/router.js +2 -0
- package/lib/v2/radio/templates/description.art +7 -4
- package/lib/v2/radio/zhibo.js +73 -0
- package/lib/v2/reuters/common.js +21 -8
- package/lib/v2/reuters/investigates.js +1 -1
- package/lib/v2/reuters/templates/description.art +44 -0
- package/lib/v2/swpu/cjxy.js +53 -0
- package/lib/v2/swpu/is.js +53 -0
- package/lib/v2/swpu/maintainer.js +2 -0
- package/lib/v2/swpu/radar.js +12 -0
- package/lib/v2/swpu/router.js +2 -0
- package/lib/v2/taoguba/blog.js +28 -3
- package/lib/v2/taoguba/index.js +29 -14
- package/lib/v2/theverge/index.js +90 -0
- package/lib/v2/theverge/maintainer.js +3 -0
- package/lib/v2/theverge/radar.js +13 -0
- package/lib/v2/theverge/router.js +3 -0
- package/lib/v2/udn/global/index.js +67 -0
- package/lib/v2/udn/global/tag.js +51 -0
- package/lib/v2/udn/maintainer.js +2 -0
- package/lib/v2/udn/radar.js +15 -1
- package/lib/v2/udn/router.js +2 -0
- package/lib/v2/wallstreetcn/live.js +7 -1
- package/lib/v2/wallstreetcn/templates/description.art +11 -0
- package/lib/v2/wise/maintainer.js +3 -0
- package/lib/v2/wise/pair.js +65 -0
- package/lib/v2/wise/radar.js +11 -0
- package/lib/v2/wise/router.js +3 -0
- package/lib/v2/wise/templates/description.art +17 -0
- package/lib/v2/xueqiu/maintainer.js +1 -0
- package/lib/v2/xueqiu/radar.js +6 -0
- package/lib/v2/xueqiu/router.js +1 -0
- package/lib/v2/xueqiu/today.js +65 -0
- package/lib/v2/yoasobi-music/info.js +2 -1
- package/lib/v2/zhihu/activities.js +6 -10
- package/lib/v2/zhihu/daily.js +25 -0
- package/lib/v2/zhihu/execlib/x-zse-96_v3.js +122 -0
- package/lib/v2/zhihu/utils.js +1 -1
- package/lib/v2/zhitongcaijing/index.js +118 -0
- package/lib/v2/zhitongcaijing/maintainer.js +3 -0
- package/lib/v2/zhitongcaijing/radar.js +17 -0
- package/lib/v2/zhitongcaijing/router.js +3 -0
- package/lib/v2/zhitongcaijing/templates/description.art +6 -0
- package/package.json +23 -15
- package/lib/routes/aljazeera/news.js +0 -38
- package/lib/routes/dedao/knowledge.js +0 -78
- package/lib/routes/docschina/jsweekly.js +0 -47
- package/lib/routes/logseq/changelog.js +0 -42
- package/lib/routes/luogu/contest.js +0 -28
- package/lib/routes/luogu/daily.js +0 -53
- package/lib/routes/luogu/userFeed.js +0 -38
- package/lib/routes/mckinsey/index.js +0 -49
- package/lib/routes/transferwise/pair.js +0 -64
- package/lib/routes/udn/global.js +0 -61
- package/lib/routes/verge/index.js +0 -88
- package/lib/v2/hellogithub/article.js +0 -47
- package/lib/v2/hellogithub/month.js +0 -42
- package/lib/v2/hellogithub/ranking.js +0 -39
- package/lib/v2/radio/radio.js +0 -50
package/lib/router.js
CHANGED
|
@@ -878,7 +878,7 @@ router.get('/bbc/:site?/:channel?', lazyloadRouteHandler('./routes/bbc/index'));
|
|
|
878
878
|
// router.get('/ft/:language/:channel?', lazyloadRouteHandler('./routes/ft/channel'));
|
|
879
879
|
|
|
880
880
|
// The Verge
|
|
881
|
-
router.get('/verge', lazyloadRouteHandler('./routes/verge/index'));
|
|
881
|
+
// router.get('/verge', lazyloadRouteHandler('./routes/verge/index'));
|
|
882
882
|
|
|
883
883
|
// 看雪
|
|
884
884
|
router.get('/pediy/topic/:category?/:type?', lazyloadRouteHandler('./routes/pediy/topic'));
|
|
@@ -1035,7 +1035,7 @@ router.get('/anime1/anime/:time/:name', lazyloadRouteHandler('./routes/anime1/an
|
|
|
1035
1035
|
router.get('/anime1/search/:keyword', lazyloadRouteHandler('./routes/anime1/search'));
|
|
1036
1036
|
|
|
1037
1037
|
// Global UDN
|
|
1038
|
-
router.get('/udn/global/:tid', lazyloadRouteHandler('./routes/udn/global'));
|
|
1038
|
+
// router.get('/udn/global/:tid', lazyloadRouteHandler('./routes/udn/global'));
|
|
1039
1039
|
|
|
1040
1040
|
// gitea
|
|
1041
1041
|
router.get('/gitea/blog', lazyloadRouteHandler('./routes/gitea/blog'));
|
|
@@ -1356,9 +1356,9 @@ router.get('/ui-cn/user/:id', lazyloadRouteHandler('./routes/ui-cn/user'));
|
|
|
1356
1356
|
router.get('/bjp/apod', lazyloadRouteHandler('./routes/bjp/apod'));
|
|
1357
1357
|
|
|
1358
1358
|
// 洛谷
|
|
1359
|
-
router.get('/luogu/daily/:id?', lazyloadRouteHandler('./routes/luogu/daily'));
|
|
1360
|
-
router.get('/luogu/contest', lazyloadRouteHandler('./routes/luogu/contest'));
|
|
1361
|
-
router.get('/luogu/user/feed/:uid', lazyloadRouteHandler('./routes/luogu/userFeed'));
|
|
1359
|
+
// router.get('/luogu/daily/:id?', lazyloadRouteHandler('./routes/luogu/daily'));
|
|
1360
|
+
// router.get('/luogu/contest', lazyloadRouteHandler('./routes/luogu/contest'));
|
|
1361
|
+
// router.get('/luogu/user/feed/:uid', lazyloadRouteHandler('./routes/luogu/userFeed'));
|
|
1362
1362
|
|
|
1363
1363
|
// 决胜网
|
|
1364
1364
|
router.get('/juesheng', lazyloadRouteHandler('./routes/juesheng'));
|
|
@@ -1790,7 +1790,7 @@ router.get('/archdaily', lazyloadRouteHandler('./routes/archdaily/home'));
|
|
|
1790
1790
|
router.get('/aptonic/action/:untested?', lazyloadRouteHandler('./routes/aptonic/action'));
|
|
1791
1791
|
|
|
1792
1792
|
// 印记中文周刊
|
|
1793
|
-
router.get('/docschina/jsweekly', lazyloadRouteHandler('./routes/docschina/jsweekly'));
|
|
1793
|
+
// router.get('/docschina/jsweekly', lazyloadRouteHandler('./routes/docschina/jsweekly'));
|
|
1794
1794
|
|
|
1795
1795
|
// im2maker
|
|
1796
1796
|
router.get('/im2maker/:channel?', lazyloadRouteHandler('./routes/im2maker/index'));
|
|
@@ -1894,14 +1894,14 @@ router.get('/keyakizaka46/blog', lazyloadRouteHandler('./routes/keyakizaka46/blo
|
|
|
1894
1894
|
router.get('/hinatazaka46/blog', lazyloadRouteHandler('./routes/hinatazaka46/blog'));
|
|
1895
1895
|
// router.get('/sakurazaka46/blog', lazyloadRouteHandler('./routes/sakurazaka46/blog'));
|
|
1896
1896
|
|
|
1897
|
-
// 酷安
|
|
1898
|
-
router.get('/coolapk/tuwen/:type?', lazyloadRouteHandler('./routes/coolapk/tuwen'));
|
|
1899
|
-
router.get('/coolapk/tuwen-xinxian', lazyloadRouteHandler('./routes/coolapk/tuwen'));
|
|
1900
|
-
router.get('/coolapk/toutiao/:type?', lazyloadRouteHandler('./routes/coolapk/toutiao'));
|
|
1901
|
-
router.get('/coolapk/huati/:tag', lazyloadRouteHandler('./routes/coolapk/huati'));
|
|
1902
|
-
router.get('/coolapk/user/:uid/dynamic', lazyloadRouteHandler('./routes/coolapk/userDynamic'));
|
|
1903
|
-
router.get('/coolapk/dyh/:dyhId', lazyloadRouteHandler('./routes/coolapk/dyh'));
|
|
1904
|
-
router.get('/coolapk/hot/:type?/:period?', lazyloadRouteHandler('./routes/coolapk/hot'));
|
|
1897
|
+
// 酷安 migrated to v2
|
|
1898
|
+
// router.get('/coolapk/tuwen/:type?', lazyloadRouteHandler('./routes/coolapk/tuwen'));
|
|
1899
|
+
// router.get('/coolapk/tuwen-xinxian', lazyloadRouteHandler('./routes/coolapk/tuwen'));
|
|
1900
|
+
// router.get('/coolapk/toutiao/:type?', lazyloadRouteHandler('./routes/coolapk/toutiao'));
|
|
1901
|
+
// router.get('/coolapk/huati/:tag', lazyloadRouteHandler('./routes/coolapk/huati'));
|
|
1902
|
+
// router.get('/coolapk/user/:uid/dynamic', lazyloadRouteHandler('./routes/coolapk/userDynamic'));
|
|
1903
|
+
// router.get('/coolapk/dyh/:dyhId', lazyloadRouteHandler('./routes/coolapk/dyh'));
|
|
1904
|
+
// router.get('/coolapk/hot/:type?/:period?', lazyloadRouteHandler('./routes/coolapk/hot'));
|
|
1905
1905
|
|
|
1906
1906
|
// 模型网
|
|
1907
1907
|
router.get('/moxingnet', lazyloadRouteHandler('./routes/moxingnet'));
|
|
@@ -2160,7 +2160,7 @@ router.get('/kaggle/user/:user', lazyloadRouteHandler('./routes/kaggle/user'));
|
|
|
2160
2160
|
// router.get('/pubmed/trending', lazyloadRouteHandler('./routes/pubmed/trending'));
|
|
2161
2161
|
|
|
2162
2162
|
// 领科 (linkresearcher.com)
|
|
2163
|
-
router.get('/linkresearcher/:params', lazyloadRouteHandler('./routes/linkresearcher/index'));
|
|
2163
|
+
// router.get('/linkresearcher/:params', lazyloadRouteHandler('./routes/linkresearcher/index'));
|
|
2164
2164
|
|
|
2165
2165
|
// eLife [Sci Journal]
|
|
2166
2166
|
router.get('/elife/:tid', lazyloadRouteHandler('./routes/elife/index'));
|
|
@@ -2258,7 +2258,7 @@ router.get('/remote-work/:caty?', lazyloadRouteHandler('./routes/remote-work/ind
|
|
|
2258
2258
|
router.get('/chinatimes/:caty', lazyloadRouteHandler('./routes/chinatimes/index'));
|
|
2259
2259
|
|
|
2260
2260
|
// TransferWise
|
|
2261
|
-
router.get('/transferwise/pair/:source/:target', lazyloadRouteHandler('./routes/transferwise/pair'));
|
|
2261
|
+
// router.get('/transferwise/pair/:source/:target', lazyloadRouteHandler('./routes/transferwise/pair'));
|
|
2262
2262
|
|
|
2263
2263
|
// chocolatey
|
|
2264
2264
|
router.get('/chocolatey/software/:name?', lazyloadRouteHandler('./routes/chocolatey/software'));
|
|
@@ -2807,7 +2807,7 @@ router.get('/manhuadui/manhua/:name/:serial?', lazyloadRouteHandler('./routes/ma
|
|
|
2807
2807
|
router.get('/fzdm/manhua/:id', lazyloadRouteHandler('./routes/fzdm/manhua'));
|
|
2808
2808
|
|
|
2809
2809
|
// Aljazeera 半岛网
|
|
2810
|
-
router.get('/aljazeera/news', lazyloadRouteHandler('./routes/aljazeera/news'));
|
|
2810
|
+
// router.get('/aljazeera/news', lazyloadRouteHandler('./routes/aljazeera/news'));
|
|
2811
2811
|
|
|
2812
2812
|
// CFD indices dividend adjustment
|
|
2813
2813
|
router.get('/cfd/gbp_div', lazyloadRouteHandler('./routes/cfd/gbp_div'));
|
|
@@ -3353,9 +3353,9 @@ router.get('/nwpu/:column', lazyloadRouteHandler('./routes/nwpu/index'));
|
|
|
3353
3353
|
router.get('/us/supremecourt/argument_audio/:year?', lazyloadRouteHandler('./routes/us/supremecourt/argument_audio'));
|
|
3354
3354
|
|
|
3355
3355
|
// 得到
|
|
3356
|
-
router.get('/dedao/list/:caty?', lazyloadRouteHandler('./routes/dedao/list'));
|
|
3357
|
-
router.get('/dedao/knowledge/:topic?/:type?', lazyloadRouteHandler('./routes/dedao/knowledge'));
|
|
3358
|
-
router.get('/dedao/:caty?', lazyloadRouteHandler('./routes/dedao/index'));
|
|
3356
|
+
// router.get('/dedao/list/:caty?', lazyloadRouteHandler('./routes/dedao/list'));
|
|
3357
|
+
// router.get('/dedao/knowledge/:topic?/:type?', lazyloadRouteHandler('./routes/dedao/knowledge'));
|
|
3358
|
+
// router.get('/dedao/:caty?', lazyloadRouteHandler('./routes/dedao/index'));
|
|
3359
3359
|
|
|
3360
3360
|
// 未名新闻
|
|
3361
3361
|
router.get('/mitbbs/:caty?', lazyloadRouteHandler('./routes/mitbbs/index'));
|
|
@@ -3397,7 +3397,7 @@ router.get('/clb/commentary/:lang?', lazyloadRouteHandler('./routes/clb/commenta
|
|
|
3397
3397
|
router.get('/iie/blog', lazyloadRouteHandler('./routes/iie/blog'));
|
|
3398
3398
|
|
|
3399
3399
|
// McKinsey Greater China
|
|
3400
|
-
router.get('/mckinsey/:category?', lazyloadRouteHandler('./routes/mckinsey/index'));
|
|
3400
|
+
// router.get('/mckinsey/:category?', lazyloadRouteHandler('./routes/mckinsey/index'));
|
|
3401
3401
|
|
|
3402
3402
|
// 超理论坛
|
|
3403
3403
|
router.get('/chaoli/:channel?', lazyloadRouteHandler('./routes/chaoli/index'));
|
|
@@ -3812,9 +3812,6 @@ router.get('/furaffinity/favorites/:username/:nsfw?', lazyloadRouteHandler('./ro
|
|
|
3812
3812
|
router.get('/furaffinity/submission_comments/:id', lazyloadRouteHandler('./routes/furaffinity/submission_comments'));
|
|
3813
3813
|
router.get('/furaffinity/journal_comments/:id', lazyloadRouteHandler('./routes/furaffinity/journal_comments'));
|
|
3814
3814
|
|
|
3815
|
-
// Logseq
|
|
3816
|
-
router.get('/logseq/changelog', lazyloadRouteHandler('./routes/logseq/changelog'));
|
|
3817
|
-
|
|
3818
3815
|
// 亿欧网
|
|
3819
3816
|
router.get('/iyiou', lazyloadRouteHandler('./routes/iyiou'));
|
|
3820
3817
|
|
package/lib/utils/wechat-mp.js
CHANGED
package/lib/v2/8world/index.js
CHANGED
|
@@ -3,10 +3,10 @@ const cheerio = require('cheerio');
|
|
|
3
3
|
const { parseDate } = require('@/utils/parse-date');
|
|
4
4
|
|
|
5
5
|
module.exports = async (ctx) => {
|
|
6
|
-
const
|
|
6
|
+
const path = ctx.path === '/' ? '/realtime' : ctx.path;
|
|
7
7
|
|
|
8
8
|
const rootUrl = 'https://www.8world.com';
|
|
9
|
-
const currentUrl = `${rootUrl}
|
|
9
|
+
const currentUrl = `${rootUrl}${path}`;
|
|
10
10
|
|
|
11
11
|
const response = await got({
|
|
12
12
|
method: 'get',
|
|
@@ -15,19 +15,19 @@ module.exports = async (ctx) => {
|
|
|
15
15
|
|
|
16
16
|
const $ = cheerio.load(response.data);
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
.
|
|
18
|
+
let items = $('div[data-column="Two-Third"] .article-title .article-link')
|
|
19
|
+
.toArray()
|
|
20
|
+
.map((item) => {
|
|
20
21
|
item = $(item);
|
|
21
22
|
|
|
22
23
|
return {
|
|
23
24
|
title: item.text(),
|
|
24
25
|
link: `${rootUrl}${item.attr('href')}`,
|
|
25
26
|
};
|
|
26
|
-
})
|
|
27
|
-
.get();
|
|
27
|
+
});
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
items = await Promise.all(
|
|
30
|
+
items.map((item) =>
|
|
31
31
|
ctx.cache.tryGet(item.link, async () => {
|
|
32
32
|
const detailResponse = await got({
|
|
33
33
|
method: 'get',
|
package/lib/v2/8world/radar.js
CHANGED
|
@@ -8,6 +8,12 @@ module.exports = {
|
|
|
8
8
|
source: ['/:category', '/'],
|
|
9
9
|
target: '/8world/:category?',
|
|
10
10
|
},
|
|
11
|
+
{
|
|
12
|
+
title: '标签',
|
|
13
|
+
docs: 'https://docs.rsshub.app/new-media.html#_8-shi-jie-biao-qian',
|
|
14
|
+
source: ['/topic/:id', '/'],
|
|
15
|
+
target: '/8world/topic/:id',
|
|
16
|
+
},
|
|
11
17
|
],
|
|
12
18
|
},
|
|
13
19
|
};
|
package/lib/v2/8world/router.js
CHANGED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
4
|
+
const { art } = require('@/utils/render');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
|
|
7
|
+
const languages = {
|
|
8
|
+
arabic: {
|
|
9
|
+
rootUrl: 'https://www.aljazeera.net',
|
|
10
|
+
rssUrl: 'rss',
|
|
11
|
+
},
|
|
12
|
+
chinese: {
|
|
13
|
+
rootUrl: 'https://chinese.aljazeera.net',
|
|
14
|
+
rssUrl: undefined,
|
|
15
|
+
},
|
|
16
|
+
english: {
|
|
17
|
+
rootUrl: 'https://www.aljazeera.com',
|
|
18
|
+
rssUrl: 'xml/rss/all.xml',
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
module.exports = async (ctx) => {
|
|
23
|
+
const params = ctx.path === '/' ? ['arabic'] : ctx.path.replace(/^\//, '').split('/');
|
|
24
|
+
|
|
25
|
+
if (!languages.hasOwnProperty(params[0])) {
|
|
26
|
+
params.unshift('arabic');
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const language = params.shift();
|
|
30
|
+
const isRSS = params.length === 1 && params.at(-1) === 'rss' && languages[language].rssUrl;
|
|
31
|
+
|
|
32
|
+
const rootUrl = languages[language].rootUrl;
|
|
33
|
+
const currentUrl = `${rootUrl}/${isRSS ? languages[language].rssUrl : params.join('/')}`;
|
|
34
|
+
|
|
35
|
+
const response = await got({
|
|
36
|
+
method: 'get',
|
|
37
|
+
url: currentUrl,
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
const $ = cheerio.load(response.data);
|
|
41
|
+
|
|
42
|
+
let items = isRSS
|
|
43
|
+
? response.data.match(new RegExp('<link>' + rootUrl + '/(.*?)</link>', 'g')).map((item) => ({
|
|
44
|
+
link: item.match(/<link>(.*?)<\/link>/)[1],
|
|
45
|
+
}))
|
|
46
|
+
: $('.u-clickable-card__link')
|
|
47
|
+
.toArray()
|
|
48
|
+
.map((item) => {
|
|
49
|
+
item = $(item);
|
|
50
|
+
|
|
51
|
+
return {
|
|
52
|
+
link: `${rootUrl}${item.attr('href')}`,
|
|
53
|
+
};
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
items = await Promise.all(
|
|
57
|
+
items.slice(0, ctx.query.limit ? parseInt(ctx.query.limit) : 50).map((item) =>
|
|
58
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
59
|
+
const detailResponse = await got({
|
|
60
|
+
method: 'get',
|
|
61
|
+
url: item.link,
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
const content = cheerio.load(detailResponse.data);
|
|
65
|
+
|
|
66
|
+
content('.more-on').parent().remove();
|
|
67
|
+
content('.responsive-image img').removeAttr('srcset');
|
|
68
|
+
|
|
69
|
+
item.title = content('h1').first().text();
|
|
70
|
+
item.author = content('.author').text();
|
|
71
|
+
item.pubDate = parseDate(detailResponse.data.match(/"datePublished": "(.*?)",/)[1]);
|
|
72
|
+
item.description = art(path.join(__dirname, 'templates/description.art'), {
|
|
73
|
+
image: content('.article-featured-image').html(),
|
|
74
|
+
description: content('.wysiwyg').html(),
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
return item;
|
|
78
|
+
})
|
|
79
|
+
)
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
ctx.state.data = {
|
|
83
|
+
title: $('title').first().text(),
|
|
84
|
+
link: currentUrl,
|
|
85
|
+
item: items,
|
|
86
|
+
};
|
|
87
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'aljazeera.com': {
|
|
3
|
+
_name: 'Aljazeera 半岛电视台',
|
|
4
|
+
'.': [
|
|
5
|
+
{
|
|
6
|
+
title: 'News',
|
|
7
|
+
docs: 'https://docs.rsshub.app/traditional-media.html#aljazeera-ban-dao-dian-shi-tai-xin-wen',
|
|
8
|
+
source: ['/:category', '/'],
|
|
9
|
+
target: '/aljazeera/english/:category',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
title: 'Tag',
|
|
13
|
+
docs: 'https://docs.rsshub.app/traditional-media.html#aljazeera-ban-dao-dian-shi-tai-biao-qian',
|
|
14
|
+
source: ['/tag/:id', '/'],
|
|
15
|
+
target: '/aljazeera/english/tag/:id',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
title: 'Official RSS',
|
|
19
|
+
docs: 'https://docs.rsshub.app/traditional-media.html#aljazeera-ban-dao-dian-shi-tai-guan-fang-rss',
|
|
20
|
+
source: ['/xml/rss/all.xml', '/'],
|
|
21
|
+
target: '/aljazeera/english/rss',
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
},
|
|
25
|
+
'aljazeera.net': {
|
|
26
|
+
_name: 'Aljazeera 半岛电视台',
|
|
27
|
+
'.': [
|
|
28
|
+
{
|
|
29
|
+
title: 'News',
|
|
30
|
+
docs: 'https://docs.rsshub.app/traditional-media.html#aljazeera-ban-dao-dian-shi-tai-xin-wen',
|
|
31
|
+
source: ['/:category', '/'],
|
|
32
|
+
target: '/aljazeera/arbric/:category',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
title: 'Tag',
|
|
36
|
+
docs: 'https://docs.rsshub.app/traditional-media.html#aljazeera-ban-dao-dian-shi-tai-biao-qian',
|
|
37
|
+
source: ['/tag/:id', '/'],
|
|
38
|
+
target: '/aljazeera/arbric/tag/:id',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
title: 'Official RSS',
|
|
42
|
+
docs: 'https://docs.rsshub.app/traditional-media.html#aljazeera-ban-dao-dian-shi-tai-guan-fang-rss',
|
|
43
|
+
source: ['/rss', '/'],
|
|
44
|
+
target: '/aljazeera/arbric/rss',
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
chinese: [
|
|
48
|
+
{
|
|
49
|
+
title: '新闻',
|
|
50
|
+
docs: 'https://docs.rsshub.app/traditional-media.html#aljazeera-ban-dao-dian-shi-tai-xin-wen',
|
|
51
|
+
source: ['/:category', '/'],
|
|
52
|
+
target: '/aljazeera/chinese/:category',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
title: '标签',
|
|
56
|
+
docs: 'https://docs.rsshub.app/traditional-media.html#aljazeera-ban-dao-dian-shi-tai-biao-qian',
|
|
57
|
+
source: ['/tag/:id', '/'],
|
|
58
|
+
target: '/aljazeera/chinese/tag/:id',
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
},
|
|
62
|
+
};
|
|
@@ -1,21 +1,35 @@
|
|
|
1
1
|
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
2
3
|
const { parseDate } = require('@/utils/parse-date');
|
|
3
4
|
const timezone = require('@/utils/timezone');
|
|
4
5
|
|
|
5
6
|
module.exports = async (ctx) => {
|
|
6
7
|
const api = 'https://api.anquanke.com/data/v1/posts?size=10&page=1&category=';
|
|
7
8
|
const type = ctx.params.category;
|
|
9
|
+
const fulltext = ctx.params.fulltext;
|
|
8
10
|
const host = 'https://www.anquanke.com';
|
|
9
11
|
const res = await got(`${api}${type}`);
|
|
10
12
|
const dataArray = res.data.data;
|
|
11
13
|
|
|
12
|
-
const items =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
const items = await Promise.all(
|
|
15
|
+
dataArray.map(async (item) => {
|
|
16
|
+
const art_url = `${host}/${type === 'week' ? 'week' : 'post'}/id/${item.id}`;
|
|
17
|
+
return {
|
|
18
|
+
title: item.title,
|
|
19
|
+
description:
|
|
20
|
+
fulltext === 'fulltext' || fulltext === 'quanwen'
|
|
21
|
+
? await ctx.cache.tryGet(art_url, async () => {
|
|
22
|
+
const { data: res } = await got(art_url);
|
|
23
|
+
const content = cheerio.load(res);
|
|
24
|
+
return content('#js-article').html();
|
|
25
|
+
})
|
|
26
|
+
: item.desc,
|
|
27
|
+
pubDate: timezone(parseDate(item.date), +8),
|
|
28
|
+
link: art_url,
|
|
29
|
+
author: item.author.nickname,
|
|
30
|
+
};
|
|
31
|
+
})
|
|
32
|
+
);
|
|
19
33
|
|
|
20
34
|
ctx.state.data = {
|
|
21
35
|
title: `安全客-${dataArray[0].category_name}`,
|
package/lib/v2/bilibili/cache.js
CHANGED
|
@@ -1,30 +1,53 @@
|
|
|
1
1
|
const got = require('@/utils/got');
|
|
2
2
|
|
|
3
3
|
module.exports = {
|
|
4
|
+
getCookie: (ctx) => {
|
|
5
|
+
const key = 'bili-cookie';
|
|
6
|
+
return ctx.cache.tryGet(key, async () => {
|
|
7
|
+
const response = await got(`https://www.bilibili.com/`);
|
|
8
|
+
return response.headers['set-cookie'];
|
|
9
|
+
});
|
|
10
|
+
},
|
|
4
11
|
getUsernameFromUID: (ctx, uid) => {
|
|
5
12
|
const key = 'bili-username-from-uid-' + uid;
|
|
6
13
|
return ctx.cache.tryGet(key, async () => {
|
|
7
|
-
const
|
|
14
|
+
const cookie = await module.exports.getCookie(ctx);
|
|
15
|
+
await got(`https://space.bilibili.com/${uid}/`, {
|
|
8
16
|
headers: {
|
|
9
|
-
Referer:
|
|
17
|
+
Referer: 'https://www.bilibili.com/',
|
|
18
|
+
Cookie: cookie,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
const { data: nameResponse } = await got(`https://api.bilibili.com/x/space/acc/info?mid=${uid}&token=&platform=web&jsonp=jsonp`, {
|
|
22
|
+
headers: {
|
|
23
|
+
Referer: `https://space.bilibili.com/${uid}/`,
|
|
24
|
+
Cookie: cookie,
|
|
10
25
|
},
|
|
11
26
|
});
|
|
12
27
|
return nameResponse.data.name;
|
|
13
28
|
});
|
|
14
29
|
},
|
|
15
30
|
getUsernameAndFaceFromUID: async (ctx, uid) => {
|
|
31
|
+
const cookie = await module.exports.getCookie(ctx);
|
|
16
32
|
const nameKey = 'bili-username-from-uid-' + uid;
|
|
17
33
|
const faceKey = 'bili-userface-from-uid-' + uid;
|
|
18
34
|
let name = await ctx.cache.get(nameKey);
|
|
19
35
|
let face = await ctx.cache.get(faceKey);
|
|
20
|
-
if (!name) {
|
|
21
|
-
|
|
36
|
+
if (!name || !face) {
|
|
37
|
+
await got(`https://space.bilibili.com/${uid}/`, {
|
|
38
|
+
headers: {
|
|
39
|
+
Referer: `https://www.bilibili.com/`,
|
|
40
|
+
Cookie: cookie,
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
const { data: nameResponse } = await got(`https://api.bilibili.com/x/space/acc/info?mid=${uid}&token=&platform=web&jsonp=jsonp`, {
|
|
22
44
|
headers: {
|
|
23
|
-
Referer: `https://space.bilibili.com/${uid}
|
|
45
|
+
Referer: `https://space.bilibili.com/${uid}/`,
|
|
46
|
+
Cookie: cookie,
|
|
24
47
|
},
|
|
25
48
|
});
|
|
26
|
-
name = nameResponse.data.
|
|
27
|
-
face = nameResponse.data.
|
|
49
|
+
name = nameResponse.data.name;
|
|
50
|
+
face = nameResponse.data.face;
|
|
28
51
|
ctx.cache.set(nameKey, name);
|
|
29
52
|
ctx.cache.set(faceKey, face);
|
|
30
53
|
}
|
|
@@ -6,27 +6,45 @@ const { parseDate } = require('@/utils/parse-date');
|
|
|
6
6
|
module.exports = async (ctx) => {
|
|
7
7
|
const uid = ctx.params.uid;
|
|
8
8
|
const disableEmbed = ctx.params.disableEmbed;
|
|
9
|
+
const cookie = await cache.getCookie(ctx);
|
|
9
10
|
const [name, face] = await cache.getUsernameAndFaceFromUID(ctx, uid);
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
await got(`https://space.bilibili.com/${uid}/video?tid=0&page=1&keyword=&order=pubdate`, {
|
|
12
13
|
headers: {
|
|
13
14
|
Referer: `https://space.bilibili.com/${uid}/`,
|
|
15
|
+
Cookie: cookie,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
const response = await got(`https://api.bilibili.com/x/space/arc/search?mid=${uid}&ps=30&tid=0&pn=1&keyword=&order=pubdate&jsonp=jsonp`, {
|
|
19
|
+
headers: {
|
|
20
|
+
Referer: `https://space.bilibili.com/${uid}/video?tid=0&page=1&keyword=&order=pubdate`,
|
|
21
|
+
Cookie: cookie,
|
|
14
22
|
},
|
|
15
23
|
});
|
|
16
24
|
|
|
17
25
|
const vlist = [...response.data.data.list.vlist];
|
|
18
26
|
const pageTotal = Math.ceil(response.data.data.page.count / response.data.data.page.ps);
|
|
27
|
+
|
|
28
|
+
const getPage = async (pageId) => {
|
|
29
|
+
await got(`https://space.bilibili.com/${uid}/video?tid=0&page=${pageId}&keyword=&order=pubdate`, {
|
|
30
|
+
headers: {
|
|
31
|
+
Referer: `https://space.bilibili.com/${uid}/`,
|
|
32
|
+
Cookie: cookie,
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
return await got(`https://api.bilibili.com/x/space/arc/search?mid=${uid}&ps=30&tid=0&pn=${pageId}&keyword=&order=pubdate&jsonp=jsonp`, {
|
|
36
|
+
headers: {
|
|
37
|
+
Referer: `https://space.bilibili.com/${uid}/video?tid=0&page=${pageId}&keyword=&order=pubdate`,
|
|
38
|
+
Cookie: cookie,
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
|
|
19
43
|
const promises = [];
|
|
20
44
|
|
|
21
45
|
if (pageTotal > 1) {
|
|
22
46
|
for (let i = 2; i <= pageTotal; i++) {
|
|
23
|
-
promises.push(
|
|
24
|
-
got(`https://api.bilibili.com/x/space/arc/search?mid=${uid}&ps=30&tid=0&pn=${i}&keyword=&order=pubdate&jsonp=jsonp`, {
|
|
25
|
-
headers: {
|
|
26
|
-
Referer: `https://space.bilibili.com/${uid}/`,
|
|
27
|
-
},
|
|
28
|
-
})
|
|
29
|
-
);
|
|
47
|
+
promises.push(getPage(i));
|
|
30
48
|
}
|
|
31
49
|
const rets = await Promise.all(promises);
|
|
32
50
|
rets.forEach((ret) => {
|
package/lib/v2/bilibili/video.js
CHANGED
|
@@ -5,13 +5,19 @@ const utils = require('./utils');
|
|
|
5
5
|
module.exports = async (ctx) => {
|
|
6
6
|
const uid = ctx.params.uid;
|
|
7
7
|
const disableEmbed = ctx.params.disableEmbed;
|
|
8
|
+
const cookie = await cache.getCookie(ctx);
|
|
8
9
|
const [name, face] = await cache.getUsernameAndFaceFromUID(ctx, uid);
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
method: 'get',
|
|
12
|
-
url: `https://api.bilibili.com/x/space/arc/search?mid=${uid}&ps=10&tid=0&pn=1&order=pubdate&jsonp=jsonp`,
|
|
11
|
+
await got(`https://space.bilibili.com/${uid}/video?tid=0&page=1&keyword=&order=pubdate`, {
|
|
13
12
|
headers: {
|
|
14
13
|
Referer: `https://space.bilibili.com/${uid}/`,
|
|
14
|
+
Cookie: cookie,
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
const response = await got(`https://api.bilibili.com/x/space/arc/search?mid=${uid}&ps=30&tid=0&pn=1&keyword=&order=pubdate&jsonp=jsonp`, {
|
|
18
|
+
headers: {
|
|
19
|
+
Referer: `https://space.bilibili.com/${uid}/video?tid=0&page=1&keyword=&order=pubdate`,
|
|
20
|
+
Cookie: cookie,
|
|
15
21
|
},
|
|
16
22
|
});
|
|
17
23
|
const data = response.data;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'cnbc.com': {
|
|
3
|
+
_name: 'CNBC',
|
|
4
|
+
search: [
|
|
5
|
+
{
|
|
6
|
+
title: '全文 RSS',
|
|
7
|
+
docs: 'https://docs.rsshub.app/traditional-media.html#cnbc',
|
|
8
|
+
source: ['/rs/search/combinedcms/view.xml'],
|
|
9
|
+
target: (_, url) => `/cnbc/rss/${new URL(url).searchParams.get('id')}`,
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
|
+
www: [
|
|
13
|
+
{
|
|
14
|
+
title: '全文 RSS',
|
|
15
|
+
docs: 'https://docs.rsshub.app/traditional-media.html#cnbc',
|
|
16
|
+
source: ['/id/:id/device/rss/rss.html'],
|
|
17
|
+
target: '/cnbc/rss/:id',
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
},
|
|
21
|
+
};
|