rsshub 1.0.0-master.c626a9c → 1.0.0-master.c6d5935
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 +26 -23
- package/lib/routes/arknights/japan.js +2 -4
- package/lib/routes/blogs/foreverblog.js +33 -0
- package/lib/routes/cnbeta/topic.js +75 -0
- package/lib/routes/dongqiudi/utils.js +1 -1
- package/lib/routes/ehentai/search.js +6 -1
- package/lib/routes/ehentai/tag.js +1 -1
- package/lib/routes/etherscan/transactions.js +37 -0
- package/lib/routes/fanxinzhui/latest.js +53 -0
- package/lib/routes/github/trending.js +2 -1
- package/lib/routes/odaily/newsflash.js +25 -0
- package/lib/routes/odaily/post.js +60 -0
- package/lib/routes/odaily/user.js +53 -0
- package/lib/routes/pixiv/token.js +19 -3
- package/lib/routes/secrss/category.js +2 -2
- package/lib/routes/universities/fzu/news.js +15 -18
- package/lib/routes/universities/fzu/news_min.js +44 -0
- package/lib/routes/wenku8/volume.js +52 -0
- package/lib/v2/bandcamp/live.js +41 -0
- package/lib/v2/bandcamp/maintainer.js +3 -0
- package/lib/v2/bandcamp/radar.js +13 -0
- package/lib/v2/bandcamp/router.js +3 -0
- package/lib/v2/btzj/index.js +98 -0
- package/lib/v2/btzj/maintainer.js +3 -0
- package/lib/v2/btzj/radar.js +13 -0
- package/lib/v2/btzj/router.js +3 -0
- package/lib/v2/btzj/templates/torrents.art +5 -0
- package/lib/v2/distill/index.js +64 -0
- package/lib/v2/distill/maintainer.js +3 -0
- package/lib/v2/distill/radar.js +13 -0
- package/lib/v2/distill/router.js +3 -0
- package/lib/v2/eastday/find.js +49 -0
- package/lib/v2/eastday/maintainer.js +4 -0
- package/lib/v2/eastday/portrait.js +47 -0
- package/lib/v2/eastday/radar.js +19 -0
- package/lib/v2/eastday/router.js +4 -0
- package/lib/v2/gf-cn/maintainer.js +3 -0
- package/lib/v2/gf-cn/news.js +50 -0
- package/lib/v2/gf-cn/radar.js +13 -0
- package/lib/v2/gf-cn/router.js +3 -0
- package/lib/v2/heu/gx/card.js +47 -0
- package/lib/v2/heu/gx/list.js +73 -0
- package/lib/v2/heu/job/bigemploy.js +42 -0
- package/lib/v2/heu/job/calendar.js +54 -0
- package/lib/v2/heu/job/list.js +70 -0
- package/lib/v2/heu/maintainer.js +8 -0
- package/lib/v2/heu/radar.js +73 -0
- package/lib/v2/heu/router.js +9 -0
- package/lib/v2/heu/uae/list.js +62 -0
- package/lib/v2/heu/yjsy/list.js +65 -0
- package/lib/v2/jisilu/index.js +90 -0
- package/lib/v2/jisilu/maintainer.js +3 -0
- package/lib/v2/jisilu/radar.js +25 -0
- package/lib/v2/jisilu/router.js +3 -0
- package/lib/v2/mydrivers/index.js +110 -0
- package/lib/v2/mydrivers/maintainer.js +3 -0
- package/lib/v2/mydrivers/radar.js +13 -0
- package/lib/v2/mydrivers/router.js +3 -0
- package/lib/v2/mygopen/index.js +29 -0
- package/lib/v2/mygopen/maintainer.js +3 -0
- package/lib/v2/mygopen/radar.js +13 -0
- package/lib/v2/mygopen/router.js +3 -0
- package/lib/v2/netease/maintainer.js +1 -0
- package/lib/v2/netease/radar.js +9 -1
- package/lib/v2/netease/renjian.js +74 -0
- package/lib/v2/netease/router.js +1 -0
- package/lib/v2/newsmarket/index.js +63 -0
- package/lib/v2/newsmarket/maintainer.js +3 -0
- package/lib/v2/newsmarket/radar.js +13 -0
- package/lib/v2/newsmarket/router.js +3 -0
- package/lib/v2/pku/hr.js +54 -0
- package/lib/v2/pku/maintainer.js +3 -0
- package/lib/v2/pku/radar.js +13 -0
- package/lib/v2/pku/router.js +3 -0
- package/lib/v2/pts/dailynews.js +52 -0
- package/lib/v2/pts/maintainer.js +3 -0
- package/lib/v2/pts/radar.js +13 -0
- package/lib/v2/pts/router.js +3 -0
- package/lib/v2/qm120/maintainer.js +3 -0
- package/lib/v2/qm120/news.js +50 -0
- package/lib/v2/qm120/radar.js +13 -0
- package/lib/v2/qm120/router.js +3 -0
- package/lib/v2/rfi/maintainer.js +3 -0
- package/lib/v2/rfi/news.js +49 -0
- package/lib/v2/rfi/radar.js +13 -0
- package/lib/v2/rfi/router.js +3 -0
- package/lib/v2/ruc/hr.js +52 -0
- package/lib/v2/ruc/maintainer.js +3 -0
- package/lib/v2/ruc/radar.js +13 -0
- package/lib/v2/ruc/router.js +3 -0
- package/lib/{routes → v2}/solidot/_article.js +6 -13
- package/lib/{routes → v2}/solidot/main.js +5 -15
- package/lib/v2/solidot/maintainer.js +3 -0
- package/lib/v2/solidot/radar.js +117 -0
- package/lib/v2/solidot/router.js +3 -0
- package/lib/v2/subhd/index.js +79 -0
- package/lib/v2/subhd/maintainer.js +4 -0
- package/lib/v2/subhd/radar.js +19 -0
- package/lib/v2/subhd/router.js +3 -0
- package/lib/v2/watchout/index.js +51 -0
- package/lib/v2/watchout/maintainer.js +3 -0
- package/lib/v2/watchout/radar.js +13 -0
- package/lib/v2/watchout/router.js +3 -0
- package/lib/v2/wechat/feeddd.js +72 -0
- package/lib/v2/wechat/maintainer.js +3 -0
- package/lib/v2/wechat/radar.js +12 -0
- package/lib/v2/wechat/router.js +3 -0
- package/lib/v2/wechat/templates/description.art +1 -0
- package/lib/v2/wechat/templates/image.art +1 -0
- package/lib/v2/wzu/maintainer.js +3 -0
- package/lib/v2/wzu/news.js +84 -0
- package/lib/v2/wzu/radar.js +11 -0
- package/lib/v2/wzu/router.js +3 -0
- package/lib/v2/yaohuo/index.js +30 -0
- package/lib/v2/yaohuo/maintainer.js +3 -0
- package/lib/v2/yaohuo/radar.js +13 -0
- package/lib/v2/yaohuo/router.js +3 -0
- package/package.json +1 -1
- package/lib/routes/btzj/index.js +0 -77
- package/lib/routes/gf-cn/news.js +0 -39
- package/lib/routes/jisilu/reply.js +0 -63
- package/lib/routes/jisilu/topic.js +0 -68
- package/lib/routes/solidot/sectigo.pem +0 -122
- package/lib/routes/solidot/wotrust.pem +0 -125
- package/lib/routes/subhd/newest.js +0 -29
- package/lib/routes/universities/heu/job.js +0 -80
- package/lib/routes/universities/heu/news.js +0 -80
- package/lib/routes/universities/heu/uae.js +0 -84
- package/lib/routes/universities/heu/ugs/news.js +0 -122
- package/lib/routes/universities/heu/yjsy.js +0 -92
- package/lib/routes/universities/wzu/news.js +0 -25
- package/lib/routes/yaohuo/index.js +0 -33
package/lib/router.js
CHANGED
|
@@ -278,7 +278,7 @@ router.get('/readhub/category/:category', lazyloadRouteHandler('./routes/readhub
|
|
|
278
278
|
|
|
279
279
|
// GitHub
|
|
280
280
|
router.get('/github/repos/:user', lazyloadRouteHandler('./routes/github/repos'));
|
|
281
|
-
router.get('/github/trending/:since/:language?', lazyloadRouteHandler('./routes/github/trending'));
|
|
281
|
+
router.get('/github/trending/:since/:language?/:spoken_language?', lazyloadRouteHandler('./routes/github/trending'));
|
|
282
282
|
router.get('/github/issue/:user/:repo/:state?/:labels?', lazyloadRouteHandler('./routes/github/issue'));
|
|
283
283
|
router.get('/github/pull/:user/:repo', lazyloadRouteHandler('./routes/github/pulls'));
|
|
284
284
|
router.get('/github/user/followers/:user', lazyloadRouteHandler('./routes/github/follower'));
|
|
@@ -710,15 +710,6 @@ router.get('/njupt/jwc/:type?', lazyloadRouteHandler('./routes/universities/njup
|
|
|
710
710
|
// 南昌航空大学
|
|
711
711
|
router.get('/nchu/jwc/:type?', lazyloadRouteHandler('./routes/universities/nchu/jwc'));
|
|
712
712
|
|
|
713
|
-
// 哈尔滨工程大学
|
|
714
|
-
router.get('/heu/ugs/news/:author?/:category?', lazyloadRouteHandler('./routes/universities/heu/ugs/news'));
|
|
715
|
-
router.get('/heu/yjsy/:type?', lazyloadRouteHandler('./routes/universities/heu/yjsy'));
|
|
716
|
-
router.get('/heu/gongxue/:type?', lazyloadRouteHandler('./routes/universities/heu/news'));
|
|
717
|
-
router.get('/heu/news/:type?', lazyloadRouteHandler('./routes/universities/heu/news'));
|
|
718
|
-
router.get('/heu/shuisheng/:type?', lazyloadRouteHandler('./routes/universities/heu/uae'));
|
|
719
|
-
router.get('/heu/uae/:type?', lazyloadRouteHandler('./routes/universities/heu/uae'));
|
|
720
|
-
router.get('/heu/job/:type?', lazyloadRouteHandler('./routes/universities/heu/job'));
|
|
721
|
-
|
|
722
713
|
// 重庆大学
|
|
723
714
|
router.get('/cqu/jwc/:path*', lazyloadRouteHandler('./routes/universities/cqu/jwc/announcement'));
|
|
724
715
|
router.get('/cqu/news/jzyg', lazyloadRouteHandler('./routes/universities/cqu/news/jzyg'));
|
|
@@ -910,6 +901,7 @@ router.get('/lyu/news/:type', lazyloadRouteHandler('./routes/universities/lyu/ne
|
|
|
910
901
|
|
|
911
902
|
// 福州大学
|
|
912
903
|
router.get('/fzu/:type', lazyloadRouteHandler('./routes/universities/fzu/news'));
|
|
904
|
+
router.get('/fzu_min/:type', lazyloadRouteHandler('./routes/universities/fzu/news_min'));
|
|
913
905
|
|
|
914
906
|
// 厦门大学
|
|
915
907
|
router.get('/xmu/aero/:type', lazyloadRouteHandler('./routes/universities/xmu/aero'));
|
|
@@ -977,7 +969,7 @@ router.get('/dytt', lazyloadRouteHandler('./routes/dytt/index'));
|
|
|
977
969
|
router.get('/dytt/index', lazyloadRouteHandler('./routes/dytt/index')); // 废弃
|
|
978
970
|
|
|
979
971
|
// BT之家
|
|
980
|
-
router.get('/btzj/:type?', lazyloadRouteHandler('./routes/btzj/index'));
|
|
972
|
+
// router.get('/btzj/:type?', lazyloadRouteHandler('./routes/btzj/index'));
|
|
981
973
|
|
|
982
974
|
// 人生05电影网
|
|
983
975
|
router.get('/rs05/rs05', lazyloadRouteHandler('./routes/rs05/rs05'));
|
|
@@ -1034,8 +1026,8 @@ router.get('/99percentinvisible/transcript', lazyloadRouteHandler('./routes/99pe
|
|
|
1034
1026
|
// 青空文庫
|
|
1035
1027
|
router.get('/aozora/newbook/:count?', lazyloadRouteHandler('./routes/aozora/newbook'));
|
|
1036
1028
|
|
|
1037
|
-
// solidot
|
|
1038
|
-
router.get('/solidot/:type?', lazyloadRouteHandler('./routes/solidot/main'));
|
|
1029
|
+
// solidot migrated to v2
|
|
1030
|
+
// router.get('/solidot/:type?', lazyloadRouteHandler('./routes/solidot/main'));
|
|
1039
1031
|
|
|
1040
1032
|
// Hermes UK
|
|
1041
1033
|
router.get('/parcel/hermesuk/:tracking', lazyloadRouteHandler('./routes/parcel/hermesuk'));
|
|
@@ -1236,7 +1228,7 @@ router.get('/zimuzu/top/:range/:type', lazyloadRouteHandler('./routes/zimuzu/top
|
|
|
1236
1228
|
router.get('/zimuku/:type?', lazyloadRouteHandler('./routes/zimuku/index'));
|
|
1237
1229
|
|
|
1238
1230
|
// SubHD.tv
|
|
1239
|
-
router.get('/subhd/newest', lazyloadRouteHandler('./routes/subhd/newest'));
|
|
1231
|
+
// router.get('/subhd/newest', lazyloadRouteHandler('./routes/subhd/newest'));
|
|
1240
1232
|
|
|
1241
1233
|
// 虎嗅
|
|
1242
1234
|
router.get('/huxiu/tag/:id', lazyloadRouteHandler('./routes/huxiu/tag'));
|
|
@@ -1433,6 +1425,7 @@ router.get('/gaoqing/latest', lazyloadRouteHandler('./routes/gaoqing/latest'));
|
|
|
1433
1425
|
|
|
1434
1426
|
// 轻小说文库
|
|
1435
1427
|
router.get('/wenku8/chapter/:id', lazyloadRouteHandler('./routes/wenku8/chapter'));
|
|
1428
|
+
router.get('/wenku8/volume/:id', lazyloadRouteHandler('./routes/wenku8/volume'));
|
|
1436
1429
|
|
|
1437
1430
|
// 鲸跃汽车
|
|
1438
1431
|
router.get('/whalegogo/home', lazyloadRouteHandler('./routes/whalegogo/home'));
|
|
@@ -1830,6 +1823,7 @@ router.get('/maoyan/upcoming', lazyloadRouteHandler('./routes/maoyan/upcoming'))
|
|
|
1830
1823
|
|
|
1831
1824
|
// cnBeta
|
|
1832
1825
|
router.get('/cnbeta', lazyloadRouteHandler('./routes/cnbeta/home'));
|
|
1826
|
+
router.get('/cnbeta/topic/:topic_id', lazyloadRouteHandler('./routes/cnbeta/topic'));
|
|
1833
1827
|
|
|
1834
1828
|
// 国家退伍士兵信息
|
|
1835
1829
|
router.get('/gov/veterans/:type', lazyloadRouteHandler('./routes/gov/veterans/china'));
|
|
@@ -2859,8 +2853,9 @@ router.get('/lntu/jwnews', lazyloadRouteHandler('./routes/universities/lntu/jwne
|
|
|
2859
2853
|
// 51voa
|
|
2860
2854
|
router.get('/51voa/:channel', lazyloadRouteHandler('./routes/51voa/channel'));
|
|
2861
2855
|
|
|
2862
|
-
//
|
|
2863
|
-
router.get('/
|
|
2856
|
+
// 追新番
|
|
2857
|
+
router.get('/fanxinzhui', lazyloadRouteHandler('./routes/fanxinzhui/latest'));
|
|
2858
|
+
router.get('/zhuixinfan/list', lazyloadRouteHandler('./routes/fanxinzhui/latest'));
|
|
2864
2859
|
|
|
2865
2860
|
// scoresaber
|
|
2866
2861
|
router.get('/scoresaber/user/:id', lazyloadRouteHandler('./routes/scoresaber/user'));
|
|
@@ -3366,7 +3361,7 @@ router.get('/chuhaibiji', lazyloadRouteHandler('./routes/chuhaibiji/index'));
|
|
|
3366
3361
|
router.get('/blogs/jianning', lazyloadRouteHandler('./routes/blogs/jianning'));
|
|
3367
3362
|
|
|
3368
3363
|
// 妖火网
|
|
3369
|
-
router.get('/yaohuo/:type?', lazyloadRouteHandler('./routes/yaohuo/index'));
|
|
3364
|
+
// router.get('/yaohuo/:type?', lazyloadRouteHandler('./routes/yaohuo/index'));
|
|
3370
3365
|
|
|
3371
3366
|
// 互动吧
|
|
3372
3367
|
router.get('/hudongba/:city/:id', lazyloadRouteHandler('./routes/hudongba/index'));
|
|
@@ -4048,7 +4043,7 @@ router.get('/trakt/collection/:username/:type?', lazyloadRouteHandler('./routes/
|
|
|
4048
4043
|
router.get('/ccg/:category?', lazyloadRouteHandler('./routes/ccg/index'));
|
|
4049
4044
|
|
|
4050
4045
|
// 少女前线
|
|
4051
|
-
router.get('/gf-cn/news/:category?', lazyloadRouteHandler('./routes/gf-cn/news'));
|
|
4046
|
+
// router.get('/gf-cn/news/:category?', lazyloadRouteHandler('./routes/gf-cn/news'));
|
|
4052
4047
|
|
|
4053
4048
|
// Eagle
|
|
4054
4049
|
router.get('/eagle/changelog/:language?', lazyloadRouteHandler('./routes/eagle/changelog'));
|
|
@@ -4079,8 +4074,8 @@ router.get('/liyuan-forums/threads/topic/:topic_id', lazyloadRouteHandler('./rou
|
|
|
4079
4074
|
router.get('/liyuan-forums/threads/user/:user_id', lazyloadRouteHandler('./routes/liyuan-forums/threads'));
|
|
4080
4075
|
|
|
4081
4076
|
// 集思录
|
|
4082
|
-
router.get('/jisilu/reply/:user', lazyloadRouteHandler('./routes/jisilu/reply'));
|
|
4083
|
-
router.get('/jisilu/topic/:user', lazyloadRouteHandler('./routes/jisilu/topic'));
|
|
4077
|
+
// router.get('/jisilu/reply/:user', lazyloadRouteHandler('./routes/jisilu/reply'));
|
|
4078
|
+
// router.get('/jisilu/topic/:user', lazyloadRouteHandler('./routes/jisilu/topic'));
|
|
4084
4079
|
|
|
4085
4080
|
// Constitutional Court of Baden-Württemberg (Germany)
|
|
4086
4081
|
router.get('/verfghbw/press/:keyword?', lazyloadRouteHandler('./routes/verfghbw/press'));
|
|
@@ -4165,9 +4160,6 @@ router.get('/harvard/health/blog', lazyloadRouteHandler('./routes/universities/h
|
|
|
4165
4160
|
// yuzu emulator
|
|
4166
4161
|
router.get('/yuzu-emu/entry', lazyloadRouteHandler('./routes/yuzu-emu/entry'));
|
|
4167
4162
|
|
|
4168
|
-
// 温州大学
|
|
4169
|
-
router.get('/wzu/news', lazyloadRouteHandler('./routes/universities/wzu/news'));
|
|
4170
|
-
|
|
4171
4163
|
// Resources - The Partnership on AI
|
|
4172
4164
|
router.get('/partnershiponai/resources', lazyloadRouteHandler('./routes/partnershiponai/resources'));
|
|
4173
4165
|
|
|
@@ -4230,6 +4222,12 @@ router.get('/now/news/rank', lazyloadRouteHandler('./routes/now/rank'));
|
|
|
4230
4222
|
// s-hentai
|
|
4231
4223
|
router.get('/s-hentai/:id?', lazyloadRouteHandler('./routes/s-hentai'));
|
|
4232
4224
|
|
|
4225
|
+
// etherscan
|
|
4226
|
+
router.get('/etherscan/transactions/:address', lazyloadRouteHandler('./routes/etherscan/transactions'));
|
|
4227
|
+
|
|
4228
|
+
// foreverblog
|
|
4229
|
+
router.get('/blogs/foreverblog', lazyloadRouteHandler('./routes/blogs/foreverblog'));
|
|
4230
|
+
|
|
4233
4231
|
// Netflix
|
|
4234
4232
|
router.get('/netflix/newsroom/:category?/:region?', lazyloadRouteHandler('./routes/netflix/newsroom'));
|
|
4235
4233
|
|
|
@@ -4263,4 +4261,9 @@ router.get('/dykszx/news/:type?', lazyloadRouteHandler('./routes/dykszx/news'));
|
|
|
4263
4261
|
router.get('/secrss/category/:category?', lazyloadRouteHandler('./routes/secrss/category'));
|
|
4264
4262
|
router.get('/secrss/author/:author?', lazyloadRouteHandler('./routes/secrss/author'));
|
|
4265
4263
|
|
|
4264
|
+
// 星球日报
|
|
4265
|
+
router.get('/odaily/newsflash', require('./routes/odaily/newsflash'));
|
|
4266
|
+
router.get('/odaily/user/:id', require('./routes/odaily/user'));
|
|
4267
|
+
router.get('/odaily/:id?', require('./routes/odaily/post'));
|
|
4268
|
+
|
|
4266
4269
|
module.exports = router;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
const got = require('@/utils/got');
|
|
2
2
|
|
|
3
3
|
module.exports = async (ctx) => {
|
|
4
|
-
|
|
5
4
|
const response = await got({
|
|
6
5
|
method: 'get',
|
|
7
6
|
url: 'https://www.arknights.jp:10014/news?lang=ja&limit=9&page=1',
|
|
@@ -12,7 +11,7 @@ module.exports = async (ctx) => {
|
|
|
12
11
|
title: item.title,
|
|
13
12
|
description: item.content[0].value,
|
|
14
13
|
pubDate: item.publishedAt,
|
|
15
|
-
link: `https://www.arknights.jp/news/${item.id}
|
|
14
|
+
link: `https://www.arknights.jp/news/${item.id}`,
|
|
16
15
|
}));
|
|
17
16
|
|
|
18
17
|
ctx.state.data = {
|
|
@@ -22,5 +21,4 @@ module.exports = async (ctx) => {
|
|
|
22
21
|
language: 'ja',
|
|
23
22
|
item: newsList,
|
|
24
23
|
};
|
|
25
|
-
|
|
26
|
-
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const date = require('@/utils/date');
|
|
4
|
+
module.exports = async (ctx) => {
|
|
5
|
+
const topicUrl = `https://www.cnbeta.com/topics/${ctx.params.topic_id}.htm`;
|
|
6
|
+
const response = await got({
|
|
7
|
+
method: 'get',
|
|
8
|
+
url: topicUrl,
|
|
9
|
+
});
|
|
10
|
+
const $ = cheerio.load(response.data);
|
|
11
|
+
|
|
12
|
+
const topicInfo = $('div.cate-brief h2 b').text();
|
|
13
|
+
const news_list = $('div.item')
|
|
14
|
+
.map((i, item) => {
|
|
15
|
+
const title = $(item).find('dl dt a').text();
|
|
16
|
+
let href = $(item).find('dl dt a').attr('href');
|
|
17
|
+
if (href === undefined) {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
if (href.startsWith('//')) {
|
|
21
|
+
href = 'https:' + href;
|
|
22
|
+
}
|
|
23
|
+
const status = $(item).find('div.meta-data ul.status li')['0'].children[0].data;
|
|
24
|
+
const info = status.split(' ');
|
|
25
|
+
const author = info[0];
|
|
26
|
+
const pubDate = info[1] + ' ' + info[2];
|
|
27
|
+
return { title, href, author, pubDate };
|
|
28
|
+
})
|
|
29
|
+
.filter((x) => x)
|
|
30
|
+
.map((i, e) => e)
|
|
31
|
+
.get();
|
|
32
|
+
|
|
33
|
+
const ProcessFeed = (data) => {
|
|
34
|
+
const $ = cheerio.load(data);
|
|
35
|
+
|
|
36
|
+
// 移除6.18广告
|
|
37
|
+
$('.article-global').remove();
|
|
38
|
+
$('.article-topic').remove();
|
|
39
|
+
|
|
40
|
+
// 提取内容
|
|
41
|
+
return $('.article-summary p').html() + '<br>' + $('.article-content').html();
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const out = await Promise.all(
|
|
45
|
+
news_list.map(async (item) => {
|
|
46
|
+
const cache = await ctx.cache.get(item.href);
|
|
47
|
+
if (cache) {
|
|
48
|
+
return Promise.resolve(JSON.parse(cache));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const response = await got({
|
|
52
|
+
method: 'get',
|
|
53
|
+
url: item.href,
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
const description = ProcessFeed(response.data);
|
|
57
|
+
const single = {
|
|
58
|
+
title: item.title,
|
|
59
|
+
description,
|
|
60
|
+
pubDate: date(item.pubDate, +8),
|
|
61
|
+
link: item.href,
|
|
62
|
+
author: item.author,
|
|
63
|
+
};
|
|
64
|
+
ctx.cache.set(item.href, JSON.stringify(single));
|
|
65
|
+
return Promise.resolve(single);
|
|
66
|
+
})
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
ctx.state.data = {
|
|
70
|
+
title: `cnBeta专题 - ${topicInfo}`,
|
|
71
|
+
link: topicUrl,
|
|
72
|
+
item: out ?? [],
|
|
73
|
+
description: `cnBeta专题 - ${topicInfo}`,
|
|
74
|
+
};
|
|
75
|
+
};
|
|
@@ -75,7 +75,7 @@ const ProcessFeed = async (ctx, link, type) => {
|
|
|
75
75
|
|
|
76
76
|
const out = await Promise.all(
|
|
77
77
|
list.map(async (item) => {
|
|
78
|
-
const res = await got_ins.get(item.
|
|
78
|
+
const res = await got_ins.get(item.share.replace('www', 'm').replace('articles', 'article'));
|
|
79
79
|
|
|
80
80
|
const $ = cheerio.load(res.data);
|
|
81
81
|
|
|
@@ -12,8 +12,13 @@ module.exports = async (ctx) => {
|
|
|
12
12
|
} else {
|
|
13
13
|
items = await EhAPI.getSearchItems(ctx.cache, params, undefined, bittorrent);
|
|
14
14
|
}
|
|
15
|
+
let title = params;
|
|
16
|
+
const match = /f_search=([^&]+)/.exec(title);
|
|
17
|
+
if (match !== null) {
|
|
18
|
+
title = match[1];
|
|
19
|
+
}
|
|
15
20
|
ctx.state.data = {
|
|
16
|
-
title: 'E-Hentai Search',
|
|
21
|
+
title: title + ' - E-Hentai Search ',
|
|
17
22
|
link: `https://e-hentai.org/?${params}`,
|
|
18
23
|
item: items,
|
|
19
24
|
};
|
|
@@ -6,7 +6,7 @@ module.exports = async (ctx) => {
|
|
|
6
6
|
const bittorrent = ctx.params.bittorrent || false;
|
|
7
7
|
const items = await EhAPI.getTagItems(ctx.cache, tag, page, bittorrent);
|
|
8
8
|
ctx.state.data = {
|
|
9
|
-
title: 'E-Hentai
|
|
9
|
+
title: tag + ' - E-Hentai Tag',
|
|
10
10
|
link: `https://e-hentai.org/tag/${tag}`,
|
|
11
11
|
item: items,
|
|
12
12
|
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
3
|
+
|
|
4
|
+
module.exports = async (ctx) => {
|
|
5
|
+
const { address } = ctx.params;
|
|
6
|
+
|
|
7
|
+
const response = await got({
|
|
8
|
+
method: 'get',
|
|
9
|
+
url: `https://api.etherscan.io/api?module=account&action=txlist&address=${address}&page=1&offset=0&sort=desc`,
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
const list = response.data.result.slice(0, 20);
|
|
13
|
+
|
|
14
|
+
ctx.state.data = {
|
|
15
|
+
title: 'etherscan transactions',
|
|
16
|
+
link: 'https://etherscan.io/',
|
|
17
|
+
language: 'en',
|
|
18
|
+
description: 'ethereum address transactions',
|
|
19
|
+
item:
|
|
20
|
+
list &&
|
|
21
|
+
list.map((item) => {
|
|
22
|
+
const title = ` TransactionHash: ${item.hash} `;
|
|
23
|
+
const value = (parseFloat(item.value) / 10 ** 18).toFixed(8);
|
|
24
|
+
const description = `
|
|
25
|
+
From: ${item.from} <br> To: ${item.to} <br> Value: ${value} <br> Block: ${item.blockNumber}`;
|
|
26
|
+
const link = `https://etherscan.io/tx/${item.hash}`;
|
|
27
|
+
|
|
28
|
+
return {
|
|
29
|
+
title,
|
|
30
|
+
description,
|
|
31
|
+
link,
|
|
32
|
+
pubDate: parseDate(item.timestamp),
|
|
33
|
+
guid: item.hash,
|
|
34
|
+
};
|
|
35
|
+
}),
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const date = require('@/utils/date');
|
|
4
|
+
|
|
5
|
+
module.exports = async (ctx) => {
|
|
6
|
+
const rootUrl = 'http://www.fanxinzhui.com';
|
|
7
|
+
const currentUrl = `${rootUrl}/lastest`;
|
|
8
|
+
const response = await got({
|
|
9
|
+
method: 'get',
|
|
10
|
+
url: currentUrl,
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
const $ = cheerio.load(response.data);
|
|
14
|
+
|
|
15
|
+
const list = $('.la')
|
|
16
|
+
.slice(0, 10)
|
|
17
|
+
.map((_, item) => {
|
|
18
|
+
item = $(item);
|
|
19
|
+
const pubDate = item.find('.time');
|
|
20
|
+
|
|
21
|
+
pubDate.remove();
|
|
22
|
+
|
|
23
|
+
return {
|
|
24
|
+
title: item.text(),
|
|
25
|
+
pubDate: date(pubDate.text()),
|
|
26
|
+
link: `${rootUrl}${item.attr('href')}`,
|
|
27
|
+
};
|
|
28
|
+
})
|
|
29
|
+
.get();
|
|
30
|
+
|
|
31
|
+
const items = await Promise.all(
|
|
32
|
+
list.map(
|
|
33
|
+
async (item) =>
|
|
34
|
+
await ctx.cache.tryGet(item.link, async () => {
|
|
35
|
+
const detailResponse = await got({
|
|
36
|
+
method: 'get',
|
|
37
|
+
url: item.link,
|
|
38
|
+
});
|
|
39
|
+
const content = cheerio.load(detailResponse.data);
|
|
40
|
+
|
|
41
|
+
item.description = content('.middle_box').html();
|
|
42
|
+
|
|
43
|
+
return item;
|
|
44
|
+
})
|
|
45
|
+
)
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
ctx.state.data = {
|
|
49
|
+
title: '最近更新 - 追新番',
|
|
50
|
+
link: currentUrl,
|
|
51
|
+
item: items,
|
|
52
|
+
};
|
|
53
|
+
};
|
|
@@ -4,7 +4,8 @@ const cheerio = require('cheerio');
|
|
|
4
4
|
module.exports = async (ctx) => {
|
|
5
5
|
const since = ctx.params.since;
|
|
6
6
|
const language = ctx.params.language || '';
|
|
7
|
-
const
|
|
7
|
+
const spoken_language = ctx.params.spoken_language || '';
|
|
8
|
+
const url = `https://github.com/trending/${encodeURIComponent(language)}?since=${since}&spoken_language_code=${spoken_language}`;
|
|
8
9
|
|
|
9
10
|
const response = await got({
|
|
10
11
|
method: 'get',
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const timezone = require('@/utils/timezone');
|
|
3
|
+
|
|
4
|
+
module.exports = async (ctx) => {
|
|
5
|
+
const rootUrl = 'https://www.odaily.com';
|
|
6
|
+
const currentUrl = `${rootUrl}/api/pp/api/info-flow/newsflash_columns/newsflashes?b_id=&per_page=30`;
|
|
7
|
+
|
|
8
|
+
const response = await got({
|
|
9
|
+
method: 'get',
|
|
10
|
+
url: currentUrl,
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
const items = response.data.data.items.map((item) => ({
|
|
14
|
+
title: item.title,
|
|
15
|
+
link: item.news_url,
|
|
16
|
+
pubDate: timezone(new Date(item.published_at), +8),
|
|
17
|
+
description: `<p>${item.description}</p>`,
|
|
18
|
+
}));
|
|
19
|
+
|
|
20
|
+
ctx.state.data = {
|
|
21
|
+
title: '快讯 - Odaily星球日报',
|
|
22
|
+
link: `${rootUrl}/newsflash`,
|
|
23
|
+
item: items,
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const timezone = require('@/utils/timezone');
|
|
4
|
+
|
|
5
|
+
const titles = {
|
|
6
|
+
333: '新品',
|
|
7
|
+
331: 'DeFi',
|
|
8
|
+
334: 'NFT',
|
|
9
|
+
332: '存储',
|
|
10
|
+
330: '波卡',
|
|
11
|
+
297: '行情',
|
|
12
|
+
296: '活动',
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
module.exports = async (ctx) => {
|
|
16
|
+
const id = ctx.params.id || '333';
|
|
17
|
+
|
|
18
|
+
const rootUrl = 'https://www.odaily.com';
|
|
19
|
+
const currentUrl = `${rootUrl}/api/pp/api/app-front/feed-stream?feed_id=${id}&b_id=&per_page=10`;
|
|
20
|
+
|
|
21
|
+
const response = await got({
|
|
22
|
+
method: 'get',
|
|
23
|
+
url: currentUrl,
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const list = response.data.data.items.map((item) => ({
|
|
27
|
+
title: item.title,
|
|
28
|
+
link: `${rootUrl}/post/${item.entity_id}`,
|
|
29
|
+
pubDate: timezone(new Date(item.published_at), +8),
|
|
30
|
+
}));
|
|
31
|
+
|
|
32
|
+
const items = await Promise.all(
|
|
33
|
+
list.map(
|
|
34
|
+
async (item) =>
|
|
35
|
+
await ctx.cache.tryGet(item.link, async () => {
|
|
36
|
+
const detailResponse = await got({
|
|
37
|
+
method: 'get',
|
|
38
|
+
url: item.link,
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
const content = cheerio.load(detailResponse.data.match(/"content":"(.*)","extraction_tags":/)[1]);
|
|
42
|
+
|
|
43
|
+
content('img').each(function () {
|
|
44
|
+
content(this).attr('src', content(this).attr('src').replace(/\\"/g, ''));
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
item.description = content.html();
|
|
48
|
+
item.author = detailResponse.data.match(/"name":"(.*)","avatar_url"/)[1];
|
|
49
|
+
|
|
50
|
+
return item;
|
|
51
|
+
})
|
|
52
|
+
)
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
ctx.state.data = {
|
|
56
|
+
title: `${titles[id]} - Odaily星球日报`,
|
|
57
|
+
link: rootUrl,
|
|
58
|
+
item: items,
|
|
59
|
+
};
|
|
60
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const timezone = require('@/utils/timezone');
|
|
4
|
+
|
|
5
|
+
module.exports = async (ctx) => {
|
|
6
|
+
const id = ctx.params.id;
|
|
7
|
+
|
|
8
|
+
const rootUrl = 'https://www.odaily.com';
|
|
9
|
+
const currentUrl = `${rootUrl}/service/feed_stream/user/${id}?b_id=10&per_page=10`;
|
|
10
|
+
|
|
11
|
+
let author = '';
|
|
12
|
+
|
|
13
|
+
const response = await got({
|
|
14
|
+
method: 'get',
|
|
15
|
+
url: currentUrl,
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const list = response.data.data.items.data.map((item) => ({
|
|
19
|
+
title: item.title,
|
|
20
|
+
summary: item.summary,
|
|
21
|
+
link: `${rootUrl}/post/${item.entity_id}`,
|
|
22
|
+
pubDate: timezone(new Date(item.published_at), +8),
|
|
23
|
+
}));
|
|
24
|
+
|
|
25
|
+
const items = await Promise.all(
|
|
26
|
+
list.map(
|
|
27
|
+
async (item) =>
|
|
28
|
+
await ctx.cache.tryGet(item.link, async () => {
|
|
29
|
+
const detailResponse = await got({
|
|
30
|
+
method: 'get',
|
|
31
|
+
url: item.link,
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
const content = cheerio.load(detailResponse.data.match(/"content":"(.*)","extraction_tags":/)[1]);
|
|
35
|
+
|
|
36
|
+
content('img').each(function () {
|
|
37
|
+
content(this).attr('src', content(this).attr('src').replace(/\\"/g, ''));
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
item.description = content.html();
|
|
41
|
+
item.author = author = detailResponse.data.match(/"name":"(.*)","avatar_url"/)[1];
|
|
42
|
+
|
|
43
|
+
return item;
|
|
44
|
+
})
|
|
45
|
+
)
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
ctx.state.data = {
|
|
49
|
+
title: `${author} - Odaily星球日报`,
|
|
50
|
+
link: `${rootUrl}/user/${id}`,
|
|
51
|
+
item: items,
|
|
52
|
+
};
|
|
53
|
+
};
|
|
@@ -48,11 +48,27 @@ async function tickToken() {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
let tickTokenStarted = false;
|
|
52
|
+
|
|
53
|
+
async function startTickToken() {
|
|
54
|
+
if (!tickTokenStarted) {
|
|
55
|
+
// 如果tickToken没启动
|
|
56
|
+
tickTokenStarted = true;
|
|
57
|
+
await tickToken(); // 启动tickToken
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
async function waitForToken() {
|
|
62
|
+
while (!token) {
|
|
63
|
+
// eslint-disable-next-line no-await-in-loop
|
|
64
|
+
await new Promise((resolve) => setTimeout(resolve, 0));
|
|
54
65
|
}
|
|
55
66
|
return token;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
module.exports = async () => {
|
|
70
|
+
await startTickToken();
|
|
71
|
+
return waitForToken();
|
|
56
72
|
};
|
|
57
73
|
|
|
58
74
|
module.exports.tickToken = tickToken;
|
|
@@ -4,7 +4,7 @@ module.exports = async (ctx) => {
|
|
|
4
4
|
const api = 'https://www.secrss.com/api/articles?tag=';
|
|
5
5
|
let type = ctx.params.category;
|
|
6
6
|
if (type === undefined) {
|
|
7
|
-
type =
|
|
7
|
+
type = '';
|
|
8
8
|
}
|
|
9
9
|
const host = 'https://www.secrss.com';
|
|
10
10
|
const res = await got.get(`${api}${type}`);
|
|
@@ -13,7 +13,7 @@ module.exports = async (ctx) => {
|
|
|
13
13
|
const items = dataArray.map((item) => ({
|
|
14
14
|
title: item.title,
|
|
15
15
|
description: item.summary,
|
|
16
|
-
pubDate: new Date(item.published_at +
|
|
16
|
+
pubDate: new Date(item.published_at + ' GMT').toUTCString(),
|
|
17
17
|
link: `${host}/articles/${item.id}`,
|
|
18
18
|
}));
|
|
19
19
|
|
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
const got = require('@/utils/got');
|
|
2
2
|
const cheerio = require('cheerio');
|
|
3
3
|
|
|
4
|
-
const url_map = {
|
|
5
|
-
jxtz: '1804',
|
|
6
|
-
zjjz: '1809',
|
|
7
|
-
};
|
|
8
|
-
const Referer_map = {
|
|
9
|
-
jxtz: '/jxtz/',
|
|
10
|
-
zjjz: '/zjjz/',
|
|
11
|
-
};
|
|
12
4
|
const title_map = {
|
|
13
5
|
jxtz: '教学通知',
|
|
14
6
|
zjjz: '专家讲座',
|
|
@@ -22,17 +14,22 @@ module.exports = async (ctx) => {
|
|
|
22
14
|
const type = ctx.params.type || '';
|
|
23
15
|
const response = await got({
|
|
24
16
|
method: 'get',
|
|
25
|
-
url: `
|
|
26
|
-
headers: {
|
|
27
|
-
Referer: `http://jwch.fzu.edu.cn${Referer_map[type]}`,
|
|
28
|
-
},
|
|
17
|
+
url: `https://jwch.fzu.edu.cn/${type}.htm`,
|
|
29
18
|
});
|
|
30
|
-
const data = response.data
|
|
19
|
+
const data = response.data; // 获取页面 html 数据
|
|
20
|
+
|
|
21
|
+
const $ = cheerio.load(data);
|
|
22
|
+
const list = $('ul.list-gl'); // <li>s
|
|
31
23
|
|
|
32
|
-
const urls =
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
24
|
+
const urls = [];
|
|
25
|
+
|
|
26
|
+
const url_head = 'https://jwch.fzu.edu.cn/';
|
|
27
|
+
|
|
28
|
+
list.find('a').each(function () {
|
|
29
|
+
const a = $(this);
|
|
30
|
+
const url_part = a.attr('href');
|
|
31
|
+
urls.push(url_head + url_part);
|
|
32
|
+
});
|
|
36
33
|
|
|
37
34
|
const items = await Promise.all(
|
|
38
35
|
urls.map((item) =>
|
|
@@ -57,7 +54,7 @@ module.exports = async (ctx) => {
|
|
|
57
54
|
|
|
58
55
|
ctx.state.data = {
|
|
59
56
|
title: `福州大学教务处${title_map[type]}`,
|
|
60
|
-
link: `http://jwch.fzu.edu.cn
|
|
57
|
+
link: `http://jwch.fzu.edu.cn/${type}`,
|
|
61
58
|
description: `福州大学教务处${description_map[type]}`,
|
|
62
59
|
item: items,
|
|
63
60
|
};
|