rsshub 1.0.0-master.bb524fb → 1.0.0-master.bb820b0
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 +2 -2
- package/lib/app.js +2 -2
- package/lib/radar.js +1 -1
- package/lib/router.js +21 -21
- package/lib/utils/rand-user-agent.js +3 -2
- package/lib/v2/141ppv/index.js +4 -1
- package/lib/v2/2048/index.js +18 -13
- package/lib/v2/8264/list.js +92 -0
- package/lib/v2/8264/maintainer.js +3 -0
- package/lib/v2/8264/radar.js +355 -0
- package/lib/v2/8264/router.js +3 -0
- package/lib/v2/8264/templates/description.art +5 -0
- package/lib/v2/abc/index.js +162 -0
- package/lib/v2/abc/maintainer.js +3 -0
- package/lib/v2/abc/radar.js +13 -0
- package/lib/v2/abc/router.js +3 -0
- package/lib/v2/abc/templates/description.art +21 -0
- package/lib/v2/abskoop/index.js +21 -31
- package/lib/v2/abskoop/nsfw.js +16 -37
- package/lib/v2/abskoop/radar.js +13 -2
- package/lib/v2/ainvest/article.js +42 -0
- package/lib/v2/ainvest/maintainer.js +4 -0
- package/lib/v2/ainvest/news.js +39 -0
- package/lib/v2/ainvest/radar.js +19 -0
- package/lib/v2/ainvest/router.js +4 -0
- package/lib/v2/ainvest/utils.js +73 -0
- package/lib/v2/alternativeto/maintainer.js +4 -0
- package/lib/v2/alternativeto/platform.js +32 -0
- package/lib/v2/alternativeto/radar.js +19 -0
- package/lib/v2/alternativeto/router.js +4 -0
- package/lib/v2/alternativeto/software.js +32 -0
- package/lib/v2/alternativeto/utils.js +22 -0
- package/lib/v2/apnews/topics.js +1 -0
- package/lib/v2/apple/apps.js +107 -0
- package/lib/v2/apple/maintainer.js +1 -0
- package/lib/v2/apple/radar.js +8 -0
- package/lib/v2/apple/router.js +1 -0
- package/lib/v2/appstore/maintainer.js +0 -1
- package/lib/v2/appstore/radar.js +0 -6
- package/lib/v2/appstore/router.js +0 -1
- package/lib/v2/asiantolick/index.js +73 -27
- package/lib/v2/asiantolick/maintainer.js +5 -3
- package/lib/v2/asiantolick/radar.js +34 -12
- package/lib/v2/asiantolick/router.js +2 -2
- package/lib/v2/asiantolick/templates/description.art +9 -3
- package/lib/v2/baidu/maintainer.js +1 -0
- package/lib/v2/baidu/radar.js +15 -1
- package/lib/v2/baidu/router.js +1 -0
- package/lib/v2/baidu/templates/tieba_search.art +1 -0
- package/lib/v2/baidu/tieba/search.js +63 -0
- package/lib/v2/bilibili/cache.js +65 -27
- package/lib/v2/bilibili/danmaku.js +9 -2
- package/lib/v2/bilibili/dynamic.js +16 -4
- package/lib/v2/bilibili/fav.js +2 -0
- package/lib/v2/bilibili/followings_dynamic.js +1 -1
- package/lib/v2/bilibili/userFav.js +2 -0
- package/lib/v2/bilibili/utils.js +64 -2
- package/lib/v2/bilibili/video-all.js +1 -5
- package/lib/v2/bilibili/video.js +8 -6
- package/lib/v2/bjfu/grs.js +22 -36
- package/lib/v2/bjfu/it/index.js +9 -7
- package/lib/v2/bjfu/it/utils.js +38 -29
- package/lib/v2/bjfu/jwc/index.js +3 -8
- package/lib/v2/bjfu/jwc/utils.js +26 -29
- package/lib/v2/bjfu/kjc.js +25 -38
- package/lib/v2/bjfu/news/index.js +12 -9
- package/lib/v2/bjfu/news/utils.js +17 -19
- package/lib/v2/boc/whpj.js +9 -8
- package/lib/v2/booru/maintainer.js +3 -0
- package/lib/v2/booru/mmda.js +47 -0
- package/lib/v2/booru/radar.js +12 -0
- package/lib/v2/booru/router.js +3 -0
- package/lib/v2/caixinglobal/latest.js +64 -0
- package/lib/v2/caixinglobal/maintainer.js +3 -0
- package/lib/v2/caixinglobal/radar.js +13 -0
- package/lib/v2/caixinglobal/router.js +3 -0
- package/lib/v2/cas/radar.js +1 -1
- package/lib/v2/cbc/maintainer.js +3 -0
- package/lib/v2/cbc/radar.js +13 -0
- package/lib/v2/cbc/router.js +3 -0
- package/lib/{routes → v2}/cbc/topics.js +11 -26
- package/lib/v2/china/finance/finance.js +61 -0
- package/lib/v2/china/maintainer.js +1 -0
- package/lib/v2/china/news/military/news.js +5 -6
- package/lib/v2/china/radar.js +9 -0
- package/lib/v2/china/router.js +1 -0
- package/lib/v2/chinawriter/index.js +88 -0
- package/lib/v2/chinawriter/maintainer.js +3 -0
- package/lib/v2/chinawriter/radar.js +660 -0
- package/lib/v2/chinawriter/router.js +3 -0
- package/lib/v2/cna/index.js +1 -0
- package/lib/v2/discuz/discuz.js +156 -0
- package/lib/v2/discuz/maintainer.js +5 -0
- package/lib/v2/discuz/radar.js +0 -0
- package/lib/v2/discuz/router.js +5 -0
- package/lib/v2/dn/maintainer.js +3 -0
- package/lib/v2/dn/news.js +90 -0
- package/lib/v2/dn/radar.js +55 -0
- package/lib/v2/dn/router.js +3 -0
- package/lib/v2/dn/templates/description.art +15 -0
- package/lib/v2/douyin/live.js +4 -3
- package/lib/v2/dribbble/maintainer.js +5 -0
- package/lib/v2/dribbble/radar.js +25 -0
- package/lib/v2/dribbble/router.js +5 -0
- package/lib/v2/dribbble/templates/description.art +15 -0
- package/lib/v2/dribbble/utils.js +156 -0
- package/lib/v2/economist/full.js +4 -2
- package/lib/v2/farmatters/index.js +85 -0
- package/lib/v2/farmatters/maintainer.js +7 -0
- package/lib/v2/farmatters/radar.js +36 -0
- package/lib/v2/farmatters/router.js +6 -0
- package/lib/v2/farmatters/templates/description.art +9 -0
- package/lib/v2/finology/radar.js +4 -4
- package/lib/v2/ft/myft.js +9 -2
- package/lib/v2/gamegene/maintainer.js +3 -0
- package/lib/v2/gamegene/news.js +50 -0
- package/lib/v2/gamegene/radar.js +13 -0
- package/lib/v2/gamegene/router.js +3 -0
- package/lib/v2/gcores/category.js +1 -0
- package/lib/v2/gcores/radio.js +1 -0
- package/lib/v2/github/maintainer.js +1 -0
- package/lib/v2/github/pulse.js +87 -0
- package/lib/v2/github/radar.js +6 -0
- package/lib/v2/github/router.js +1 -0
- package/lib/v2/github/templates/pulse-description.art +24 -0
- package/lib/v2/gogoanimehd/maintainer.js +3 -0
- package/lib/v2/gogoanimehd/radar.js +13 -0
- package/lib/v2/gogoanimehd/recent-releases.js +37 -0
- package/lib/v2/gogoanimehd/router.js +3 -0
- package/lib/v2/gov/chongqing/gzw.js +68 -0
- package/lib/v2/gov/chongqing/sydwgkzp.js +47 -0
- package/lib/v2/gov/maintainer.js +4 -0
- package/lib/v2/gov/npc/index.js +47 -0
- package/lib/v2/gov/radar.js +40 -0
- package/lib/v2/gov/router.js +4 -0
- package/lib/v2/gov/zhejiang/gwy.js +84 -0
- package/lib/v2/grist/radar.js +4 -4
- package/lib/v2/grubstreet/maintainer.js +4 -0
- package/lib/v2/grubstreet/radar.js +13 -0
- package/lib/v2/grubstreet/router.js +3 -0
- package/lib/v2/grubstreet/utils.js +84 -0
- package/lib/v2/gxmzu/lib.js +70 -0
- package/lib/v2/gxmzu/maintainer.js +1 -0
- package/lib/v2/gxmzu/radar.js +8 -0
- package/lib/v2/gxmzu/router.js +1 -0
- package/lib/v2/hackyournews/index.js +50 -0
- package/lib/v2/hackyournews/maintainer.js +3 -0
- package/lib/v2/hackyournews/radar.js +13 -0
- package/lib/v2/hackyournews/router.js +3 -0
- package/lib/v2/icbc/radar.js +1 -1
- package/lib/v2/javbus/index.js +6 -0
- package/lib/v2/kamen-rider-official/maintainer.js +3 -0
- package/lib/v2/kamen-rider-official/news.js +110 -0
- package/lib/v2/kamen-rider-official/radar.js +18 -0
- package/lib/v2/kamen-rider-official/router.js +3 -0
- package/lib/v2/kamen-rider-official/templates/description.art +10 -0
- package/lib/v2/kantarworldpanel/index.js +96 -0
- package/lib/v2/kantarworldpanel/maintainer.js +3 -0
- package/lib/v2/kantarworldpanel/radar.js +199 -0
- package/lib/v2/kantarworldpanel/router.js +3 -0
- package/lib/v2/kantarworldpanel/templates/description.art +9 -0
- package/lib/v2/lemmy/index.js +61 -0
- package/lib/v2/lemmy/maintainer.js +3 -0
- package/lib/v2/lemmy/router.js +3 -0
- package/lib/v2/liulinblog/radar.js +6 -6
- package/lib/v2/lsnu/jiaowc/tzgg.js +52 -0
- package/lib/v2/lsnu/maintainer.js +3 -0
- package/lib/v2/lsnu/radar.js +13 -0
- package/lib/v2/lsnu/router.js +3 -0
- package/lib/v2/luxiangdong/archive.js +28 -0
- package/lib/v2/luxiangdong/maintainer.js +3 -0
- package/lib/v2/luxiangdong/radar.js +13 -0
- package/lib/v2/luxiangdong/router.js +3 -0
- package/lib/v2/mail/imap.js +99 -0
- package/lib/v2/mail/maintainer.js +3 -0
- package/lib/v2/mail/router.js +3 -0
- package/lib/v2/metacritic/index.js +121 -0
- package/lib/v2/metacritic/maintainer.js +5 -0
- package/lib/v2/metacritic/radar.js +43 -0
- package/lib/v2/metacritic/router.js +3 -0
- package/lib/v2/metacritic/templates/description.art +19 -0
- package/lib/v2/metacritic/util.js +42 -0
- package/lib/v2/mixcloud/index.js +5 -22
- package/lib/v2/mixcloud/queries.js +187 -179
- package/lib/v2/mydrivers/cid.js +38 -0
- package/lib/v2/mydrivers/index.js +40 -89
- package/lib/v2/mydrivers/maintainer.js +5 -1
- package/lib/v2/mydrivers/radar.js +205 -4
- package/lib/v2/mydrivers/rank.js +40 -0
- package/lib/v2/mydrivers/router.js +4 -1
- package/lib/v2/mydrivers/templates/description.art +5 -0
- package/lib/v2/mydrivers/util.js +125 -0
- package/lib/v2/mymusicsheet/maintainer.js +3 -0
- package/lib/v2/mymusicsheet/radar.js +13 -0
- package/lib/v2/mymusicsheet/router.js +3 -0
- package/lib/v2/mymusicsheet/templates/description.art +41 -0
- package/lib/v2/mymusicsheet/usersheets.js +120 -0
- package/lib/v2/netflav/index.js +39 -0
- package/lib/v2/netflav/maintainer.js +4 -0
- package/lib/v2/netflav/radar.js +13 -0
- package/lib/v2/netflav/router.js +3 -0
- package/lib/v2/netflav/templates/description.art +8 -0
- package/lib/v2/niaogebiji/cat.js +53 -0
- package/lib/v2/niaogebiji/index.js +41 -0
- package/lib/v2/niaogebiji/maintainer.js +6 -0
- package/lib/v2/niaogebiji/radar.js +25 -0
- package/lib/v2/niaogebiji/router.js +5 -0
- package/lib/v2/niaogebiji/today.js +34 -0
- package/lib/v2/npr/radar.js +2 -2
- package/lib/v2/oreno3d/radar.js +1 -1
- package/lib/v2/osu/beatmaps/packs.js +35 -0
- package/lib/v2/osu/maintainer.js +3 -0
- package/lib/v2/osu/radar.js +13 -0
- package/lib/v2/osu/router.js +3 -0
- package/lib/v2/paulgraham/article.js +62 -0
- package/lib/v2/paulgraham/maintainer.js +3 -0
- package/lib/v2/paulgraham/radar.js +13 -0
- package/lib/v2/paulgraham/router.js +5 -0
- package/lib/v2/pixiv/user.js +2 -1
- package/lib/v2/pixiv/utils.js +2 -2
- package/lib/v2/radio-canada/latest.js +8 -1
- package/lib/v2/reuters/common.js +3 -0
- package/lib/v2/rfi/maintainer.js +1 -1
- package/lib/v2/rfi/news.js +35 -22
- package/lib/v2/rfi/radar.js +5 -5
- package/lib/v2/rfi/router.js +1 -1
- package/lib/v2/rsshub/maintainer.js +1 -0
- package/lib/v2/rsshub/router.js +1 -0
- package/lib/v2/rsshub/routes.js +6 -4
- package/lib/v2/rsshub/transform/sitemap.js +52 -0
- package/lib/v2/scau/maintainer.js +1 -0
- package/lib/v2/scau/radar.js +8 -0
- package/lib/v2/scau/router.js +1 -0
- package/lib/v2/scau/yjs.js +2 -2
- package/lib/v2/scau/yjsy.js +27 -0
- package/lib/v2/scut/maintainer.js +1 -0
- package/lib/v2/scut/radar.js +34 -0
- package/lib/v2/scut/router.js +1 -0
- package/lib/v2/scut/smae/notice.js +54 -0
- package/lib/v2/sourceforge/index.js +33 -0
- package/lib/v2/sourceforge/maintainer.js +3 -0
- package/lib/v2/sourceforge/radar.js +12 -0
- package/lib/v2/sourceforge/router.js +3 -0
- package/lib/v2/sqmc/maintainer.js +3 -0
- package/lib/v2/sqmc/radar.js +13 -0
- package/lib/v2/sqmc/router.js +3 -0
- package/lib/v2/sqmc/www.js +49 -0
- package/lib/v2/surfshark/blog.js +91 -0
- package/lib/v2/surfshark/maintainer.js +3 -0
- package/lib/v2/surfshark/radar.js +90 -0
- package/lib/v2/surfshark/router.js +3 -0
- package/lib/v2/surfshark/templates/description.art +5 -0
- package/lib/v2/tesla/cx.js +119 -0
- package/lib/v2/tesla/maintainer.js +1 -0
- package/lib/v2/tesla/radar.js +13 -1
- package/lib/v2/tesla/router.js +1 -0
- package/lib/v2/tesla/templates/description.art +140 -0
- package/lib/v2/tfc-taiwan/index.js +36 -0
- package/lib/v2/tfc-taiwan/maintainer.js +10 -0
- package/lib/v2/tfc-taiwan/radar.js +31 -0
- package/lib/v2/tfc-taiwan/router.js +7 -0
- package/lib/v2/tfc-taiwan/templates/article.art +7 -0
- package/lib/v2/tfc-taiwan/utils.js +56 -0
- package/lib/v2/thepaper/featured.js +1 -1
- package/lib/v2/thepaper/utils.js +18 -12
- package/lib/v2/thwiki/radar.js +1 -1
- package/lib/v2/twitch/live.js +88 -0
- package/lib/v2/twitch/maintainer.js +5 -0
- package/lib/v2/twitch/radar.js +37 -0
- package/lib/v2/twitch/router.js +5 -0
- package/lib/v2/twitch/schedule.js +75 -0
- package/lib/v2/twitch/video.js +64 -0
- package/lib/v2/udn/breaking-news.js +6 -2
- package/lib/v2/ustc/eeis.js +5 -4
- package/lib/v2/ustc/sist.js +6 -5
- package/lib/v2/weibo/oasis/user.js +4 -3
- package/lib/v2/whu/cs.js +71 -0
- package/lib/v2/whu/gs/index.js +85 -0
- package/lib/v2/whu/hyxt.js +50 -0
- package/lib/v2/whu/maintainer.js +6 -0
- package/lib/v2/whu/news.js +70 -0
- package/lib/v2/whu/radar.js +275 -0
- package/lib/v2/whu/router.js +6 -0
- package/lib/v2/whu/templates/description.art +39 -0
- package/lib/v2/whu/util.js +148 -0
- package/lib/v2/x-mol/maintainer.js +4 -0
- package/lib/v2/x-mol/news.js +63 -0
- package/lib/v2/x-mol/paper.js +73 -0
- package/lib/v2/x-mol/radar.js +25 -0
- package/lib/v2/x-mol/router.js +4 -0
- package/lib/v2/x-mol/templates/description.art +6 -0
- package/lib/v2/x-mol/utils.js +3 -0
- package/lib/v2/xiaohongshu/user.js +33 -9
- package/lib/v2/xiaohongshu/util.js +17 -21
- package/lib/v2/xiaote/radar.js +1 -1
- package/lib/v2/xinpianchang/index.js +19 -0
- package/lib/v2/xinpianchang/maintainer.js +4 -0
- package/lib/v2/xinpianchang/radar.js +28 -0
- package/lib/v2/xinpianchang/rank.js +33 -0
- package/lib/v2/xinpianchang/router.js +5 -0
- package/lib/v2/xinpianchang/templates/description.art +13 -0
- package/lib/v2/xinpianchang/util.js +110 -0
- package/lib/v2/xmut/jwc/bkjw.js +62 -0
- package/lib/v2/xmut/jwc/yjs.js +51 -0
- package/lib/v2/xmut/maintainer.js +3 -0
- package/lib/v2/xmut/radar.js +13 -0
- package/lib/v2/xmut/router.js +4 -0
- package/lib/v2/yuque/utils.js +1 -0
- package/lib/v2/yyets/radar.js +2 -2
- package/lib/v2/zhubai/radar.js +2 -1
- package/lib/v2/zhubai/templates/description.art +41 -13
- package/lib/v2/zhubai/top20.js +31 -22
- package/lib/views/welcome.art +1 -1
- package/package.json +48 -19
- package/lib/routes/abc/documentId.js +0 -7272
- package/lib/routes/abc/id.js +0 -7272
- package/lib/routes/abc/index.js +0 -74
- package/lib/routes/blogs/paulgraham.js +0 -46
- package/lib/routes/discuz/discuz.js +0 -148
- package/lib/routes/dribbble/utils.js +0 -94
- package/lib/routes/growincity/news.js +0 -49
- package/lib/routes/grubstreet/utils.js +0 -78
- package/lib/routes/kkj/news.js +0 -52
- package/lib/routes/mail/imap.js +0 -79
- package/lib/routes/niaogebiji/cat.js +0 -86
- package/lib/routes/niaogebiji/index.js +0 -40
- package/lib/routes/niaogebiji/today.js +0 -29
- package/lib/routes/npc/index.js +0 -42
- package/lib/routes/universities/whu/cs.js +0 -38
- package/lib/routes/universities/whu/news.js +0 -128
- package/lib/routes/x-mol/news.js +0 -48
- package/lib/routes/x-mol/paper.js +0 -78
- package/lib/routes/x-mol/utils.js +0 -16
- package/lib/v2/abskoop/templates/description.art +0 -3
- package/lib/v2/appstore/update.js +0 -37
- /package/lib/{routes → v2}/dribbble/keyword.js +0 -0
- /package/lib/{routes → v2}/dribbble/popular.js +0 -0
- /package/lib/{routes → v2}/dribbble/user.js +0 -0
- /package/lib/{routes → v2}/grubstreet/index.js +0 -0
- /package/lib/{routes → v2}/metacritic/release.js +0 -0
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'8264.com': {
|
|
3
|
+
_name: '8264',
|
|
4
|
+
'.': [
|
|
5
|
+
{
|
|
6
|
+
title: '热门推荐',
|
|
7
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
8
|
+
source: ['/list/751'],
|
|
9
|
+
target: '/8264/list/751',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
title: '户外知识',
|
|
13
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
14
|
+
source: ['/list/238'],
|
|
15
|
+
target: '/8264/list/238',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
title: '户外装备',
|
|
19
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
20
|
+
source: ['/list/204'],
|
|
21
|
+
target: '/8264/list/204',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
title: '业界',
|
|
25
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
26
|
+
source: ['/list/489'],
|
|
27
|
+
target: '/8264/list/489',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
title: '国际',
|
|
31
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
32
|
+
source: ['/list/733'],
|
|
33
|
+
target: '/8264/list/733',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
title: '专访',
|
|
37
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
38
|
+
source: ['/list/746'],
|
|
39
|
+
target: '/8264/list/746',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
title: '图说',
|
|
43
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
44
|
+
source: ['/list/902'],
|
|
45
|
+
target: '/8264/list/902',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
title: '户外',
|
|
49
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
50
|
+
source: ['/list/914'],
|
|
51
|
+
target: '/8264/list/914',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
title: '登山',
|
|
55
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
56
|
+
source: ['/list/934'],
|
|
57
|
+
target: '/8264/list/934',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
title: '攀岩',
|
|
61
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
62
|
+
source: ['/list/935'],
|
|
63
|
+
target: '/8264/list/935',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
title: '徒步',
|
|
67
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
68
|
+
source: ['/list/242'],
|
|
69
|
+
target: '/8264/list/242',
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
title: '露营',
|
|
73
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
74
|
+
source: ['/list/950'],
|
|
75
|
+
target: '/8264/list/950',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
title: '安全急救',
|
|
79
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
80
|
+
source: ['/list/931'],
|
|
81
|
+
target: '/8264/list/931',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
title: '领队',
|
|
85
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
86
|
+
source: ['/list/920'],
|
|
87
|
+
target: '/8264/list/920',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
title: '登雪山',
|
|
91
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
92
|
+
source: ['/list/915'],
|
|
93
|
+
target: '/8264/list/915',
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
title: '攀岩',
|
|
97
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
98
|
+
source: ['/list/916'],
|
|
99
|
+
target: '/8264/list/916',
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
title: '骑行',
|
|
103
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
104
|
+
source: ['/list/917'],
|
|
105
|
+
target: '/8264/list/917',
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
title: '跑步',
|
|
109
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
110
|
+
source: ['/list/918'],
|
|
111
|
+
target: '/8264/list/918',
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
title: '滑雪',
|
|
115
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
116
|
+
source: ['/list/919'],
|
|
117
|
+
target: '/8264/list/919',
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
title: '水上运动',
|
|
121
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
122
|
+
source: ['/list/921'],
|
|
123
|
+
target: '/8264/list/921',
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
title: '钓鱼',
|
|
127
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
128
|
+
source: ['/list/951'],
|
|
129
|
+
target: '/8264/list/951',
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
title: '潜水',
|
|
133
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
134
|
+
source: ['/list/952'],
|
|
135
|
+
target: '/8264/list/952',
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
title: '攀冰',
|
|
139
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
140
|
+
source: ['/list/953'],
|
|
141
|
+
target: '/8264/list/953',
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
title: '冲浪',
|
|
145
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
146
|
+
source: ['/list/966'],
|
|
147
|
+
target: '/8264/list/966',
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
title: '网球',
|
|
151
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
152
|
+
source: ['/list/967'],
|
|
153
|
+
target: '/8264/list/967',
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
title: '绳索知识',
|
|
157
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
158
|
+
source: ['/list/968'],
|
|
159
|
+
target: '/8264/list/968',
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
title: '高尔夫',
|
|
163
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
164
|
+
source: ['/list/969'],
|
|
165
|
+
target: '/8264/list/969',
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
title: '马术',
|
|
169
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
170
|
+
source: ['/list/970'],
|
|
171
|
+
target: '/8264/list/970',
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
title: '户外摄影',
|
|
175
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
176
|
+
source: ['/list/973'],
|
|
177
|
+
target: '/8264/list/973',
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
title: '羽毛球',
|
|
181
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
182
|
+
source: ['/list/971'],
|
|
183
|
+
target: '/8264/list/971',
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
title: '游泳',
|
|
187
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
188
|
+
source: ['/list/974'],
|
|
189
|
+
target: '/8264/list/974',
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
title: '溯溪',
|
|
193
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
194
|
+
source: ['/list/975'],
|
|
195
|
+
target: '/8264/list/975',
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
title: '健身',
|
|
199
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
200
|
+
source: ['/list/976'],
|
|
201
|
+
target: '/8264/list/976',
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
title: '瑜伽',
|
|
205
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
206
|
+
source: ['/list/977'],
|
|
207
|
+
target: '/8264/list/977',
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
title: '服装',
|
|
211
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
212
|
+
source: ['/list/209'],
|
|
213
|
+
target: '/8264/list/209',
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
title: '冲锋衣',
|
|
217
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
218
|
+
source: ['/list/923'],
|
|
219
|
+
target: '/8264/list/923',
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
title: '抓绒衣',
|
|
223
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
224
|
+
source: ['/list/924'],
|
|
225
|
+
target: '/8264/list/924',
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
title: '皮肤衣',
|
|
229
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
230
|
+
source: ['/list/925'],
|
|
231
|
+
target: '/8264/list/925',
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
title: '速干衣',
|
|
235
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
236
|
+
source: ['/list/926'],
|
|
237
|
+
target: '/8264/list/926',
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
title: '羽绒服',
|
|
241
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
242
|
+
source: ['/list/927'],
|
|
243
|
+
target: '/8264/list/927',
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
title: '软壳',
|
|
247
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
248
|
+
source: ['/list/929'],
|
|
249
|
+
target: '/8264/list/929',
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
title: '户外鞋',
|
|
253
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
254
|
+
source: ['/list/211'],
|
|
255
|
+
target: '/8264/list/211',
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
title: '登山鞋',
|
|
259
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
260
|
+
source: ['/list/928'],
|
|
261
|
+
target: '/8264/list/928',
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
title: '徒步鞋',
|
|
265
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
266
|
+
source: ['/list/930'],
|
|
267
|
+
target: '/8264/list/930',
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
title: '越野跑鞋',
|
|
271
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
272
|
+
source: ['/list/933'],
|
|
273
|
+
target: '/8264/list/933',
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
title: '溯溪鞋',
|
|
277
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
278
|
+
source: ['/list/932'],
|
|
279
|
+
target: '/8264/list/932',
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
title: '登山杖',
|
|
283
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
284
|
+
source: ['/list/220'],
|
|
285
|
+
target: '/8264/list/220',
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
title: '帐篷',
|
|
289
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
290
|
+
source: ['/list/208'],
|
|
291
|
+
target: '/8264/list/208',
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
title: '睡袋',
|
|
295
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
296
|
+
source: ['/list/212'],
|
|
297
|
+
target: '/8264/list/212',
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
title: '炉具',
|
|
301
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
302
|
+
source: ['/list/792'],
|
|
303
|
+
target: '/8264/list/792',
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
title: '灯具',
|
|
307
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
308
|
+
source: ['/list/218'],
|
|
309
|
+
target: '/8264/list/218',
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
title: '水具',
|
|
313
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
314
|
+
source: ['/list/219'],
|
|
315
|
+
target: '/8264/list/219',
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
title: '面料',
|
|
319
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
320
|
+
source: ['/list/222'],
|
|
321
|
+
target: '/8264/list/222',
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
title: '背包',
|
|
325
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
326
|
+
source: ['/list/207'],
|
|
327
|
+
target: '/8264/list/207',
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
title: '防潮垫',
|
|
331
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
332
|
+
source: ['/list/214'],
|
|
333
|
+
target: '/8264/list/214',
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
title: '电子导航',
|
|
337
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
338
|
+
source: ['/list/216'],
|
|
339
|
+
target: '/8264/list/216',
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
title: '冰岩绳索',
|
|
343
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
344
|
+
source: ['/list/215'],
|
|
345
|
+
target: '/8264/list/215',
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
title: '综合装备',
|
|
349
|
+
docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao',
|
|
350
|
+
source: ['/list/223'],
|
|
351
|
+
target: '/8264/list/223',
|
|
352
|
+
},
|
|
353
|
+
],
|
|
354
|
+
},
|
|
355
|
+
};
|
|
@@ -0,0 +1,162 @@
|
|
|
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
|
+
module.exports = async (ctx) => {
|
|
8
|
+
const { category = 'news/justin' } = ctx.params;
|
|
9
|
+
const limit = ctx.query.limit ? parseInt(ctx.query.limit, 10) : 30;
|
|
10
|
+
|
|
11
|
+
const rootUrl = 'https://www.abc.net.au';
|
|
12
|
+
const apiUrl = new URL('news-web/api/loader/channelrefetch', rootUrl).href;
|
|
13
|
+
|
|
14
|
+
let currentUrl = '';
|
|
15
|
+
let documentId = undefined;
|
|
16
|
+
|
|
17
|
+
if (!isNaN(category)) {
|
|
18
|
+
documentId = category;
|
|
19
|
+
const feedUrl = new URL(`news/feed/${documentId}/rss.xml`, rootUrl).href;
|
|
20
|
+
|
|
21
|
+
const { data: feedResponse } = await got(feedUrl);
|
|
22
|
+
currentUrl = feedResponse.match(/<link>([\w-.:/?]+)<\/link>/)[1];
|
|
23
|
+
} else {
|
|
24
|
+
currentUrl = new URL(category, rootUrl).href;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const { data: currentResponse } = await got(currentUrl);
|
|
28
|
+
|
|
29
|
+
const $ = cheerio.load(currentResponse);
|
|
30
|
+
|
|
31
|
+
documentId = documentId ?? $('div[data-uri^="coremedia://collection/"]').first().prop('data-uri').split(/\//).pop();
|
|
32
|
+
|
|
33
|
+
const { data: response } = await got(apiUrl, {
|
|
34
|
+
searchParams: {
|
|
35
|
+
name: 'PaginationArticles',
|
|
36
|
+
documentId,
|
|
37
|
+
size: limit,
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
let items = response.collection.slice(0, limit).map((i) => {
|
|
42
|
+
const item = {
|
|
43
|
+
title: i.title.children ?? i.title,
|
|
44
|
+
link: new URL(i.link.to, rootUrl).href,
|
|
45
|
+
description: art(path.join(__dirname, 'templates/description.art'), {
|
|
46
|
+
image: i.image
|
|
47
|
+
? {
|
|
48
|
+
src: i.image.imgSrc.split(/\?/)[0],
|
|
49
|
+
alt: i.image.alt,
|
|
50
|
+
}
|
|
51
|
+
: undefined,
|
|
52
|
+
}),
|
|
53
|
+
author: i.newsBylineProps?.authors?.map((a) => a.name).join('/') ?? undefined,
|
|
54
|
+
guid: `abc-${i.id}`,
|
|
55
|
+
pubDate: parseDate(i.timestamp.dates.firstPublished),
|
|
56
|
+
updated: i.timestamp.dates.lastUpdated ? parseDate(i.timestamp.dates.lastUpdated) : undefined,
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
if (i.mediaIndicator) {
|
|
60
|
+
item.enclosure_type = 'audio/mpeg';
|
|
61
|
+
item.itunes_item_image = i.image?.imgSrc.split(/\?/)[0] ?? undefined;
|
|
62
|
+
item.itunes_duration = i.mediaIndicator.duration;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return item;
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
items = await Promise.all(
|
|
69
|
+
items.map((item) =>
|
|
70
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
71
|
+
try {
|
|
72
|
+
const { data: detailResponse } = await got(item.link);
|
|
73
|
+
|
|
74
|
+
const content = cheerio.load(detailResponse);
|
|
75
|
+
|
|
76
|
+
content('aside, header, [data-print="inline-media"], [data-component="EmbedBlock"]').remove();
|
|
77
|
+
|
|
78
|
+
content('#body *, div[data-component="FeatureMedia"]')
|
|
79
|
+
.children()
|
|
80
|
+
.each(function () {
|
|
81
|
+
const element = content(this);
|
|
82
|
+
if (element.prop('tagName').toLowerCase() === 'figure') {
|
|
83
|
+
element.replaceWith(
|
|
84
|
+
art(path.join(__dirname, 'templates/description.art'), {
|
|
85
|
+
image: {
|
|
86
|
+
src: element.find('img').prop('src').split(/\?/)[0],
|
|
87
|
+
alt: element.find('figcaption').text().trim(),
|
|
88
|
+
},
|
|
89
|
+
})
|
|
90
|
+
);
|
|
91
|
+
} else {
|
|
92
|
+
element.removeAttr('id class role data-component data-uri');
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
item.title = content('meta[property="og:title"]').prop('content');
|
|
97
|
+
item.description = '';
|
|
98
|
+
|
|
99
|
+
const enclosurePattern = '"(?:MIME|content)?Type":"([\\w]+/[\\w]+)".*?"(?:fileS|s)?ize":(\\d+),.*?"url":"([\\w-.:/?]+)"';
|
|
100
|
+
|
|
101
|
+
const enclosureMatches = detailResponse.match(new RegExp(enclosurePattern, 'g'));
|
|
102
|
+
|
|
103
|
+
if (enclosureMatches) {
|
|
104
|
+
const enclosureMatch = enclosureMatches
|
|
105
|
+
.map((e) => e.match(new RegExp(enclosurePattern)))
|
|
106
|
+
.sort((a, b) => parseInt(a[2], 10) - parseInt(b[2], 10))
|
|
107
|
+
.pop();
|
|
108
|
+
|
|
109
|
+
item.enclosure_url = enclosureMatch[3];
|
|
110
|
+
item.enclosure_length = enclosureMatch[2];
|
|
111
|
+
item.enclosure_type = enclosureMatch[1];
|
|
112
|
+
|
|
113
|
+
item.description = art(path.join(__dirname, 'templates/description.art'), {
|
|
114
|
+
enclosure: {
|
|
115
|
+
src: item.enclosure_url,
|
|
116
|
+
type: item.enclosure_type,
|
|
117
|
+
},
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
item.description =
|
|
122
|
+
art(path.join(__dirname, 'templates/description.art'), {
|
|
123
|
+
description: (content('div[data-component="FeatureMedia"]').html() || '') + (content('#body div[data-component="LayoutContainer"] div').first().html() || ''),
|
|
124
|
+
}) + item.description;
|
|
125
|
+
|
|
126
|
+
item.category = content('meta[property="article:tag"]')
|
|
127
|
+
.toArray()
|
|
128
|
+
.map((c) =>
|
|
129
|
+
content(c)
|
|
130
|
+
.prop('content')
|
|
131
|
+
.split(/,/)
|
|
132
|
+
.map((c) => c.trim())
|
|
133
|
+
)
|
|
134
|
+
.flat();
|
|
135
|
+
item.guid = `abc-${content('meta[name="ContentId"]').prop('content')}`;
|
|
136
|
+
item.pubDate = parseDate(content('meta[property="article:published_time"]').prop('content'));
|
|
137
|
+
item.updated = parseDate(content('meta[property="article:modified_time"]').prop('content'));
|
|
138
|
+
} catch (e) {
|
|
139
|
+
// eslint-disable-next-line
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
return item;
|
|
143
|
+
})
|
|
144
|
+
)
|
|
145
|
+
);
|
|
146
|
+
|
|
147
|
+
const icon = new URL($('link[rel="apple-touch-icon"]').prop('href'), rootUrl).href;
|
|
148
|
+
|
|
149
|
+
ctx.state.data = {
|
|
150
|
+
item: items,
|
|
151
|
+
title: $('title').first().text(),
|
|
152
|
+
link: currentUrl,
|
|
153
|
+
description: $('meta[property="og:description"]').prop('content'),
|
|
154
|
+
language: $('html').prop('lang'),
|
|
155
|
+
image: $('meta[property="og:image"]').prop('content').split('?')[0],
|
|
156
|
+
icon,
|
|
157
|
+
logo: icon,
|
|
158
|
+
subtitle: $('meta[property="og:title"]').prop('content'),
|
|
159
|
+
author: $('meta[name="generator"]').prop('content'),
|
|
160
|
+
allowEmpty: true,
|
|
161
|
+
};
|
|
162
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{{ if image }}
|
|
2
|
+
<figure>
|
|
3
|
+
<img src="{{ image.src }}" alt="{{ image.alt }}">
|
|
4
|
+
<figcaption>{{ image.alt }}</figcaption>
|
|
5
|
+
</figure>
|
|
6
|
+
{{ /if }}
|
|
7
|
+
|
|
8
|
+
{{ if enclosure }}
|
|
9
|
+
<{{ enclosure.type.split(/\//)[0] }} controls>
|
|
10
|
+
<source
|
|
11
|
+
src="{{ enclosure.src }}"
|
|
12
|
+
type="{{ enclosure.type }}">
|
|
13
|
+
<object data="{{ enclosure.src }}">
|
|
14
|
+
<embed src="{{ enclosure.src }}">
|
|
15
|
+
</object>
|
|
16
|
+
</{{ enclosure.type.split(/\//)[0] }}>
|
|
17
|
+
{{ /if }}
|
|
18
|
+
|
|
19
|
+
{{ if description }}
|
|
20
|
+
{{@ description }}
|
|
21
|
+
{{ /if }}
|
package/lib/v2/abskoop/index.js
CHANGED
|
@@ -1,47 +1,37 @@
|
|
|
1
|
-
const path = require('path');
|
|
2
1
|
const got = require('@/utils/got');
|
|
3
2
|
const cheerio = require('cheerio');
|
|
4
|
-
const { art } = require('@/utils/render');
|
|
5
3
|
const { parseDate } = require('@/utils/parse-date');
|
|
6
4
|
|
|
7
5
|
module.exports = async (ctx) => {
|
|
8
6
|
const response = await got({
|
|
9
7
|
method: 'get',
|
|
10
|
-
url: 'https://www.
|
|
8
|
+
url: 'https://www.ahhhhfs.com/wp-json/wp/v2/posts',
|
|
9
|
+
searchParams: {
|
|
10
|
+
per_page: ctx.query.limit ? parseInt(ctx.query.limit) : 10,
|
|
11
|
+
_embed: '',
|
|
12
|
+
},
|
|
11
13
|
});
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
};
|
|
21
|
-
})
|
|
22
|
-
.get();
|
|
14
|
+
const list = response.data.map((item) => ({
|
|
15
|
+
title: item.title.rendered,
|
|
16
|
+
link: item.link,
|
|
17
|
+
pubDate: parseDate(item.date_gmt),
|
|
18
|
+
updated: parseDate(item.modified_gmt),
|
|
19
|
+
author: item._embedded.author[0].name,
|
|
20
|
+
category: [...new Set(item._embedded['wp:term'].flatMap((i) => i.map((j) => j.name)))],
|
|
21
|
+
}));
|
|
23
22
|
|
|
24
23
|
const items = await Promise.all(
|
|
25
|
-
list.
|
|
24
|
+
list.map((item) =>
|
|
26
25
|
ctx.cache.tryGet(item.link, async () => {
|
|
27
26
|
const detailResponse = await got({ method: 'get', url: item.link });
|
|
28
27
|
const $detail = cheerio.load(detailResponse.data);
|
|
29
|
-
$detail('article
|
|
30
|
-
$detail('article
|
|
31
|
-
$detail('article
|
|
32
|
-
$detail('article
|
|
33
|
-
|
|
34
|
-
$detail('article .entry-content a').each(function () {
|
|
35
|
-
if ($detail(this).find('img').length > 0) {
|
|
36
|
-
$detail(this).replaceWith(`<img src=${$detail(this).attr('href')}>`);
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
const desc = [];
|
|
40
|
-
$detail('article .entry-content > *').each(function () {
|
|
41
|
-
desc.push($detail(this).html());
|
|
28
|
+
$detail('article.post-content').find('.lwptoc').remove();
|
|
29
|
+
$detail('article.post-content').find('#related_posts').remove();
|
|
30
|
+
$detail('article.post-content').find('.entry-copyright').remove();
|
|
31
|
+
$detail('article.post-content img').each(function () {
|
|
32
|
+
$detail(this).replaceWith(`<img src=https:${$detail(this).attr('src')}>`);
|
|
42
33
|
});
|
|
43
|
-
item.description =
|
|
44
|
-
item.pubDate = parseDate($detail('meta[property="article:published_time"]').attr('content'));
|
|
34
|
+
item.description = $detail('article.post-content').html();
|
|
45
35
|
return item;
|
|
46
36
|
})
|
|
47
37
|
)
|
|
@@ -49,7 +39,7 @@ module.exports = async (ctx) => {
|
|
|
49
39
|
|
|
50
40
|
ctx.state.data = {
|
|
51
41
|
title: 'ahhhhfs-A姐分享',
|
|
52
|
-
link: 'https://www.
|
|
42
|
+
link: 'https://www.ahhhhfs.com',
|
|
53
43
|
description:
|
|
54
44
|
'A姐分享,分享各种网络云盘资源、BT种子、高清电影电视剧和羊毛福利,收集各种有趣实用的软件和APP的下载、安装、使用方法,发现一些稀奇古怪的的网站,折腾一些有趣实用的教程,关注谷歌苹果等互联网最新的资讯动态,探索新领域,发现新美好,分享小快乐。',
|
|
55
45
|
item: items,
|