rsshub 1.0.0-master.d3fbdfe → 1.0.0-master.d424adf
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 +11 -23
- package/lib/app.js +2 -2
- package/lib/config.js +12 -1
- package/lib/index.js +1 -1
- package/lib/middleware/anti-hotlink.js +2 -2
- package/lib/middleware/parameter.js +47 -47
- package/lib/radar-rules.js +13 -30
- package/lib/radar.js +2 -1
- package/lib/router.js +35 -49
- package/lib/routes/miniflux/get_feeds.js +2 -2
- package/lib/utils/logger.js +14 -2
- package/lib/utils/rand-user-agent.js +3 -2
- package/lib/v2/141ppv/index.js +4 -1
- package/lib/v2/2048/index.js +12 -4
- 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/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/{scitation/journal.js → aip/journal-pupp.js} +2 -2
- package/lib/v2/aip/journal.js +55 -0
- package/lib/v2/{scitation → aip}/maintainer.js +0 -1
- package/lib/v2/aip/radar.js +13 -0
- package/lib/v2/aip/router.js +4 -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 +51 -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/aqara/maintainer.js +4 -1
- package/lib/v2/aqara/news.js +25 -25
- package/lib/v2/aqara/post.js +92 -0
- package/lib/v2/aqara/radar.js +24 -6
- package/lib/v2/aqara/router.js +12 -1
- package/lib/v2/aqara/templates/figure.art +3 -0
- package/lib/v2/baidu/maintainer.js +3 -2
- package/lib/v2/baidu/radar.js +15 -1
- package/lib/v2/baidu/router.js +3 -2
- package/lib/v2/baidu/templates/tieba_search.art +1 -0
- package/lib/v2/baidu/tieba/forum.js +4 -3
- package/lib/v2/baidu/tieba/search.js +63 -0
- package/lib/v2/bangumi/maintainer.js +1 -0
- package/lib/v2/bangumi/radar.js +9 -9
- package/lib/v2/bangumi/router.js +1 -2
- package/lib/v2/bangumi/tv/subject/ep.js +4 -3
- package/lib/v2/bangumi/tv/subject/index.js +18 -16
- package/lib/v2/bangumi/tv/subject/offcial-subject-api.js +3 -2
- package/lib/v2/bangumi/tv/subject/utils.js +5 -0
- package/lib/{routes → v2}/bbc/index.js +4 -4
- package/lib/v2/bbc/maintainer.js +4 -0
- package/lib/v2/bbc/radar.js +11 -0
- package/lib/v2/bbc/router.js +3 -0
- package/lib/v2/bilibili/article.js +2 -17
- package/lib/v2/bilibili/cache.js +85 -27
- package/lib/v2/bilibili/danmaku.js +9 -2
- package/lib/v2/bilibili/dynamic.js +54 -19
- package/lib/v2/bilibili/fav.js +2 -0
- package/lib/v2/bilibili/followings_article.js +1 -10
- package/lib/v2/bilibili/followings_dynamic.js +25 -11
- package/lib/v2/bilibili/maintainer.js +3 -2
- package/lib/v2/bilibili/router.js +3 -2
- package/lib/v2/bilibili/userFav.js +2 -0
- package/lib/v2/bilibili/utils.js +67 -3
- package/lib/v2/bilibili/video-all.js +1 -5
- package/lib/v2/bilibili/video.js +8 -6
- package/lib/v2/bilibili/watchlater.js +44 -0
- 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/bloomberg/utils.js +6 -4
- package/lib/v2/boc/maintainer.js +3 -0
- package/lib/v2/boc/radar.js +13 -0
- package/lib/v2/boc/router.js +3 -0
- package/lib/{routes → v2}/boc/whpj.js +16 -15
- 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/caixin/latest.js +7 -12
- package/lib/v2/caixin/radar.js +1 -1
- package/lib/v2/cas/genetics/xshd.js +29 -0
- package/lib/v2/cas/maintainer.js +1 -0
- package/lib/v2/cas/radar.js +16 -8
- package/lib/v2/cas/router.js +1 -0
- package/lib/{routes → v2}/caus/index.js +7 -6
- package/lib/v2/caus/maintainer.js +3 -0
- package/lib/v2/caus/radar.js +13 -0
- package/lib/v2/caus/router.js +3 -0
- 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/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 +63 -0
- package/lib/v2/cna/maintainer.js +3 -0
- package/lib/v2/cna/radar.js +13 -0
- package/lib/v2/cna/router.js +3 -0
- package/lib/v2/cyzone/author.js +20 -0
- package/lib/v2/cyzone/index.js +27 -0
- package/lib/v2/cyzone/label.js +20 -0
- package/lib/v2/cyzone/maintainer.js +7 -0
- package/lib/v2/cyzone/radar.js +25 -0
- package/lib/v2/cyzone/router.js +6 -0
- package/lib/v2/cyzone/util.js +125 -0
- package/lib/v2/deltaio/blog.js +33 -0
- package/lib/v2/deltaio/maintainer.js +3 -0
- package/lib/v2/deltaio/radar.js +13 -0
- package/lib/v2/deltaio/router.js +3 -0
- package/lib/v2/discourse/maintainer.js +4 -0
- package/lib/v2/discourse/notifications.js +39 -0
- package/lib/v2/discourse/posts.js +25 -0
- package/lib/v2/discourse/router.js +4 -0
- package/lib/v2/discourse/utils.js +12 -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/dlnews/category.js +81 -0
- package/lib/v2/dlnews/maintainer.js +3 -0
- package/lib/v2/dlnews/radar.js +19 -0
- package/lib/v2/dlnews/router.js +3 -0
- package/lib/v2/dlnews/templates/description.art +24 -0
- package/lib/v2/dlnews/utils.js +22 -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/domp4/detail.js +4 -2
- package/lib/v2/domp4/latest.js +7 -4
- package/lib/v2/domp4/utils.js +15 -2
- package/lib/v2/dorohedoro/news.js +3 -1
- package/lib/v2/douyin/live.js +45 -15
- 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/fantia/user.js +16 -0
- 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/foresightnews/article.js +22 -0
- package/lib/v2/foresightnews/column.js +28 -0
- package/lib/v2/foresightnews/index.js +13 -76
- package/lib/v2/foresightnews/maintainer.js +1 -0
- package/lib/v2/foresightnews/news.js +23 -0
- package/lib/v2/foresightnews/radar.js +2 -2
- package/lib/v2/foresightnews/router.js +4 -1
- package/lib/v2/foresightnews/templates/description.art +13 -0
- package/lib/v2/foresightnews/util.js +96 -0
- 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/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 +37 -0
- package/lib/v2/gov/router.js +4 -0
- package/lib/v2/gov/shenzhen/zjj/index.js +45 -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/hrbeu/radar.js +3 -3
- package/lib/v2/hrbeu/router.js +1 -1
- package/lib/v2/hrbeu/uae/news.js +66 -0
- package/lib/v2/icbc/maintainer.js +3 -0
- package/lib/v2/icbc/radar.js +13 -0
- package/lib/v2/icbc/router.js +3 -0
- package/lib/v2/icbc/whpj.js +57 -0
- package/lib/v2/iqiyi/maintainer.js +1 -1
- package/lib/v2/iqiyi/video.js +42 -33
- package/lib/v2/ithome/tag.js +14 -3
- package/lib/v2/japanpost/maintainer.js +3 -0
- package/lib/v2/japanpost/radar.js +22 -0
- package/lib/v2/japanpost/router.js +3 -0
- package/lib/v2/japanpost/templates/track_item_desc.art +14 -0
- package/lib/{routes → v2}/japanpost/track.js +32 -29
- package/lib/{routes → v2}/japanpost/utils.js +10 -11
- 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/kunchengblog/essay.js +35 -19
- package/lib/v2/kunchengblog/radar.js +1 -1
- package/lib/v2/kunchengblog/router.js +1 -1
- package/lib/v2/latepost/index.js +83 -29
- package/lib/v2/latepost/radar.js +7 -2
- package/lib/v2/latepost/router.js +1 -1
- package/lib/v2/leetcode/articles.js +1 -1
- 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/index.js +98 -0
- package/lib/v2/liulinblog/maintainer.js +6 -2
- package/lib/v2/liulinblog/radar.js +36 -16
- package/lib/v2/liulinblog/router.js +7 -3
- 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/mihoyo/bbs/img-ranking.js +106 -0
- package/lib/v2/mihoyo/{bbs.js → bbs/official.js} +1 -1
- package/lib/v2/mihoyo/bbs/static-data.js +137 -0
- package/lib/v2/mihoyo/maintainer.js +1 -0
- package/lib/v2/mihoyo/radar.js +7 -1
- package/lib/v2/mihoyo/router.js +2 -1
- 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/news/whxw.js +1 -0
- package/lib/v2/newzmz/index.js +53 -77
- package/lib/v2/newzmz/maintainer.js +2 -2
- package/lib/v2/newzmz/router.js +1 -3
- package/lib/v2/newzmz/templates/description.art +59 -7
- package/lib/v2/newzmz/util.js +166 -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/nju/gra.js +13 -5
- package/lib/v2/nwafu/all.js +43 -0
- package/lib/v2/nwafu/maintainer.js +3 -0
- package/lib/v2/nwafu/radar.js +13 -0
- package/lib/v2/nwafu/router.js +3 -0
- package/lib/v2/nwafu/utils.js +35 -0
- package/lib/v2/nytimes/index.js +1 -4
- package/lib/v2/nytimes/utils.js +5 -0
- 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/pornhub/category.js +44 -0
- package/lib/v2/pornhub/category_url.js +25 -0
- package/lib/v2/pornhub/maintainer.js +8 -0
- package/lib/v2/pornhub/model.js +29 -0
- package/lib/v2/pornhub/pornstar.js +29 -0
- package/lib/v2/pornhub/radar.js +46 -0
- package/lib/v2/pornhub/router.js +8 -0
- package/lib/v2/pornhub/search.js +23 -0
- package/lib/v2/pornhub/templates/description.art +11 -0
- package/lib/v2/pornhub/users.js +30 -0
- package/lib/v2/pornhub/utils.js +30 -0
- package/lib/v2/radio-canada/latest.js +8 -1
- package/lib/v2/reuters/common.js +52 -26
- package/lib/v2/rfi/maintainer.js +1 -1
- package/lib/v2/rfi/news.js +9 -2
- package/lib/v2/rfi/router.js +1 -1
- package/lib/v2/rsc/journal.js +106 -0
- package/lib/v2/rsc/maintainer.js +3 -0
- package/lib/v2/rsc/radar.js +23 -0
- package/lib/v2/rsc/router.js +3 -0
- package/lib/v2/rsc/templates/image.art +5 -0
- package/lib/v2/rsshub/maintainer.js +1 -0
- package/lib/v2/rsshub/router.js +1 -0
- package/lib/v2/rsshub/routes.js +14 -18
- package/lib/v2/rsshub/transform/html.js +9 -0
- package/lib/v2/rsshub/transform/json.js +1 -0
- package/lib/v2/rsshub/transform/sitemap.js +52 -0
- package/lib/v2/science/radar.js +2 -2
- 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/stheadline/std/realtime.js +8 -6
- package/lib/v2/stockedge/daily-news.js +1 -1
- package/lib/v2/stockedge/radar.js +1 -1
- package/lib/v2/stockedge/utils.js +1 -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/test/index.js +1 -1
- 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/utils.js +19 -13
- package/lib/v2/thwiki/radar.js +1 -1
- package/lib/v2/tiktok/router.js +1 -1
- package/lib/v2/tiktok/templates/user.art +5 -1
- package/lib/v2/tiktok/user.js +5 -1
- package/lib/v2/toodaylab/index.js +99 -0
- package/lib/v2/toodaylab/maintainer.js +7 -0
- package/lib/v2/toodaylab/radar.js +37 -0
- package/lib/v2/toodaylab/router.js +3 -0
- package/lib/{routes → v2}/tophub/index.js +12 -6
- package/lib/v2/tophub/maintainer.js +3 -0
- package/lib/v2/tophub/radar.js +13 -0
- package/lib/v2/tophub/router.js +3 -0
- package/lib/v2/udn/breaking-news.js +10 -5
- package/lib/v2/ustc/eeis.js +5 -4
- package/lib/v2/ustc/sist.js +6 -5
- package/lib/v2/v2ex/maintainer.js +5 -0
- package/lib/v2/v2ex/post.js +35 -0
- package/lib/v2/v2ex/radar.js +35 -0
- package/lib/v2/v2ex/router.js +5 -0
- package/lib/{routes → v2}/v2ex/tab.js +17 -21
- package/lib/{routes → v2}/v2ex/topics.js +1 -1
- 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/maintainer.js +5 -0
- package/lib/v2/whu/news.js +102 -0
- package/lib/v2/whu/radar.js +27 -0
- package/lib/v2/whu/router.js +5 -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/index.js +48 -0
- package/lib/v2/xiaote/maintainer.js +3 -0
- package/lib/v2/xiaote/radar.js +13 -0
- package/lib/v2/xiaote/router.js +3 -0
- 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/youtube/live.js +49 -0
- package/lib/v2/youtube/maintainer.js +1 -0
- package/lib/v2/youtube/radar.js +6 -0
- package/lib/v2/youtube/router.js +1 -0
- package/lib/v2/youtube/utils.js +12 -0
- package/lib/v2/yuque/utils.js +1 -0
- package/lib/v2/yyets/radar.js +2 -2
- package/lib/v2/zhihu/maintainer.js +4 -0
- package/lib/v2/zhihu/radar.js +24 -0
- package/lib/v2/zhihu/router.js +4 -0
- package/lib/v2/zhihu/xhu/auth.js +38 -0
- package/lib/v2/zhihu/xhu/collection.js +64 -0
- package/lib/v2/zhihu/xhu/question.js +44 -0
- package/lib/v2/zhihu/xhu/topic.js +70 -0
- package/lib/v2/zhihu/xhu/zhuanlan.js +83 -0
- 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/v2/zodgame/forum.js +61 -23
- package/lib/v2/zodgame/templates/forum.art +1 -1
- package/lib/views/welcome.art +1 -1
- package/package.json +50 -21
- package/lib/routes/cna/index.js +0 -54
- package/lib/routes/cyzone/author.js +0 -55
- package/lib/routes/cyzone/label.js +0 -53
- 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/pornhub/category.js +0 -22
- package/lib/routes/pornhub/category_url.js +0 -34
- package/lib/routes/pornhub/model.js +0 -35
- package/lib/routes/pornhub/pornstar.js +0 -35
- package/lib/routes/pornhub/search.js +0 -22
- package/lib/routes/pornhub/users.js +0 -35
- package/lib/routes/universities/nwafu/54youth.js +0 -28
- package/lib/routes/universities/nwafu/cie.js +0 -28
- package/lib/routes/universities/nwafu/gs.js +0 -28
- package/lib/routes/universities/nwafu/jcc.js +0 -28
- package/lib/routes/universities/nwafu/jiaowu.js +0 -28
- package/lib/routes/universities/nwafu/lib.js +0 -28
- package/lib/routes/universities/nwafu/news.js +0 -28
- package/lib/routes/universities/nwafu/nic.js +0 -28
- package/lib/routes/universities/nwafu/yjshy.js +0 -28
- package/lib/routes/universities/whu/cs.js +0 -38
- package/lib/routes/universities/whu/news.js +0 -128
- package/lib/routes/v2ex/post.js +0 -39
- 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/v2/hrbeu/uae/list.js +0 -57
- package/lib/v2/liulinblog/itnews.js +0 -23
- package/lib/v2/liulinblog/kuaixun.js +0 -17
- package/lib/v2/liulinblog/utils.js +0 -42
- package/lib/v2/newzmz/view.js +0 -57
- package/lib/v2/scitation/radar.js +0 -19
- package/lib/v2/scitation/router.js +0 -4
- package/lib/v2/scitation/section.js +0 -76
- /package/lib/v2/{scitation → aip}/templates/description.art +0 -0
- /package/lib/v2/{scitation → aip}/utils.js +0 -0
- /package/lib/{routes → v2}/bbc/utils.js +0 -0
- /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
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
const crypto = require('crypto');
|
|
2
|
+
const CryptoJS = require('crypto-js');
|
|
3
|
+
const { KJUR, KEYUTIL, hextob64 } = require('jsrsasign');
|
|
4
|
+
|
|
5
|
+
const publicKey =
|
|
6
|
+
'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCARnxLlrhTK28bEV7s2IROjT73KLSjfqpKIvV8L+Yhe4BrF0Ut4oOH728HZlbSF0C3N0vXZjLAFesoS4v1pYOjVCPXl920Lh2seCv82m0cK78WMGuqZTfA44Nv7JsQMHC3+J6IZm8YD53ft2d8mYBFgKektduucjx8sObe7eRyoQIDAQAB';
|
|
7
|
+
|
|
8
|
+
const randomString = (length) => {
|
|
9
|
+
if (length > 32) {
|
|
10
|
+
throw Error('Max length is 32.');
|
|
11
|
+
}
|
|
12
|
+
return uuidv4().replace(/-/g, '').substring(0, length);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const uuidv4 = () => crypto.randomUUID();
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @param {string} str
|
|
19
|
+
* @returns {CryptoJS.lib.WordArray}
|
|
20
|
+
*/
|
|
21
|
+
const MD5 = (str) => CryptoJS.MD5(str);
|
|
22
|
+
|
|
23
|
+
const encryptAES = (data, key) => {
|
|
24
|
+
if (typeof key === 'string') {
|
|
25
|
+
key = MD5(key);
|
|
26
|
+
}
|
|
27
|
+
return CryptoJS.AES.encrypt(CryptoJS.enc.Utf8.parse(data), key, {
|
|
28
|
+
mode: CryptoJS.mode.ECB,
|
|
29
|
+
padding: CryptoJS.pad.Pkcs7,
|
|
30
|
+
}).toString();
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const decryptAES = (data, key) => {
|
|
34
|
+
if (typeof key === 'string') {
|
|
35
|
+
key = MD5(key);
|
|
36
|
+
}
|
|
37
|
+
return CryptoJS.AES.decrypt(data, key, {
|
|
38
|
+
mode: CryptoJS.mode.ECB,
|
|
39
|
+
padding: CryptoJS.pad.Pkcs7,
|
|
40
|
+
}).toString(CryptoJS.enc.Utf8);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const encryptRSA = (data) => {
|
|
44
|
+
// Original code:
|
|
45
|
+
// var n = new JSEncrypt();
|
|
46
|
+
// n.setPublicKey(pubKey);
|
|
47
|
+
// return n.encrypt(message);
|
|
48
|
+
// Note: Server will reject the public key if it's encrypted using crypto.publicEncrypt().
|
|
49
|
+
let pubKey = `-----BEGIN PUBLIC KEY-----${publicKey}-----END PUBLIC KEY-----`;
|
|
50
|
+
pubKey = KEYUTIL.getKey(pubKey);
|
|
51
|
+
return hextob64(KJUR.crypto.Cipher.encrypt(data, pubKey));
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const getHeaders = (key) => {
|
|
55
|
+
const fingerPrint = uuidv4();
|
|
56
|
+
|
|
57
|
+
return {
|
|
58
|
+
'content-type': 'application/json',
|
|
59
|
+
'ovse-trace': uuidv4(),
|
|
60
|
+
callertype: 'USER',
|
|
61
|
+
fingerprint: encryptAES(fingerPrint, MD5(key)),
|
|
62
|
+
onetimeskey: encryptRSA(key),
|
|
63
|
+
timestamp: encryptAES(Date.now(), key),
|
|
64
|
+
referer: 'https://www.ainvest.com/',
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
module.exports = {
|
|
69
|
+
randomString,
|
|
70
|
+
encryptAES,
|
|
71
|
+
decryptAES,
|
|
72
|
+
getHeaders,
|
|
73
|
+
};
|
|
@@ -6,8 +6,8 @@ const { isValidHost } = require('@/utils/valid-host');
|
|
|
6
6
|
module.exports = async (ctx) => {
|
|
7
7
|
const pub = ctx.params.pub;
|
|
8
8
|
const jrn = ctx.params.jrn;
|
|
9
|
-
const host = `https
|
|
10
|
-
const jrnlUrl = `${host}
|
|
9
|
+
const host = `https://pubs.aip.org`;
|
|
10
|
+
const jrnlUrl = `${host}/${pub}/${jrn}/issue`;
|
|
11
11
|
if (!isValidHost(pub)) {
|
|
12
12
|
throw Error('Invalid pub');
|
|
13
13
|
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const { renderDesc } = require('./utils');
|
|
4
|
+
|
|
5
|
+
module.exports = async (ctx) => {
|
|
6
|
+
const pub = ctx.params.pub;
|
|
7
|
+
const jrn = ctx.params.jrn;
|
|
8
|
+
const host = `https://pubs.aip.org`;
|
|
9
|
+
const jrnlUrl = `${host}/${pub}/${jrn}/issue`;
|
|
10
|
+
|
|
11
|
+
const { data: response } = await got.get(jrnlUrl);
|
|
12
|
+
const $ = cheerio.load(response);
|
|
13
|
+
const jrnlName = $('meta[property="og:title"]')
|
|
14
|
+
.attr('content')
|
|
15
|
+
.match(/(?:[^=]*=)?\s*([^>]+)\s*/)[1];
|
|
16
|
+
const publication = $('.al-article-item-wrap.al-normal');
|
|
17
|
+
|
|
18
|
+
const list = publication
|
|
19
|
+
.map((_, item) => {
|
|
20
|
+
const title = $(item).find('.item-title a:first').text();
|
|
21
|
+
const link = $(item).find('.item-title a:first').attr('href');
|
|
22
|
+
const doilink = $(item).find('.citation-label a').attr('href');
|
|
23
|
+
const doi = doilink && doilink.match(/10\.\d+\/\S+/)[0];
|
|
24
|
+
const id = $(item).find('h5[data-resource-id-access]').data('resource-id-access');
|
|
25
|
+
const authors = $(item)
|
|
26
|
+
.find('.al-authors-list')
|
|
27
|
+
.find('a')
|
|
28
|
+
.map(function () {
|
|
29
|
+
return $(this).text();
|
|
30
|
+
})
|
|
31
|
+
.get()
|
|
32
|
+
.join('; ');
|
|
33
|
+
const imgUrl = $(item).find('.issue-featured-image a img').attr('src');
|
|
34
|
+
const img = imgUrl ? imgUrl.replace(/\?.+$/, '') : '';
|
|
35
|
+
const description = renderDesc(title, authors, doi, img);
|
|
36
|
+
return {
|
|
37
|
+
title,
|
|
38
|
+
link,
|
|
39
|
+
doilink,
|
|
40
|
+
id,
|
|
41
|
+
authors,
|
|
42
|
+
img,
|
|
43
|
+
doi,
|
|
44
|
+
description,
|
|
45
|
+
};
|
|
46
|
+
})
|
|
47
|
+
.get();
|
|
48
|
+
|
|
49
|
+
ctx.state.data = {
|
|
50
|
+
title: jrnlName,
|
|
51
|
+
link: jrnlUrl,
|
|
52
|
+
item: list,
|
|
53
|
+
allowEmpty: true,
|
|
54
|
+
};
|
|
55
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'aip.org': {
|
|
3
|
+
_name: 'American Institute of Physics',
|
|
4
|
+
pubs: [
|
|
5
|
+
{
|
|
6
|
+
title: 'Journal',
|
|
7
|
+
docs: 'https://docs.rsshub.app/routes/journal#american-institute-of-physics',
|
|
8
|
+
source: '/:pub/:jrn',
|
|
9
|
+
target: '/aip/:pub/:jrn',
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
|
+
},
|
|
13
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const { baseURL, puppeteerGet } = require('./utils');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
|
|
4
|
+
module.exports = async (ctx) => {
|
|
5
|
+
const name = ctx.params.name;
|
|
6
|
+
const query = new URLSearchParams(ctx.params.routeParams);
|
|
7
|
+
const link = `https://alternativeto.net/platform/${name}/?${query.toString()}`;
|
|
8
|
+
|
|
9
|
+
// use Puppeteer due to the obstacle by cloudflare challenge
|
|
10
|
+
const html = await puppeteerGet(link, ctx.cache);
|
|
11
|
+
const $ = cheerio.load(html);
|
|
12
|
+
|
|
13
|
+
ctx.state.data = {
|
|
14
|
+
title: $('.Heading_h1___Cf5Y').text().trim(),
|
|
15
|
+
description: $('.intro-text').text().trim(),
|
|
16
|
+
link,
|
|
17
|
+
item: $('.AppListItem_appInfo__h9cWP')
|
|
18
|
+
.toArray()
|
|
19
|
+
.map((element) => {
|
|
20
|
+
const item = $(element);
|
|
21
|
+
const title = item.find('.Heading_h2___LwQD').text().trim();
|
|
22
|
+
const link = `${baseURL}${item.find('.Heading_h2___LwQD a').attr('href')}`;
|
|
23
|
+
const description = item.find('.AppListItem_description__wtODK').text().trim();
|
|
24
|
+
|
|
25
|
+
return {
|
|
26
|
+
title,
|
|
27
|
+
link,
|
|
28
|
+
description,
|
|
29
|
+
};
|
|
30
|
+
}),
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'alternativeto.net': {
|
|
3
|
+
_name: 'AlternativeTo',
|
|
4
|
+
www: [
|
|
5
|
+
{
|
|
6
|
+
title: 'Software Alternatives',
|
|
7
|
+
docs: 'https://docs.rsshub.app/routes/programming#alternativeto-software-alternatives',
|
|
8
|
+
source: '/software/:name',
|
|
9
|
+
target: '/software/:name',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
title: 'Platform Software',
|
|
13
|
+
docs: 'https://docs.rsshub.app/routes/programming#alternativeto-platform-software',
|
|
14
|
+
source: '/platform/:name',
|
|
15
|
+
target: '/platform/:name',
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const { baseURL, puppeteerGet } = require('./utils');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
|
|
4
|
+
module.exports = async (ctx) => {
|
|
5
|
+
const name = ctx.params.name;
|
|
6
|
+
const query = new URLSearchParams(ctx.params.routeParams);
|
|
7
|
+
const link = `https://alternativeto.net/software/${name}/?${query.toString()}`;
|
|
8
|
+
|
|
9
|
+
// use Puppeteer due to the obstacle by cloudflare challenge
|
|
10
|
+
const html = await puppeteerGet(link, ctx.cache);
|
|
11
|
+
const $ = cheerio.load(html);
|
|
12
|
+
|
|
13
|
+
ctx.state.data = {
|
|
14
|
+
title: $('.Heading_h1___Cf5Y').text().trim(),
|
|
15
|
+
description: $('.intro-text').text().trim(),
|
|
16
|
+
link,
|
|
17
|
+
item: $('.AppListItem_appInfo__h9cWP')
|
|
18
|
+
.toArray()
|
|
19
|
+
.map((element) => {
|
|
20
|
+
const item = $(element);
|
|
21
|
+
const title = item.find('.Heading_h2___LwQD').text().trim();
|
|
22
|
+
const link = `${baseURL}${item.find('.Heading_h2___LwQD a').attr('href')}`;
|
|
23
|
+
const description = item.find('.AppListItem_description__wtODK').text().trim();
|
|
24
|
+
|
|
25
|
+
return {
|
|
26
|
+
title,
|
|
27
|
+
link,
|
|
28
|
+
description,
|
|
29
|
+
};
|
|
30
|
+
}),
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const baseURL = 'https://alternativeto.net';
|
|
2
|
+
|
|
3
|
+
const puppeteerGet = (url, cache) =>
|
|
4
|
+
cache.tryGet(url, async () => {
|
|
5
|
+
const browser = await require('@/utils/puppeteer')();
|
|
6
|
+
const page = await browser.newPage();
|
|
7
|
+
await page.setRequestInterception(true);
|
|
8
|
+
page.on('request', (request) => {
|
|
9
|
+
request.resourceType() === 'document' ? request.continue() : request.abort();
|
|
10
|
+
});
|
|
11
|
+
await page.goto(url, {
|
|
12
|
+
waitUntil: 'domcontentloaded',
|
|
13
|
+
});
|
|
14
|
+
const html = await page.evaluate(() => document.documentElement.innerHTML);
|
|
15
|
+
browser.close();
|
|
16
|
+
return html;
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
module.exports = {
|
|
20
|
+
baseURL,
|
|
21
|
+
puppeteerGet,
|
|
22
|
+
};
|
package/lib/v2/apnews/topics.js
CHANGED
|
@@ -12,6 +12,7 @@ module.exports = async (ctx) => {
|
|
|
12
12
|
const items = await Promise.all(
|
|
13
13
|
$('.PagePromo-content')
|
|
14
14
|
.get()
|
|
15
|
+
.slice(0, ctx.query.limit ? parseInt(ctx.query.limit) : Infinity)
|
|
15
16
|
.map((e) => ({
|
|
16
17
|
title: $(e).find('span.PagePromoContentIcons-text').text(),
|
|
17
18
|
link: $(e).find('a').attr('href'),
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
4
|
+
|
|
5
|
+
module.exports = async (ctx) => {
|
|
6
|
+
const { id, country } = ctx.params;
|
|
7
|
+
const limit = ctx.query.limit ? parseInt(ctx.query.limit, 10) : 100;
|
|
8
|
+
|
|
9
|
+
const rootUrl = 'https://apps.apple.com';
|
|
10
|
+
const currentUrl = new URL(`${country}/app/${id}`, rootUrl).href;
|
|
11
|
+
|
|
12
|
+
const { data: response } = await got(currentUrl);
|
|
13
|
+
|
|
14
|
+
const $ = cheerio.load(response);
|
|
15
|
+
|
|
16
|
+
const webPlatform = $('meta[property="og:site_name"]').prop('content');
|
|
17
|
+
const subtitle = $('h2.whats-new__headline').text() || "What's New";
|
|
18
|
+
|
|
19
|
+
const appData = JSON.parse(Object.values(JSON.parse($('script#shoebox-media-api-cache-apps').text()))[0]);
|
|
20
|
+
const attributes = appData.d[0].attributes;
|
|
21
|
+
const appName = attributes.name;
|
|
22
|
+
const artistName = attributes.artistName;
|
|
23
|
+
const platform = Object.values(attributes.platformAttributes)[0]; // may incldes osx appletvos, ios, etc.
|
|
24
|
+
|
|
25
|
+
const items = platform.versionHistory.slice(0, limit).map((item) => ({
|
|
26
|
+
title: `${appName} ${item.versionDisplay}`,
|
|
27
|
+
link: currentUrl,
|
|
28
|
+
description: item.releaseNotes?.replace(/\n/g, '<br>'),
|
|
29
|
+
guid: `apple:apps:update:${country}:${id}:${item.versionDisplay}`,
|
|
30
|
+
pubDate: parseDate(item.releaseTimestamp),
|
|
31
|
+
}));
|
|
32
|
+
|
|
33
|
+
const icon = new URL('favicon.ico', rootUrl).href;
|
|
34
|
+
|
|
35
|
+
ctx.state.data = {
|
|
36
|
+
item: items,
|
|
37
|
+
title: `${appName} for ${/^App/.test(webPlatform) ? 'iOS' : 'macOS'} ${subtitle}`,
|
|
38
|
+
link: currentUrl,
|
|
39
|
+
description: platform.description.standard?.replace(/\n/g, ' '),
|
|
40
|
+
language: $('html').prop('lang'),
|
|
41
|
+
image: $('meta[property="og:image"]').prop('content'),
|
|
42
|
+
icon,
|
|
43
|
+
logo: icon,
|
|
44
|
+
subtitle: appName,
|
|
45
|
+
author: artistName,
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
ctx.state.json = {
|
|
49
|
+
appData,
|
|
50
|
+
};
|
|
51
|
+
};
|
package/lib/v2/apple/radar.js
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
'apple.com': {
|
|
3
3
|
_name: 'Apple',
|
|
4
|
+
apps: [
|
|
5
|
+
{
|
|
6
|
+
title: 'App Update',
|
|
7
|
+
docs: 'https://docs.rsshub.app/routes/program-update#app-store-mac-app-store-app-update',
|
|
8
|
+
source: ['/:country/app/:appSlug/:id', '/:country/app/:id'],
|
|
9
|
+
target: '/apple/apps/update/:country/:id',
|
|
10
|
+
},
|
|
11
|
+
],
|
|
4
12
|
support: [
|
|
5
13
|
{
|
|
6
14
|
title: '换和维修扩展计划',
|
package/lib/v2/apple/router.js
CHANGED
package/lib/v2/appstore/radar.js
CHANGED
|
@@ -2,12 +2,6 @@ module.exports = {
|
|
|
2
2
|
'apple.com': {
|
|
3
3
|
_name: 'Apple',
|
|
4
4
|
apps: [
|
|
5
|
-
{
|
|
6
|
-
title: '应用更新',
|
|
7
|
-
docs: 'https://docs.rsshub.app/routes/program-update#app-store-mac-app-store',
|
|
8
|
-
source: ['/:contry/app/:id'],
|
|
9
|
-
target: '/appstore/update/:country/:id',
|
|
10
|
-
},
|
|
11
5
|
{
|
|
12
6
|
title: '价格更新',
|
|
13
7
|
docs: 'https://docs.rsshub.app/routes/program-update#app-store-mac-app-store',
|
|
@@ -3,5 +3,4 @@ module.exports = function (router) {
|
|
|
3
3
|
router.get('/xianmian', require('./xianmian'));
|
|
4
4
|
router.get('/iap/:country/:id', require('./in-app-purchase'));
|
|
5
5
|
router.get('/price/:country/:type/:id', require('./price'));
|
|
6
|
-
router.get('/update/:country/:id', require('./update'));
|
|
7
6
|
};
|
package/lib/v2/aqara/news.js
CHANGED
|
@@ -3,51 +3,51 @@ const cheerio = require('cheerio');
|
|
|
3
3
|
const { parseDate } = require('@/utils/parse-date');
|
|
4
4
|
|
|
5
5
|
module.exports = async (ctx) => {
|
|
6
|
-
const limit = ctx.query.limit ? parseInt(ctx.query.limit) : 35;
|
|
6
|
+
const limit = ctx.query.limit ? parseInt(ctx.query.limit, 10) : 35;
|
|
7
7
|
|
|
8
|
-
const rootUrl = 'https://www.aqara.
|
|
9
|
-
const currentUrl =
|
|
8
|
+
const rootUrl = 'https://www.aqara.cn';
|
|
9
|
+
const currentUrl = new URL('news', rootUrl).href;
|
|
10
10
|
|
|
11
|
-
const response = await got(
|
|
12
|
-
method: 'get',
|
|
13
|
-
url: currentUrl,
|
|
14
|
-
});
|
|
11
|
+
const { data: response } = await got(currentUrl);
|
|
15
12
|
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
const $ = cheerio.load(response);
|
|
14
|
+
|
|
15
|
+
let items = response
|
|
16
|
+
.match(/(parm\.newsTitle[\s\S]*?arr\.push\(parm\))/g)
|
|
18
17
|
.slice(0, limit)
|
|
19
18
|
.map((item) => ({
|
|
20
|
-
|
|
19
|
+
title: item.match(/parm\.newsTitle = '(.*?)'/)[1],
|
|
20
|
+
link: new URL(item.match(/parm\.contentHerf = '(\d+)'/)[1], rootUrl).href,
|
|
21
|
+
pubDate: parseDate(item.match(/parm\.issueTime = '(.*?)'/)[1], 'YYYY 年 MM 月 DD 日'),
|
|
21
22
|
}));
|
|
22
23
|
|
|
23
24
|
items = await Promise.all(
|
|
24
25
|
items.map((item) =>
|
|
25
26
|
ctx.cache.tryGet(item.link, async () => {
|
|
26
|
-
const detailResponse = await got(
|
|
27
|
-
method: 'get',
|
|
28
|
-
url: item.link,
|
|
29
|
-
});
|
|
27
|
+
const { data: detailResponse } = await got(item.link);
|
|
30
28
|
|
|
31
|
-
const content = cheerio.load(detailResponse
|
|
29
|
+
const content = cheerio.load(detailResponse);
|
|
32
30
|
|
|
33
31
|
item.title = content('h4.fnt_56').last().text();
|
|
34
|
-
item.description = content('.news_body').html();
|
|
35
|
-
item.pubDate = parseDate(
|
|
36
|
-
content('.news_date')
|
|
37
|
-
.first()
|
|
38
|
-
.text()
|
|
39
|
-
.replace(/( {2}年 {2}| {2}月 {2})/g, '-')
|
|
40
|
-
.replace(/ {2}日/, '')
|
|
41
|
-
);
|
|
32
|
+
item.description = content('div.news_body').html();
|
|
33
|
+
item.pubDate = parseDate(content('div.news_date').first().text(), 'YYYY 年 MM 月 DD 日');
|
|
42
34
|
|
|
43
35
|
return item;
|
|
44
36
|
})
|
|
45
37
|
)
|
|
46
38
|
);
|
|
47
39
|
|
|
40
|
+
const icon = $('link[rel="shortcut icon"]').prop('href').split('?')[0];
|
|
41
|
+
|
|
48
42
|
ctx.state.data = {
|
|
49
|
-
title: '新闻动态 - Aqara 全屋智能',
|
|
50
|
-
link: currentUrl,
|
|
51
43
|
item: items,
|
|
44
|
+
title: $('title').text(),
|
|
45
|
+
link: currentUrl,
|
|
46
|
+
description: $('meta[name="description"]').prop('content'),
|
|
47
|
+
language: 'zh-cn',
|
|
48
|
+
image: $('meta[property="og:image"]').prop('content'),
|
|
49
|
+
icon,
|
|
50
|
+
logo: icon,
|
|
51
|
+
author: $('meta[name="author"]').prop('content'),
|
|
52
52
|
};
|
|
53
53
|
};
|
|
@@ -0,0 +1,92 @@
|
|
|
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 limit = ctx.query.limit ? parseInt(ctx.query.limit, 10) : 50;
|
|
9
|
+
|
|
10
|
+
const rootUrl = 'https://aqara.com';
|
|
11
|
+
const apiSlug = 'wp-json/wp/v2';
|
|
12
|
+
|
|
13
|
+
let filterName;
|
|
14
|
+
|
|
15
|
+
let currentUrl = rootUrl;
|
|
16
|
+
let apiUrl = new URL(`${apiSlug}/posts?_embed=true&per_page=${limit}`, rootUrl).href;
|
|
17
|
+
|
|
18
|
+
const filterMatches = ctx.path.match(/^\/([^/]*)\/([^/]*)\/(.*)$/);
|
|
19
|
+
|
|
20
|
+
if (filterMatches) {
|
|
21
|
+
const filterRegion = filterMatches[1];
|
|
22
|
+
const filterType = filterMatches[2] === 'tag' ? 'tags' : filterMatches[2] === 'category' ? 'categories' : filterMatches[2];
|
|
23
|
+
const filterKeyword = decodeURI(filterMatches[3].split('/').pop());
|
|
24
|
+
const filterApiUrl = new URL(`${filterRegion}/${apiSlug}/${filterType}?search=${filterKeyword}`, rootUrl).href;
|
|
25
|
+
|
|
26
|
+
const { data: filterResponse } = await got(filterApiUrl);
|
|
27
|
+
|
|
28
|
+
const filter = filterResponse.pop();
|
|
29
|
+
|
|
30
|
+
if (filter?.id ?? undefined) {
|
|
31
|
+
filterName = filter.name ?? filterKeyword;
|
|
32
|
+
currentUrl = filter.link ?? currentUrl;
|
|
33
|
+
apiUrl = new URL(`${filterRegion}/${apiSlug}/posts?_embed=true&per_page=${limit}&${filterType}=${filter.id}`, rootUrl).href;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const { data: response } = await got(apiUrl);
|
|
38
|
+
|
|
39
|
+
const items = response.slice(0, limit).map((item) => {
|
|
40
|
+
const terminologies = item._embedded['wp:term'];
|
|
41
|
+
|
|
42
|
+
const content = cheerio.load(item.content?.rendered ?? item.content);
|
|
43
|
+
|
|
44
|
+
// To handle lazy-loaded images.
|
|
45
|
+
|
|
46
|
+
content('figure').each(function () {
|
|
47
|
+
const image = content(this).find('img');
|
|
48
|
+
const src = (image.prop('data-actualsrc') ?? image.prop('data-original') ?? image.prop('src')).replace(/(-\d+x\d+)/, '');
|
|
49
|
+
const width = image.prop('data-rawwidth') ?? image.prop('width');
|
|
50
|
+
const height = image.prop('data-rawheight') ?? image.prop('height');
|
|
51
|
+
|
|
52
|
+
content(this).replaceWith(
|
|
53
|
+
art(path.join(__dirname, 'templates/figure.art'), {
|
|
54
|
+
src,
|
|
55
|
+
width,
|
|
56
|
+
height,
|
|
57
|
+
})
|
|
58
|
+
);
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
title: item.title?.rendered ?? item.title,
|
|
63
|
+
link: item.link,
|
|
64
|
+
description: content.html(),
|
|
65
|
+
author: item._embedded.author.map((a) => a.name).join('/'),
|
|
66
|
+
category: [].concat(...terminologies).map((c) => c.name),
|
|
67
|
+
guid: item.guid?.rendered ?? item.guid,
|
|
68
|
+
pubDate: parseDate(item.date_gmt),
|
|
69
|
+
updated: parseDate(item.modified_gmt),
|
|
70
|
+
};
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
const { data: currentResponse } = await got(currentUrl);
|
|
74
|
+
|
|
75
|
+
const $ = cheerio.load(currentResponse);
|
|
76
|
+
|
|
77
|
+
const icon = $('link[rel="apple-touch-icon"]').first().prop('href');
|
|
78
|
+
const title = $('meta[property="og:site_name"]').prop('content') ?? 'Aqara';
|
|
79
|
+
|
|
80
|
+
ctx.state.data = {
|
|
81
|
+
item: items,
|
|
82
|
+
title: `${title}${filterName ? ` - ${filterName}` : ''}`,
|
|
83
|
+
link: currentUrl,
|
|
84
|
+
description: $('meta[property="og:title"]').prop('content'),
|
|
85
|
+
language: $('meta[property="og:locale"]').prop('content'),
|
|
86
|
+
image: $('meta[name="msapplication-TileImage"]').prop('content'),
|
|
87
|
+
icon,
|
|
88
|
+
logo: icon,
|
|
89
|
+
subtitle: $('meta[property="og:type"]').prop('content'),
|
|
90
|
+
author: title,
|
|
91
|
+
};
|
|
92
|
+
};
|
package/lib/v2/aqara/radar.js
CHANGED
|
@@ -3,16 +3,34 @@ module.exports = {
|
|
|
3
3
|
_name: 'Aqara',
|
|
4
4
|
'.': [
|
|
5
5
|
{
|
|
6
|
-
title: '
|
|
7
|
-
docs: 'https://docs.rsshub.app/routes/other#aqara-
|
|
8
|
-
source: ['/news', '/'],
|
|
9
|
-
target: '/aqara/news',
|
|
6
|
+
title: '新闻',
|
|
7
|
+
docs: 'https://docs.rsshub.app/routes/other#aqara-xin-wen',
|
|
8
|
+
source: ['/:region/about-us/news', '/news'],
|
|
9
|
+
target: '/aqara/:region/news',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
title: '博客',
|
|
13
|
+
docs: 'https://docs.rsshub.app/routes/other#aqara-bo-ke',
|
|
14
|
+
source: ['/:region/blog'],
|
|
15
|
+
target: '/aqara/:region/blog',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
title: '分类',
|
|
19
|
+
docs: 'https://docs.rsshub.app/routes/other#aqara-fen-lei',
|
|
20
|
+
source: ['/:region/category/:id'],
|
|
21
|
+
target: '/aqara/:region/category/:id',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
title: '标签',
|
|
25
|
+
docs: 'https://docs.rsshub.app/routes/other#aqara-biao-qian',
|
|
26
|
+
source: ['/:region/tag/:id'],
|
|
27
|
+
target: '/aqara/:region/tag/:id',
|
|
10
28
|
},
|
|
11
29
|
],
|
|
12
30
|
community: [
|
|
13
31
|
{
|
|
14
|
-
title: '
|
|
15
|
-
docs: 'https://docs.rsshub.app/routes/other#aqara-
|
|
32
|
+
title: '社区',
|
|
33
|
+
docs: 'https://docs.rsshub.app/routes/other#aqara-she-qu',
|
|
16
34
|
source: ['/pc', '/'],
|
|
17
35
|
target: (params, url) => `/aqara/community/${new URL(url).searchParams.get('id')}`,
|
|
18
36
|
},
|
package/lib/v2/aqara/router.js
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
module.exports = function (router) {
|
|
2
|
+
router.get('/cn/news', require('./news'));
|
|
2
3
|
router.get('/community/:id?/:keyword?', require('./community'));
|
|
3
|
-
router.get('
|
|
4
|
+
router.get('/:region/:type?', (ctx) => {
|
|
5
|
+
const types = {
|
|
6
|
+
news: 'press-release',
|
|
7
|
+
blog: 'article',
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const { region = 'en', type = 'news' } = ctx.params;
|
|
11
|
+
const redirectTo = `/aqara/${region}/category/${types[type]}`;
|
|
12
|
+
ctx.redirect(redirectTo);
|
|
13
|
+
});
|
|
14
|
+
router.get(/([\w-/]+)?/, require('./post'));
|
|
4
15
|
};
|