rsshub 1.0.0-master.f97cdb2 → 1.0.0-master.fa3428f
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 +1 -1
- package/lib/config.js +3 -1
- package/lib/radar-rules.js +0 -92
- package/lib/router.js +68 -71
- package/lib/routes/tencent/wechat/miniprogram/framework.js +4 -2
- package/lib/utils/common-config.js +4 -0
- package/lib/utils/parse-date.js +8 -7
- package/lib/utils/rand-user-agent.js +29 -0
- package/lib/utils/request-wrapper.js +2 -5
- package/lib/utils/wechat-mp.js +106 -10
- package/lib/v2/agirls/index.js +6 -0
- package/lib/v2/bilibili/video.js +1 -0
- package/lib/v2/bookfere/category.js +36 -0
- package/lib/v2/bookfere/maintainer.js +3 -0
- package/lib/v2/bookfere/radar.js +11 -0
- package/lib/v2/bookfere/router.js +3 -0
- package/lib/v2/cankaoxiaoxi/index.js +81 -0
- package/lib/v2/cankaoxiaoxi/maintainer.js +3 -0
- package/lib/v2/cankaoxiaoxi/radar.js +61 -0
- package/lib/v2/cankaoxiaoxi/router.js +3 -0
- package/lib/{routes → v2}/cctv/category.js +1 -1
- package/lib/{routes → v2}/cctv/jx.js +6 -1
- package/lib/{routes → v2}/cctv/lm.js +1 -1
- package/lib/v2/cctv/maintainer.js +7 -0
- package/lib/v2/cctv/radar.js +41 -0
- package/lib/v2/cctv/router.js +7 -0
- package/lib/{routes → v2}/cctv/special.js +6 -4
- package/lib/{routes → v2}/cctv/utils/mzzlbg.js +8 -6
- package/lib/{routes → v2}/cctv/utils/news.js +25 -22
- package/lib/{routes → v2}/cctv/utils/xinwen1j1.js +20 -17
- package/lib/v2/cctv/xwlb.js +50 -0
- package/lib/v2/chinacef/experts.js +38 -0
- package/lib/v2/chinacef/hot.js +38 -0
- package/lib/v2/chinacef/index.js +39 -0
- package/lib/v2/chinacef/maintainer.js +5 -0
- package/lib/v2/chinacef/radar.js +25 -0
- package/lib/v2/chinacef/router.js +5 -0
- package/lib/v2/{wechat → chinacef}/templates/description.art +0 -0
- package/lib/v2/chinacef/utils.js +55 -0
- package/lib/v2/chinanews/index.js +65 -0
- package/lib/v2/chinanews/maintainer.js +3 -0
- package/lib/v2/chinanews/radar.js +13 -0
- package/lib/v2/chinanews/router.js +3 -0
- package/lib/v2/cnbeta/index.js +2 -1
- package/lib/v2/cnbeta/utils.js +1 -0
- package/lib/v2/dapenti/maintainer.js +4 -0
- package/lib/v2/dapenti/radar.js +27 -0
- package/lib/v2/dapenti/router.js +4 -0
- package/lib/{routes → v2}/dapenti/subject.js +1 -1
- package/lib/{routes → v2}/dapenti/tugua.js +1 -1
- package/lib/v2/dapenti/utils.js +75 -0
- package/lib/{routes → v2}/dongqiudi/daily.js +10 -13
- package/lib/v2/dongqiudi/maintainer.js +8 -0
- package/lib/{routes → v2}/dongqiudi/player_news.js +0 -0
- package/lib/v2/dongqiudi/radar.js +45 -0
- package/lib/{routes → v2}/dongqiudi/result.js +2 -1
- package/lib/v2/dongqiudi/router.js +8 -0
- package/lib/{routes → v2}/dongqiudi/special.js +0 -0
- package/lib/{routes → v2}/dongqiudi/team_news.js +0 -0
- package/lib/{routes → v2}/dongqiudi/top_news.js +12 -15
- package/lib/{routes → v2}/dongqiudi/utils.js +47 -28
- package/lib/v2/dut/defaults.js +53 -0
- package/lib/v2/dut/index.js +78 -0
- package/lib/v2/dut/maintainer.js +14 -0
- package/lib/v2/dut/radar.js +109 -0
- package/lib/v2/dut/router.js +4 -0
- package/lib/v2/dut/shortcuts.js +77 -0
- package/lib/{routes → v2}/dx2025/index.js +0 -0
- package/lib/v2/dx2025/maintainer.js +3 -0
- package/lib/v2/dx2025/radar.js +19 -0
- package/lib/v2/dx2025/router.js +3 -0
- package/lib/v2/e-hentai/radar.js +21 -3
- package/lib/v2/eagle/blog.js +47 -0
- package/lib/{routes → v2}/eagle/changelog.js +3 -1
- package/lib/v2/eagle/maintainer.js +4 -0
- package/lib/v2/eagle/radar.js +101 -0
- package/lib/v2/eagle/router.js +4 -0
- package/lib/{routes → v2}/ehentai/ehapi.js +50 -21
- package/lib/{routes → v2}/ehentai/favorites.js +4 -2
- package/lib/v2/ehentai/maintainer.js +5 -0
- package/lib/v2/ehentai/router.js +5 -0
- package/lib/{routes → v2}/ehentai/search.js +5 -3
- package/lib/{routes → v2}/ehentai/tag.js +4 -2
- package/lib/v2/firefox/index.js +7 -2
- package/lib/v2/fortunechina/index.js +1 -1
- package/lib/v2/github/comments.js +7 -0
- package/lib/v2/gitpod/blog.js +8 -0
- package/lib/v2/gov/maintainer.js +1 -0
- package/lib/v2/gov/nrta/news.js +63 -0
- package/lib/v2/gov/radar.js +11 -0
- package/lib/v2/gov/router.js +1 -0
- package/lib/v2/guancha/index.js +1 -1
- package/lib/v2/guangdiu/cheaps.js +28 -0
- package/lib/v2/guangdiu/index.js +44 -0
- package/lib/v2/guangdiu/maintainer.js +5 -0
- package/lib/v2/guangdiu/radar.js +25 -0
- package/lib/v2/guangdiu/rank.js +38 -0
- package/lib/v2/guangdiu/router.js +5 -0
- package/lib/{routes/guokr/calendar.js → v2/guokr/channel.js} +2 -2
- package/lib/v2/guokr/maintainer.js +4 -0
- package/lib/v2/guokr/radar.js +19 -0
- package/lib/v2/guokr/router.js +4 -0
- package/lib/{routes → v2}/guokr/scientific.js +3 -3
- package/lib/v2/hkej/index.js +9 -15
- package/lib/v2/hkepc/index.js +8 -0
- package/lib/v2/hket/index.js +10 -2
- package/lib/v2/huangz/index.js +29 -0
- package/lib/v2/huangz/maintainer.js +3 -0
- package/lib/v2/huangz/radar.js +13 -0
- package/lib/v2/huangz/router.js +3 -0
- package/lib/v2/huanqiu/index.js +65 -0
- package/lib/v2/huanqiu/maintainer.js +3 -0
- package/lib/v2/huanqiu/radar.js +13 -0
- package/lib/v2/huanqiu/router.js +3 -0
- package/lib/v2/miris/blog.js +19 -0
- package/lib/v2/miris/maintainer.js +3 -0
- package/lib/v2/miris/radar.js +11 -0
- package/lib/v2/miris/router.js +3 -0
- package/lib/v2/news/whxw.js +2 -2
- package/lib/v2/npm/package.js +1 -1
- package/lib/v2/npm/router.js +1 -1
- package/lib/v2/qbittorrent/maintainer.js +3 -0
- package/lib/v2/qbittorrent/news.js +59 -0
- package/lib/v2/qbittorrent/radar.js +13 -0
- package/lib/v2/qbittorrent/router.js +3 -0
- package/lib/v2/rsshub/sponsors.js +1 -0
- package/lib/{routes → v2}/sciencenet/blog.js +17 -12
- package/lib/v2/sciencenet/maintainer.js +4 -0
- package/lib/v2/sciencenet/radar.js +19 -0
- package/lib/v2/sciencenet/router.js +4 -0
- package/lib/v2/sciencenet/user.js +65 -0
- package/lib/v2/sdu/cmse.js +59 -0
- package/lib/v2/sdu/cs.js +57 -0
- package/lib/v2/sdu/data.js +110 -0
- package/lib/v2/sdu/epe.js +55 -0
- package/lib/v2/sdu/extractor/index.js +15 -0
- package/lib/v2/sdu/extractor/sdrj.js +21 -0
- package/lib/v2/sdu/extractor/view.js +21 -0
- package/lib/v2/sdu/extractor/wh/jwc.js +24 -0
- package/lib/v2/sdu/extractor/wh/news.js +21 -0
- package/lib/v2/sdu/maintainer.js +9 -0
- package/lib/v2/sdu/mech.js +60 -0
- package/lib/v2/sdu/radar.js +159 -0
- package/lib/v2/sdu/router.js +9 -0
- package/lib/v2/sdu/sc.js +61 -0
- package/lib/v2/sdu/wh/jwc.js +42 -0
- package/lib/v2/sdu/wh/news.js +38 -0
- package/lib/v2/stratechery/index.js +20 -0
- package/lib/v2/stratechery/maintainer.js +3 -0
- package/lib/v2/stratechery/radar.js +11 -0
- package/lib/v2/stratechery/router.js +3 -0
- package/lib/{routes → v2}/taptap/changelog.js +2 -1
- package/lib/v2/taptap/maintainer.js +5 -0
- package/lib/v2/taptap/radar.js +25 -0
- package/lib/v2/taptap/review.js +69 -0
- package/lib/v2/taptap/router.js +5 -0
- package/lib/v2/taptap/templates/videoPost.art +2 -0
- package/lib/v2/taptap/topic.js +79 -0
- package/lib/v2/taptap/utils.js +48 -0
- package/lib/v2/thecover/channel.js +66 -0
- package/lib/v2/thecover/maintainer.js +3 -0
- package/lib/v2/thecover/radar.js +13 -0
- package/lib/v2/thecover/router.js +3 -0
- package/lib/{routes → v2}/twreporter/category.js +7 -12
- package/lib/{routes → v2}/twreporter/fetch_article.js +5 -4
- package/lib/v2/twreporter/maintainer.js +5 -0
- package/lib/{routes → v2}/twreporter/newest.js +8 -13
- package/lib/v2/twreporter/photography.js +46 -0
- package/lib/v2/twreporter/radar.js +25 -0
- package/lib/v2/twreporter/router.js +5 -0
- package/lib/{routes/tencent → v2}/wechat/announce.js +3 -2
- package/lib/v2/wechat/ce.js +69 -0
- package/lib/v2/wechat/data258.js +137 -0
- package/lib/v2/wechat/ershcimi.js +35 -0
- package/lib/{routes/tencent → v2}/wechat/feeds.js +0 -0
- package/lib/v2/wechat/maintainer.js +11 -0
- package/lib/{routes/tencent → v2}/wechat/mp.js +0 -0
- package/lib/{routes/tencent → v2}/wechat/msgalbum.js +0 -0
- package/lib/v2/wechat/radar.js +76 -1
- package/lib/v2/wechat/router.js +11 -0
- package/lib/{routes/tencent → v2}/wechat/tgchannel.js +0 -0
- package/lib/{routes/tencent → v2}/wechat/uread.js +0 -0
- package/lib/{routes/tencent → v2}/wechat/wemp.js +0 -0
- package/lib/{routes/tencent → v2}/wechat/wxnmh.js +0 -0
- package/lib/{routes → v2}/xueqiu/favorite.js +2 -1
- package/lib/v2/xueqiu/fund.js +50 -0
- package/lib/{routes → v2}/xueqiu/hots.js +2 -1
- package/lib/v2/xueqiu/maintainer.js +10 -0
- package/lib/v2/xueqiu/radar.js +60 -0
- package/lib/v2/xueqiu/router.js +10 -0
- package/lib/{routes → v2}/xueqiu/snb.js +2 -1
- package/lib/{routes → v2}/xueqiu/stock_comments.js +4 -20
- package/lib/{routes → v2}/xueqiu/stock_info.js +2 -1
- package/lib/v2/xueqiu/templates/comments_description.art +10 -0
- package/lib/{routes → v2}/xueqiu/user.js +2 -1
- package/lib/{routes → v2}/xueqiu/user_stock.js +3 -2
- package/lib/v2/yunspe/maintainer.js +3 -0
- package/lib/v2/yunspe/newsflash.js +42 -0
- package/lib/v2/yunspe/radar.js +13 -0
- package/lib/v2/yunspe/router.js +3 -0
- package/lib/{routes → v2}/yystv/category.js +8 -8
- package/lib/{routes → v2}/yystv/docs.js +2 -2
- package/lib/v2/yystv/maintainer.js +4 -0
- package/lib/v2/yystv/radar.js +49 -0
- package/lib/v2/yystv/router.js +4 -0
- package/lib/{routes/universities → v2}/zju/career/index.js +14 -13
- package/lib/{routes/universities → v2}/zju/cst/custom.js +2 -1
- package/lib/{routes/universities → v2}/zju/cst/index.js +20 -24
- package/lib/v2/zju/grs/index.js +43 -0
- package/lib/v2/zju/list.js +66 -0
- package/lib/v2/zju/maintainer.js +8 -0
- package/lib/v2/zju/physics/index.js +52 -0
- package/lib/v2/zju/radar.js +139 -0
- package/lib/v2/zju/router.js +8 -0
- package/lib/views/atom.art +13 -1
- package/lib/views/welcome.art +4 -1
- package/package.json +13 -12
- package/lib/routes/cctv/xwlb.js +0 -48
- package/lib/routes/dapenti/utils.js +0 -73
- package/lib/routes/taptap/review.js +0 -39
- package/lib/routes/taptap/topic.js +0 -85
- package/lib/routes/tencent/wechat/_README +0 -1
- package/lib/routes/tencent/wechat/ce.js +0 -40
- package/lib/routes/tencent/wechat/ershcimi.js +0 -43
- package/lib/routes/twreporter/photography.js +0 -57
- package/lib/routes/universities/dut/index.js +0 -60
- package/lib/routes/universities/dut/subsite.js +0 -50
- package/lib/routes/universities/sdu/cmse.js +0 -55
- package/lib/routes/universities/sdu/cs.js +0 -55
- package/lib/routes/universities/sdu/epe.js +0 -54
- package/lib/routes/universities/sdu/mech.js +0 -58
- package/lib/routes/universities/sdu/sc.js +0 -56
- package/lib/routes/universities/zju/grs/index.js +0 -44
- package/lib/routes/universities/zju/list.js +0 -78
- package/lib/routes/universities/zju/physics/index.js +0 -55
- package/lib/routes/xueqiu/fund.js +0 -71
- package/lib/v2/wechat/templates/image.art +0 -1
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
news: {
|
|
3
|
+
xwjj: 'xwjj01',
|
|
4
|
+
rcpy: 'xwjj01/rcpy',
|
|
5
|
+
kxyj: 'xwjj01/kxyj',
|
|
6
|
+
jlhz: 'xwjj01-kxyj',
|
|
7
|
+
yxfc: 'yxfc1',
|
|
8
|
+
dgrw: 'dgrw/dgrw1',
|
|
9
|
+
yxdg: 'yxdg1',
|
|
10
|
+
mtdg: 'mtdg/mtdg',
|
|
11
|
+
},
|
|
12
|
+
teach: {
|
|
13
|
+
xwkd: 'xwkd/xwkd',
|
|
14
|
+
zytg: 'zytg/zytg',
|
|
15
|
+
bhgs: 'zytg/bhgs',
|
|
16
|
+
},
|
|
17
|
+
perdep: {
|
|
18
|
+
tzgg: 'tzgg/tzgg',
|
|
19
|
+
gzdt: 'gzdt/gzdt1',
|
|
20
|
+
zcfg: 'zcfg/zcfg',
|
|
21
|
+
},
|
|
22
|
+
gs: {
|
|
23
|
+
gzdt: 'gzdt1',
|
|
24
|
+
zcfg: 'zcfg/zcfg',
|
|
25
|
+
},
|
|
26
|
+
ssdut: {
|
|
27
|
+
jdxw: 'ywgg/xueyuanxinwen/jdxw',
|
|
28
|
+
zhxw: 'ywgg/xueyuanxinwen',
|
|
29
|
+
xytz: 'index/xytz',
|
|
30
|
+
xsdt: 'index/xsdt',
|
|
31
|
+
bkstz: 'index/bkstz',
|
|
32
|
+
yjstz: 'yjspy/yjspy/yjstz',
|
|
33
|
+
},
|
|
34
|
+
eda: {
|
|
35
|
+
tzgg: 'tzgg/tzgg',
|
|
36
|
+
xqxw: 'xqxw/xqxw',
|
|
37
|
+
},
|
|
38
|
+
panjin: {
|
|
39
|
+
xqxw: 'index/xqxw',
|
|
40
|
+
xywh: 'index/xywh',
|
|
41
|
+
xyfc: 'index/xyfc',
|
|
42
|
+
xsdt: 'index/xsdt',
|
|
43
|
+
mtbd: 'index/mtbd',
|
|
44
|
+
gg: 'index/gg',
|
|
45
|
+
},
|
|
46
|
+
xsgzb: {
|
|
47
|
+
zytz: 'index/zytz',
|
|
48
|
+
xgdt: 'index/xgdt',
|
|
49
|
+
gsgonggao: 'index/gsgonggao',
|
|
50
|
+
},
|
|
51
|
+
pjteach: {
|
|
52
|
+
xwkd: 'index/xwkd',
|
|
53
|
+
zytz: 'index/zytz',
|
|
54
|
+
xkyks: 'index/xkyks',
|
|
55
|
+
jxwj: 'index/jxwj',
|
|
56
|
+
cjwt: 'index/cjwt',
|
|
57
|
+
},
|
|
58
|
+
pjxqzwb: {
|
|
59
|
+
tzgg: 'index/tzgg',
|
|
60
|
+
zwkx: 'index/zwkx',
|
|
61
|
+
},
|
|
62
|
+
tjpj: {
|
|
63
|
+
xyxw: 'index/xyxw',
|
|
64
|
+
zxgg: 'index/zxgg',
|
|
65
|
+
},
|
|
66
|
+
dutdice: {
|
|
67
|
+
jstz: 'tzgg/jstz',
|
|
68
|
+
xstong_zhi: 'tzgg/xstong_zhi',
|
|
69
|
+
xwsd: 'xwsd/xxxw',
|
|
70
|
+
},
|
|
71
|
+
tycgzx: {
|
|
72
|
+
tzgg: 'tzgg/tzgg',
|
|
73
|
+
hdrc: 'hdrc/hdrc',
|
|
74
|
+
xwdt: 'xwdt/xwdt',
|
|
75
|
+
jkzs: 'jkzs/jkzs1',
|
|
76
|
+
},
|
|
77
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'dx2025.com': {
|
|
3
|
+
_name: '东西智库',
|
|
4
|
+
'.': [
|
|
5
|
+
{
|
|
6
|
+
title: '分类',
|
|
7
|
+
docs: 'https://docs.rsshub.app/multimedia.html#e-hentai-fen-lei',
|
|
8
|
+
source: ['/archives/category/:type/:category?', '/archives/category/:type'],
|
|
9
|
+
target: (params) => `/dx2025/${params.type}/${params.category ? params.category : ''}`,
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
title: '标签',
|
|
13
|
+
docs: 'https://docs.rsshub.app/multimedia.html#e-hentai-biao-qian',
|
|
14
|
+
source: ['/archives/tag/:tag'],
|
|
15
|
+
target: '/dx2025/tag/:tag',
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
};
|
package/lib/v2/e-hentai/radar.js
CHANGED
|
@@ -6,19 +6,37 @@ module.exports = {
|
|
|
6
6
|
title: '分类',
|
|
7
7
|
docs: 'https://docs.rsshub.app/multimedia.html#e-hentai-fen-lei',
|
|
8
8
|
source: ['/:category', '/'],
|
|
9
|
-
target: '/e-hentai/category/:category
|
|
9
|
+
target: '/e-hentai/category/:category',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
title: '收藏',
|
|
13
|
+
docs: 'https://docs.rsshub.app/picture.html#e-hentai',
|
|
14
|
+
source: ['/favorites.php', '/'],
|
|
15
|
+
target: (_params, url) => `/ehentai/favorites/${new URL(url).searchParams.get('favcat')}`,
|
|
10
16
|
},
|
|
11
17
|
{
|
|
12
18
|
title: '标签',
|
|
13
19
|
docs: 'https://docs.rsshub.app/multimedia.html#e-hentai-biao-qian',
|
|
14
20
|
source: ['/tag/:tag', '/'],
|
|
15
|
-
target: '/e-hentai/tag/:tag
|
|
21
|
+
target: '/e-hentai/tag/:tag',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
title: '标签',
|
|
25
|
+
docs: 'https://docs.rsshub.app/picture.html#e-hentai',
|
|
26
|
+
source: ['/tag/:tag', '/'],
|
|
27
|
+
target: '/ehentai/tag/:tag',
|
|
16
28
|
},
|
|
17
29
|
{
|
|
18
30
|
title: '搜索',
|
|
19
31
|
docs: 'https://docs.rsshub.app/multimedia.html#e-hentai-sou-suo',
|
|
20
32
|
source: ['/:keyword', '/'],
|
|
21
|
-
target: '/e-hentai/search/:keyword
|
|
33
|
+
target: '/e-hentai/search/:keyword',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
title: '搜索',
|
|
37
|
+
docs: 'https://docs.rsshub.app/picture.html#e-hentai',
|
|
38
|
+
source: ['/'],
|
|
39
|
+
target: (_params, url) => `/ehentai/search/${new URL(url).searchParams.get('f_search')}`,
|
|
22
40
|
},
|
|
23
41
|
],
|
|
24
42
|
},
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
4
|
+
|
|
5
|
+
const cateList = ['all', 'design-resources', 'learn-design', 'inside-eagle'];
|
|
6
|
+
|
|
7
|
+
module.exports = async (ctx) => {
|
|
8
|
+
let cate = ctx.params.cate ?? 'all';
|
|
9
|
+
let language = ctx.params.language ?? 'cn';
|
|
10
|
+
if (cateList.indexOf(cate) === -1) {
|
|
11
|
+
language = cate;
|
|
12
|
+
cate = 'all';
|
|
13
|
+
}
|
|
14
|
+
const host = `https://${language}.eagle.cool`;
|
|
15
|
+
const url = `${host}/blog/${cate === 'all' ? '' : cate}`;
|
|
16
|
+
|
|
17
|
+
const response = await got(url);
|
|
18
|
+
const $ = cheerio.load(response.data);
|
|
19
|
+
const title = $('div.categories-list > div > div > div > ul > li.active').text();
|
|
20
|
+
const list = $('div.post-item')
|
|
21
|
+
.map((_index, item) => ({
|
|
22
|
+
title: $(item).find('div.title').text(),
|
|
23
|
+
link: new URL($(item).find('a').attr('href'), host).href,
|
|
24
|
+
pubDate: parseDate($(item).find('div.metas > a > span').text().replace('・', '')),
|
|
25
|
+
}))
|
|
26
|
+
.get();
|
|
27
|
+
|
|
28
|
+
const items = await Promise.all(
|
|
29
|
+
list.map((item) =>
|
|
30
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
31
|
+
const detailResponse = await got(item.link);
|
|
32
|
+
|
|
33
|
+
const content = cheerio.load(detailResponse.data);
|
|
34
|
+
|
|
35
|
+
item.description = content('div.post-html').html();
|
|
36
|
+
|
|
37
|
+
return item;
|
|
38
|
+
})
|
|
39
|
+
)
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
ctx.state.data = {
|
|
43
|
+
title: `eagle - ${title}`,
|
|
44
|
+
link: url,
|
|
45
|
+
item: items,
|
|
46
|
+
};
|
|
47
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const got = require('@/utils/got');
|
|
2
2
|
const cheerio = require('cheerio');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
3
4
|
|
|
4
5
|
module.exports = async (ctx) => {
|
|
5
6
|
let language = ctx.params.language;
|
|
@@ -67,7 +68,8 @@ module.exports = async (ctx) => {
|
|
|
67
68
|
title: item.find('.ver').text(),
|
|
68
69
|
description: item.find('.logs').html(),
|
|
69
70
|
link: `https://${language}.eagle.cool/changelog`,
|
|
70
|
-
pubDate:
|
|
71
|
+
pubDate: parseDate(getDate()),
|
|
72
|
+
guid: item.find('.ver').text(),
|
|
71
73
|
};
|
|
72
74
|
})
|
|
73
75
|
.get(),
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'eagle.cool': {
|
|
3
|
+
_name: 'Eagle',
|
|
4
|
+
cn: [
|
|
5
|
+
{
|
|
6
|
+
title: '更新日志',
|
|
7
|
+
docs: 'https://docs.rsshub.app/program-update.html#eagle',
|
|
8
|
+
source: '/changelog',
|
|
9
|
+
target: '/eagle/changelog/cn',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
title: '全部',
|
|
13
|
+
docs: 'https://docs.rsshub.app/design.html#eagle',
|
|
14
|
+
source: ['/blog'],
|
|
15
|
+
target: '/eagle/blog',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
title: '设计资源',
|
|
19
|
+
docs: 'https://docs.rsshub.app/design.html#eagle',
|
|
20
|
+
source: ['/blog/design-resources'],
|
|
21
|
+
target: '/eagle/blog/design-resources',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
title: '设计技巧',
|
|
25
|
+
docs: 'https://docs.rsshub.app/design.html#eagle',
|
|
26
|
+
source: ['/blog/learn-design'],
|
|
27
|
+
target: '/eagle/blog/learn-design',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
title: '最新消息',
|
|
31
|
+
docs: 'https://docs.rsshub.app/design.html#eagle',
|
|
32
|
+
source: ['/blog/inside-eagle'],
|
|
33
|
+
target: '/eagle/blog/inside-eagle',
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
tw: [
|
|
37
|
+
{
|
|
38
|
+
title: '更新日誌',
|
|
39
|
+
docs: 'https://docs.rsshub.app/program-update.html#eagle',
|
|
40
|
+
source: '/changelog',
|
|
41
|
+
target: '/eagle/changelog/tw',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
title: '全部',
|
|
45
|
+
docs: 'https://docs.rsshub.app/design.html#eagle',
|
|
46
|
+
source: ['/blog'],
|
|
47
|
+
target: '/eagle/blog/tw',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
title: '設計資源',
|
|
51
|
+
docs: 'https://docs.rsshub.app/design.html#eagle',
|
|
52
|
+
source: ['/blog/design-resources'],
|
|
53
|
+
target: '/eagle/blog/design-resources/tw',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
title: '設計技巧',
|
|
57
|
+
docs: 'https://docs.rsshub.app/design.html#eagle',
|
|
58
|
+
source: ['/blog/learn-design'],
|
|
59
|
+
target: '/eagle/blog/learn-design/tw',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
title: '最新消息',
|
|
63
|
+
docs: 'https://docs.rsshub.app/design.html#eagle',
|
|
64
|
+
source: ['/blog/inside-eagle'],
|
|
65
|
+
target: '/eagle/blog/inside-eagle/tw',
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
en: [
|
|
69
|
+
{
|
|
70
|
+
title: 'Release Notes',
|
|
71
|
+
docs: 'https://docs.rsshub.app/program-update.html#eagle',
|
|
72
|
+
source: '/changelog',
|
|
73
|
+
target: '/eagle/changelog/en',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
title: 'All',
|
|
77
|
+
docs: 'https://docs.rsshub.app/design.html#eagle',
|
|
78
|
+
source: ['/blog'],
|
|
79
|
+
target: '/eagle/blog/en',
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
title: 'Design Resources',
|
|
83
|
+
docs: 'https://docs.rsshub.app/design.html#eagle',
|
|
84
|
+
source: ['/blog/design-resources'],
|
|
85
|
+
target: '/eagle/blog/design-resources/en',
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
title: 'Learn Design',
|
|
89
|
+
docs: 'https://docs.rsshub.app/design.html#eagle',
|
|
90
|
+
source: ['/blog/learn-design'],
|
|
91
|
+
target: '/eagle/blog/learn-design/en',
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
title: 'Inside Eagle',
|
|
95
|
+
docs: 'https://docs.rsshub.app/design.html#eagle',
|
|
96
|
+
source: ['/blog/inside-eagle'],
|
|
97
|
+
target: '/eagle/blog/inside-eagle/en',
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
},
|
|
101
|
+
};
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
const got = require('@/utils/got');
|
|
2
|
+
const logger = require('@/utils/logger');
|
|
2
3
|
const cheerio = require('cheerio');
|
|
4
|
+
const path = require('path');
|
|
3
5
|
const config = require('@/config').value.ehentai;
|
|
4
6
|
|
|
5
7
|
const headers = {};
|
|
6
|
-
const has_cookie = config.ipb_member_id && config.ipb_pass_hash &&
|
|
8
|
+
const has_cookie = config.ipb_member_id && config.ipb_pass_hash && config.sk;
|
|
7
9
|
const from_ex = has_cookie && config.igneous;
|
|
8
10
|
if (has_cookie) {
|
|
9
11
|
if (from_ex) {
|
|
10
|
-
const { ipb_member_id, ipb_pass_hash, igneous } = config;
|
|
11
|
-
headers.cookie = `ipb_member_id=${ipb_member_id};ipb_pass_hash=${ipb_pass_hash};igneous=${igneous}`;
|
|
12
|
+
const { ipb_member_id, ipb_pass_hash, sk, igneous } = config;
|
|
13
|
+
headers.cookie = `ipb_member_id=${ipb_member_id};ipb_pass_hash=${ipb_pass_hash};sk=${sk};igneous=${igneous}`;
|
|
12
14
|
} else {
|
|
13
15
|
const { ipb_member_id, ipb_pass_hash, sk } = config;
|
|
14
16
|
headers.cookie = `ipb_member_id=${ipb_member_id};ipb_pass_hash=${ipb_pass_hash};sk=${sk}`;
|
|
@@ -23,26 +25,53 @@ function ehgot(url) {
|
|
|
23
25
|
}
|
|
24
26
|
}
|
|
25
27
|
|
|
26
|
-
|
|
28
|
+
function ehgot_thumb(cache, thumb_url) {
|
|
29
|
+
return cache.tryGet(thumb_url, async () => {
|
|
30
|
+
try {
|
|
31
|
+
const buffer = await got({ method: 'get', url: thumb_url, headers });
|
|
32
|
+
const data = new Buffer.from(buffer.rawBody).toString('base64');
|
|
33
|
+
const ext = path.extname(thumb_url).slice(1);
|
|
34
|
+
return `data:image/${ext};base64,${data}`;
|
|
35
|
+
} catch (e) {
|
|
36
|
+
logger.warn('Cannot download thumbnail: ' + thumb_url, e);
|
|
37
|
+
return thumb_url;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
async function parsePage(cache, data, get_bittorrent = false, embed_thumb = false) {
|
|
27
43
|
const $ = cheerio.load(data);
|
|
28
|
-
const table = $('table[class
|
|
44
|
+
const table = $('table[class^="itg glt"] tbody');
|
|
29
45
|
if (!table) {
|
|
30
46
|
return [];
|
|
31
47
|
}
|
|
32
48
|
|
|
33
49
|
async function parseTableRow(cache, element) {
|
|
34
50
|
const el = $(element);
|
|
35
|
-
const
|
|
36
|
-
const el_img = el.find('td.gl2c div.glthumb div img');
|
|
37
|
-
const title = el_a.find('div.glink').html();
|
|
38
|
-
const thumbnail = el_img.attr('data-src') ? el_img.attr('data-src') : el_img.attr('src');
|
|
39
|
-
const description = `<img src='${thumbnail}' alt='thumbnail'>`;
|
|
51
|
+
const title = el.find('div.glink').html();
|
|
40
52
|
const pubDate = el.find('div[id^="posted_"]').html();
|
|
53
|
+
// match "Minimal", "Minimal+" and "Compact"
|
|
54
|
+
let el_a = el.find('td[class^="gl3"] a');
|
|
55
|
+
let el_img = el.find('td[class^=gl2] div.glthumb div img');
|
|
56
|
+
// if not, match "Extended"
|
|
57
|
+
if (!(el_a.length && el_img.length)) {
|
|
58
|
+
el_a = el.find('td[class^="gl1"] a');
|
|
59
|
+
el_img = el_a.find('img');
|
|
60
|
+
}
|
|
41
61
|
const link = el_a.attr('href');
|
|
62
|
+
let thumbnail = el_img.attr('data-src') ? el_img.attr('data-src') : el_img.attr('src');
|
|
63
|
+
if (config.img_proxy && thumbnail) {
|
|
64
|
+
const url = new URL(thumbnail);
|
|
65
|
+
thumbnail = config.img_proxy + url.pathname + url.search;
|
|
66
|
+
}
|
|
67
|
+
if (embed_thumb && thumbnail) {
|
|
68
|
+
thumbnail = await ehgot_thumb(cache, thumbnail);
|
|
69
|
+
}
|
|
70
|
+
const description = `<img src='${thumbnail}' alt='thumbnail'>`;
|
|
42
71
|
if (title && link) {
|
|
43
72
|
const item = { title, description, pubDate, link };
|
|
44
73
|
if (get_bittorrent) {
|
|
45
|
-
const el_down = el.find('
|
|
74
|
+
const el_down = el.find('div.gldown');
|
|
46
75
|
const bittorrent_page_url = el_down.find('a').attr('href');
|
|
47
76
|
if (bittorrent_page_url) {
|
|
48
77
|
const bittorrent_url = await getBittorrent(cache, bittorrent_page_url);
|
|
@@ -113,31 +142,31 @@ function updateBittorrent_url(cache, items) {
|
|
|
113
142
|
return items;
|
|
114
143
|
}
|
|
115
144
|
|
|
116
|
-
async function gatherItemsByPage(cache, url, get_bittorrent = false) {
|
|
145
|
+
async function gatherItemsByPage(cache, url, get_bittorrent = false, embed_thumb = false) {
|
|
117
146
|
const response = await ehgot(url);
|
|
118
|
-
const items = await parsePage(cache, response.data, get_bittorrent);
|
|
147
|
+
const items = await parsePage(cache, response.data, get_bittorrent, embed_thumb);
|
|
119
148
|
return updateBittorrent_url(cache, items);
|
|
120
149
|
}
|
|
121
150
|
|
|
122
|
-
async function getFavoritesItems(cache, page, favcat, inline_set, get_bittorrent = false) {
|
|
151
|
+
async function getFavoritesItems(cache, page, favcat, inline_set, get_bittorrent = false, embed_thumb = false) {
|
|
123
152
|
const response = await ehgot(`favorites.php?favcat=${favcat}&inline_set=${inline_set}`);
|
|
124
153
|
if (parseInt(page) === 0) {
|
|
125
|
-
const items = await parsePage(cache, response.data, get_bittorrent);
|
|
154
|
+
const items = await parsePage(cache, response.data, get_bittorrent, embed_thumb);
|
|
126
155
|
return updateBittorrent_url(cache, items);
|
|
127
156
|
}
|
|
128
|
-
return gatherItemsByPage(cache, `favorites.php?page=${page}&favcat=${favcat}`, get_bittorrent);
|
|
157
|
+
return gatherItemsByPage(cache, `favorites.php?page=${page}&favcat=${favcat}`, get_bittorrent, embed_thumb);
|
|
129
158
|
}
|
|
130
159
|
|
|
131
|
-
function getSearchItems(cache, params, page = undefined, get_bittorrent = false) {
|
|
160
|
+
function getSearchItems(cache, params, page = undefined, get_bittorrent = false, embed_thumb = false) {
|
|
132
161
|
if (page) {
|
|
133
|
-
return gatherItemsByPage(cache, `?page=${page}&${params}`, get_bittorrent);
|
|
162
|
+
return gatherItemsByPage(cache, `?page=${page}&${params}`, get_bittorrent, embed_thumb);
|
|
134
163
|
} else {
|
|
135
|
-
return gatherItemsByPage(cache, `?${params}`, get_bittorrent);
|
|
164
|
+
return gatherItemsByPage(cache, `?${params}`, get_bittorrent, embed_thumb);
|
|
136
165
|
}
|
|
137
166
|
}
|
|
138
167
|
|
|
139
|
-
function getTagItems(cache, tag, page, get_bittorrent = false) {
|
|
140
|
-
return gatherItemsByPage(cache, `tag/${tag}/${page}`, get_bittorrent);
|
|
168
|
+
function getTagItems(cache, tag, page, get_bittorrent = false, embed_thumb = false) {
|
|
169
|
+
return gatherItemsByPage(cache, `tag/${tag}/${page}`, get_bittorrent, embed_thumb);
|
|
141
170
|
}
|
|
142
171
|
|
|
143
172
|
module.exports = { getFavoritesItems, getSearchItems, getTagItems, has_cookie, from_ex };
|
|
@@ -6,9 +6,11 @@ module.exports = async (ctx) => {
|
|
|
6
6
|
}
|
|
7
7
|
const favcat = ctx.params.favcat ? parseInt(ctx.params.favcat) : 0;
|
|
8
8
|
const page = ctx.params.page ? parseInt(ctx.params.page) : 0;
|
|
9
|
-
const
|
|
9
|
+
const routeParams = new URLSearchParams(ctx.params.routeParams);
|
|
10
|
+
const bittorrent = routeParams.get('bittorrent') || false;
|
|
11
|
+
const embed_thumb = routeParams.get('embed_thumb') || false;
|
|
10
12
|
const inline_set = ctx.params.order === 'posted' ? 'fs_p' : 'fs_f';
|
|
11
|
-
const items = await EhAPI.getFavoritesItems(ctx.cache, page, favcat, inline_set, bittorrent);
|
|
13
|
+
const items = await EhAPI.getFavoritesItems(ctx.cache, page, favcat, inline_set, bittorrent, embed_thumb);
|
|
12
14
|
|
|
13
15
|
if (EhAPI.from_ex) {
|
|
14
16
|
ctx.state.data = {
|
|
@@ -3,14 +3,16 @@ const EhAPI = require('./ehapi');
|
|
|
3
3
|
module.exports = async (ctx) => {
|
|
4
4
|
const page = ctx.params.page;
|
|
5
5
|
let params = ctx.params.params;
|
|
6
|
-
const
|
|
6
|
+
const routeParams = new URLSearchParams(ctx.params.routeParams);
|
|
7
|
+
const bittorrent = routeParams.get('bittorrent') || false;
|
|
8
|
+
const embed_thumb = routeParams.get('embed_thumb') || false;
|
|
7
9
|
let items;
|
|
8
10
|
if (page) {
|
|
9
11
|
// 如果定义了page,就要覆盖params
|
|
10
12
|
params = params.replace(/&*page=[^&]$/, '').replace(/page=[^&]&/, '');
|
|
11
|
-
items = await EhAPI.getSearchItems(ctx.cache, params, parseInt(page), bittorrent);
|
|
13
|
+
items = await EhAPI.getSearchItems(ctx.cache, params, parseInt(page), bittorrent, embed_thumb);
|
|
12
14
|
} else {
|
|
13
|
-
items = await EhAPI.getSearchItems(ctx.cache, params, undefined, bittorrent);
|
|
15
|
+
items = await EhAPI.getSearchItems(ctx.cache, params, undefined, bittorrent, embed_thumb);
|
|
14
16
|
}
|
|
15
17
|
let title = params;
|
|
16
18
|
const match = /f_search=([^&]+)/.exec(title);
|
|
@@ -3,8 +3,10 @@ const EhAPI = require('./ehapi');
|
|
|
3
3
|
module.exports = async (ctx) => {
|
|
4
4
|
const page = ctx.params.page ? parseInt(ctx.params.page) : 0;
|
|
5
5
|
const tag = ctx.params.tag;
|
|
6
|
-
const
|
|
7
|
-
const
|
|
6
|
+
const routeParams = new URLSearchParams(ctx.params.routeParams);
|
|
7
|
+
const bittorrent = routeParams.get('bittorrent') || false;
|
|
8
|
+
const embed_thumb = routeParams.get('embed_thumb') || false;
|
|
9
|
+
const items = await EhAPI.getTagItems(ctx.cache, tag, page, bittorrent, embed_thumb);
|
|
8
10
|
|
|
9
11
|
if (EhAPI.from_ex) {
|
|
10
12
|
ctx.state.data = {
|
package/lib/v2/firefox/index.js
CHANGED
|
@@ -4,6 +4,9 @@ const { parseDate } = require('@/utils/parse-date');
|
|
|
4
4
|
const timezone = require('@/utils/timezone');
|
|
5
5
|
const { art } = require('@/utils/render');
|
|
6
6
|
const path = require('path');
|
|
7
|
+
const { CookieJar } = require('tough-cookie');
|
|
8
|
+
|
|
9
|
+
const cookieJar = new CookieJar();
|
|
7
10
|
|
|
8
11
|
module.exports = async (ctx) => {
|
|
9
12
|
const baseUrl = 'https://monitor.firefox.com';
|
|
@@ -13,6 +16,7 @@ module.exports = async (ctx) => {
|
|
|
13
16
|
headers: {
|
|
14
17
|
Referer: baseUrl,
|
|
15
18
|
},
|
|
19
|
+
cookieJar,
|
|
16
20
|
});
|
|
17
21
|
|
|
18
22
|
const $ = cheerio.load(response.body);
|
|
@@ -35,6 +39,7 @@ module.exports = async (ctx) => {
|
|
|
35
39
|
headers: {
|
|
36
40
|
Referer: baseUrl + '/breaches',
|
|
37
41
|
},
|
|
42
|
+
cookieJar,
|
|
38
43
|
});
|
|
39
44
|
const content = cheerio.load(article.body);
|
|
40
45
|
|
|
@@ -54,7 +59,7 @@ module.exports = async (ctx) => {
|
|
|
54
59
|
ctx.state.data = {
|
|
55
60
|
title: $('title').text(),
|
|
56
61
|
link: baseUrl,
|
|
57
|
-
description:
|
|
62
|
+
description: $('head meta[name=description]').attr('content').trim(),
|
|
58
63
|
item: items,
|
|
59
64
|
image: $('head meta[property=og:image]').attr('content'),
|
|
60
65
|
};
|
|
@@ -62,7 +67,7 @@ module.exports = async (ctx) => {
|
|
|
62
67
|
ctx.state.json = {
|
|
63
68
|
title: $('title').text(),
|
|
64
69
|
link: baseUrl,
|
|
65
|
-
description:
|
|
70
|
+
description: $('head meta[name=description]').attr('content').trim(),
|
|
66
71
|
item: items,
|
|
67
72
|
image: $('head meta[property=og:image]').attr('content'),
|
|
68
73
|
};
|
|
@@ -53,7 +53,7 @@ module.exports = async (ctx) => {
|
|
|
53
53
|
|
|
54
54
|
item.author = content('.name').text();
|
|
55
55
|
|
|
56
|
-
content('.mod-info, .title, .eval-zan, .eval-pic, .sae-more').remove();
|
|
56
|
+
content('.mod-info, .title, .eval-zan, .eval-pic, .sae-more, .ugo-kol, .word-text .word-box .word-cn').remove();
|
|
57
57
|
|
|
58
58
|
item.description = content('#articleContent, .eval-desc').html();
|
|
59
59
|
|
|
@@ -118,5 +118,12 @@ module.exports = async (ctx) => {
|
|
|
118
118
|
title: `${user}/${repo}: ${typeDict[type].title} #${number} - ${issue.title}`,
|
|
119
119
|
link: issue.html_url,
|
|
120
120
|
item: items,
|
|
121
|
+
rateLimit: {
|
|
122
|
+
limit: parseInt(response.headers['x-ratelimit-limit']),
|
|
123
|
+
remaining: parseInt(response.headers['x-ratelimit-remaining']),
|
|
124
|
+
reset: parseDate(parseInt(response.headers['x-ratelimit-reset']) * 1000),
|
|
125
|
+
resoure: response.headers['x-ratelimit-resource'],
|
|
126
|
+
used: parseInt(response.headers['x-ratelimit-used']),
|
|
127
|
+
},
|
|
121
128
|
};
|
|
122
129
|
};
|
package/lib/v2/gitpod/blog.js
CHANGED
|
@@ -49,4 +49,12 @@ module.exports = async (ctx) => {
|
|
|
49
49
|
language: 'en-US',
|
|
50
50
|
item: items,
|
|
51
51
|
};
|
|
52
|
+
|
|
53
|
+
ctx.state.json = {
|
|
54
|
+
title: $('title').text(),
|
|
55
|
+
link: rootUrl + '/blog',
|
|
56
|
+
description: $('meta[name="description"]').attr('content'),
|
|
57
|
+
language: 'en-US',
|
|
58
|
+
item: items,
|
|
59
|
+
};
|
|
52
60
|
};
|
package/lib/v2/gov/maintainer.js
CHANGED
|
@@ -16,6 +16,7 @@ module.exports = {
|
|
|
16
16
|
'/miit/wjgs': ['Yoge-Code'],
|
|
17
17
|
'/miit/zcjd': ['Yoge-Code'],
|
|
18
18
|
'/mee/ywdt?': ['liuxsdev'],
|
|
19
|
+
'/nrta/news/:category?': ['yuxinliu-alex'],
|
|
19
20
|
'/pbc/goutongjiaoliu': ['nczitzk'],
|
|
20
21
|
'/pbc/tradeAnnouncement': ['nczitzk'],
|
|
21
22
|
'/pbc/zcyj': ['Fatpandac'],
|