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
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
'/gushitong/index': ['CaoMeiYouRen'],
|
|
3
|
-
'/tieba/forum/:kw': ['u3u'],
|
|
4
|
-
'/tieba/forum
|
|
3
|
+
'/tieba/forum/good/:kw/:cid?/:sortBy?': ['u3u'],
|
|
4
|
+
'/tieba/forum/:kw/:sortBy?': ['u3u'],
|
|
5
5
|
'/tieba/post/:id': ['u3u'],
|
|
6
6
|
'/tieba/post/lz/:id': ['u3u'],
|
|
7
|
+
'/tieba/search/:qw/:routeParams?': ['JimenezLi'],
|
|
7
8
|
'/tieba/user/:uid': ['igxlin', 'nczitzk'],
|
|
8
9
|
'/top/:board?': ['xyqfer'],
|
|
9
10
|
};
|
package/lib/v2/baidu/radar.js
CHANGED
|
@@ -46,7 +46,7 @@ module.exports = {
|
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
title: '用户帖子',
|
|
49
|
-
docs: 'https://docs.rsshub.app/routes/bbs#tie-ba',
|
|
49
|
+
docs: 'https://docs.rsshub.app/routes/bbs#bai-du-tie-ba',
|
|
50
50
|
source: '/home/main',
|
|
51
51
|
target: (params, url) => {
|
|
52
52
|
const uid = new URL(url).searchParams.get('un');
|
|
@@ -55,6 +55,20 @@ module.exports = {
|
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
},
|
|
58
|
+
{
|
|
59
|
+
title: '贴吧搜索',
|
|
60
|
+
docs: 'https://docs.rsshub.app/routes/bbs#bai-du-tie-ba',
|
|
61
|
+
source: '/f/search/res',
|
|
62
|
+
target: (params, url) => {
|
|
63
|
+
const searchParams = new URL(url).searchParams;
|
|
64
|
+
const qw = searchParams.get('qw');
|
|
65
|
+
const kw = searchParams.get('kw');
|
|
66
|
+
if (qw) {
|
|
67
|
+
const route = `/baidu/tieba/user/${qw}`;
|
|
68
|
+
return kw ? `${route}/kw=${kw}` : route;
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
},
|
|
58
72
|
],
|
|
59
73
|
top: [
|
|
60
74
|
{
|
package/lib/v2/baidu/router.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
module.exports = (router) => {
|
|
2
2
|
router.get('/gushitong/index', require('./gushitong'));
|
|
3
|
-
router.get('/tieba/forum/:kw', require('./tieba/forum'));
|
|
4
|
-
router.get('/tieba/forum
|
|
3
|
+
router.get('/tieba/forum/good/:kw/:cid?/:sortBy?', require('./tieba/forum'));
|
|
4
|
+
router.get('/tieba/forum/:kw/:sortBy?', require('./tieba/forum'));
|
|
5
5
|
router.get('/tieba/post/:id', require('./tieba/post'));
|
|
6
6
|
router.get('/tieba/post/lz/:id', require('./tieba/post'));
|
|
7
|
+
router.get('/tieba/search/:qw/:routeParams?', require('./tieba/search'));
|
|
7
8
|
router.get('/tieba/user/:uid', require('./tieba/user'));
|
|
8
9
|
router.get('/top/:board?', require('./top'));
|
|
9
10
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<p>{{ details }}</p><p>{{@ medias }}</p><p>贴吧:{{ tieba }}<br/>作者:{{ author }}</p>
|
|
@@ -6,7 +6,8 @@ const { art } = require('@/utils/render');
|
|
|
6
6
|
const path = require('path');
|
|
7
7
|
|
|
8
8
|
module.exports = async (ctx) => {
|
|
9
|
-
|
|
9
|
+
// sortBy: created, replied
|
|
10
|
+
const { kw, cid = '0', sortBy = 'created' } = ctx.params;
|
|
10
11
|
|
|
11
12
|
// PC端:https://tieba.baidu.com/f?kw=${encodeURIComponent(kw)}
|
|
12
13
|
// 移动端接口:https://tieba.baidu.com/mo/q/m?kw=${encodeURIComponent(kw)}&lp=5024&forum_recommend=1&lm=0&cid=0&has_url_param=1&pn=0&is_ajax=1
|
|
@@ -31,7 +32,7 @@ module.exports = async (ctx) => {
|
|
|
31
32
|
.map((element) => {
|
|
32
33
|
const item = $(element);
|
|
33
34
|
const { id, author_name } = item.data('field');
|
|
34
|
-
const time = item.find('.threadlist_reply_date').text().trim();
|
|
35
|
+
const time = sortBy === 'created' ? item.find('.is_show_create_time').text().trim() : item.find('.threadlist_reply_date').text().trim();
|
|
35
36
|
const title = item.find('a.j_th_tit').text().trim();
|
|
36
37
|
const details = item.find('.threadlist_abs').text().trim();
|
|
37
38
|
const medias = item
|
|
@@ -50,7 +51,7 @@ module.exports = async (ctx) => {
|
|
|
50
51
|
medias,
|
|
51
52
|
author_name,
|
|
52
53
|
}),
|
|
53
|
-
pubDate: timezone(parseDate(time, ['HH:mm', 'M-D']), +8),
|
|
54
|
+
pubDate: timezone(parseDate(time, ['HH:mm', 'M-D', 'YYYY-MM'], true), +8),
|
|
54
55
|
link: `https://tieba.baidu.com/p/${id}`,
|
|
55
56
|
};
|
|
56
57
|
});
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const iconv = require('iconv-lite');
|
|
4
|
+
const timezone = require('@/utils/timezone');
|
|
5
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
6
|
+
const { art } = require('@/utils/render');
|
|
7
|
+
const path = require('path');
|
|
8
|
+
|
|
9
|
+
module.exports = async (ctx) => {
|
|
10
|
+
const qw = ctx.params.qw;
|
|
11
|
+
const query = new URLSearchParams(ctx.params.routeParams);
|
|
12
|
+
query.set('ie', 'utf-8');
|
|
13
|
+
query.set('qw', qw);
|
|
14
|
+
query.set('rn', query.get('rn') || 20); // Number of returned items
|
|
15
|
+
const link = `https://tieba.baidu.com/f/search/res?${query.toString()}`;
|
|
16
|
+
|
|
17
|
+
const response = await got.get(link, {
|
|
18
|
+
headers: {
|
|
19
|
+
Referer: 'https://tieba.baidu.com',
|
|
20
|
+
},
|
|
21
|
+
responseType: 'buffer',
|
|
22
|
+
});
|
|
23
|
+
const data = iconv.decode(response.data, 'gbk');
|
|
24
|
+
|
|
25
|
+
const $ = cheerio.load(data);
|
|
26
|
+
const resultList = $('div.s_post');
|
|
27
|
+
|
|
28
|
+
ctx.state.data = {
|
|
29
|
+
title: `${qw} - ${query.get('kw') || '百度贴'}吧搜索`,
|
|
30
|
+
link,
|
|
31
|
+
item: resultList.toArray().map((element) => {
|
|
32
|
+
const item = $(element);
|
|
33
|
+
const titleItem = item.find('.p_title a');
|
|
34
|
+
const title = titleItem.text().trim();
|
|
35
|
+
const link = titleItem.attr('href');
|
|
36
|
+
const time = item.find('.p_date').text().trim();
|
|
37
|
+
const details = item.find('.p_content').text().trim();
|
|
38
|
+
const medias = item
|
|
39
|
+
.find('.p_mediaCont img')
|
|
40
|
+
.toArray()
|
|
41
|
+
.map((element) => {
|
|
42
|
+
const item = $(element);
|
|
43
|
+
return `<img src="${item.attr('original')}">`;
|
|
44
|
+
})
|
|
45
|
+
.join('');
|
|
46
|
+
const tieba = item.find('a.p_forum').text().trim();
|
|
47
|
+
const author = item.find('a').last().text().trim();
|
|
48
|
+
|
|
49
|
+
return {
|
|
50
|
+
title,
|
|
51
|
+
description: art(path.join(__dirname, '../templates/tieba_search.art'), {
|
|
52
|
+
details,
|
|
53
|
+
medias,
|
|
54
|
+
tieba,
|
|
55
|
+
author,
|
|
56
|
+
}),
|
|
57
|
+
author,
|
|
58
|
+
pubDate: timezone(parseDate(time, 'YYYY-MM-DD HH:mm'), +8),
|
|
59
|
+
link,
|
|
60
|
+
};
|
|
61
|
+
}),
|
|
62
|
+
};
|
|
63
|
+
};
|
|
@@ -12,6 +12,7 @@ module.exports = {
|
|
|
12
12
|
'/tv/subject/:id/blogs': ['ylc395'],
|
|
13
13
|
'/tv/subject/:id/comments': ['ylc395'],
|
|
14
14
|
'/tv/subject/:id/topics': ['ylc395'],
|
|
15
|
+
'/tv/subject/:id/:type?/:showOriginalName?': ['JimenezLi'],
|
|
15
16
|
'/tv/topic/:id': ['ylc395'],
|
|
16
17
|
'/tv/user/blog/:id': ['nczitzk'],
|
|
17
18
|
};
|
package/lib/v2/bangumi/radar.js
CHANGED
|
@@ -3,55 +3,55 @@ const bangumiTV = {
|
|
|
3
3
|
'.': [
|
|
4
4
|
{
|
|
5
5
|
title: '小组话题',
|
|
6
|
-
docs: 'https://docs.rsshub.app/routes/anime#bangumi',
|
|
6
|
+
docs: 'https://docs.rsshub.app/routes/anime#bangumi-fan-zu-ji-hua',
|
|
7
7
|
source: '/group/:id',
|
|
8
8
|
target: '/bangumi/tv/group/:id',
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
11
|
title: '小组话题的新回复',
|
|
12
|
-
docs: 'https://docs.rsshub.app/routes/anime#bangumi',
|
|
12
|
+
docs: 'https://docs.rsshub.app/routes/anime#bangumi-fan-zu-ji-hua',
|
|
13
13
|
source: '/group/topic/:id',
|
|
14
14
|
target: '/bangumi/tv/topic/:id',
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
title: '现实人物的新作品',
|
|
18
|
-
docs: 'https://docs.rsshub.app/routes/anime#bangumi',
|
|
18
|
+
docs: 'https://docs.rsshub.app/routes/anime#bangumi-fan-zu-ji-hua',
|
|
19
19
|
source: '/person/:id',
|
|
20
20
|
target: '/bangumi/tv/person/:id',
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
title: '用户日志',
|
|
24
|
-
docs: 'https://docs.rsshub.app/routes/anime#bangumi',
|
|
24
|
+
docs: 'https://docs.rsshub.app/routes/anime#bangumi-fan-zu-ji-hua',
|
|
25
25
|
source: '/user/:id',
|
|
26
26
|
target: '/bangumi/tv/user/blog/:id',
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
title: '条目的讨论',
|
|
30
|
-
docs: 'https://docs.rsshub.app/routes/anime#bangumi',
|
|
30
|
+
docs: 'https://docs.rsshub.app/routes/anime#bangumi-fan-zu-ji-hua',
|
|
31
31
|
source: '/subject/:id',
|
|
32
32
|
target: '/bangumi/tv/subject/:id/topics',
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
title: '条目的评论',
|
|
36
|
-
docs: 'https://docs.rsshub.app/routes/anime#bangumi',
|
|
36
|
+
docs: 'https://docs.rsshub.app/routes/anime#bangumi-fan-zu-ji-hua',
|
|
37
37
|
source: '/subject/:id',
|
|
38
38
|
target: '/bangumi/tv/subject/:id/blogs',
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
title: '条目的章节',
|
|
42
|
-
docs: 'https://docs.rsshub.app/routes/anime#bangumi',
|
|
42
|
+
docs: 'https://docs.rsshub.app/routes/anime#bangumi-fan-zu-ji-hua',
|
|
43
43
|
source: '/subject/:id',
|
|
44
44
|
target: '/bangumi/tv/subject/:id',
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
title: '条目的吐槽箱',
|
|
48
|
-
docs: 'https://docs.rsshub.app/routes/anime#bangumi',
|
|
48
|
+
docs: 'https://docs.rsshub.app/routes/anime#bangumi-fan-zu-ji-hua',
|
|
49
49
|
source: '/subject/:id',
|
|
50
50
|
target: '/bangumi/tv/subject/:id/comments',
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
title: '放送列表',
|
|
54
|
-
docs: 'https://docs.rsshub.app/routes/anime#bangumi',
|
|
54
|
+
docs: 'https://docs.rsshub.app/routes/anime#bangumi-fan-zu-ji-hua',
|
|
55
55
|
source: '/calendar',
|
|
56
56
|
target: '/bangumi/tv/calendar/today',
|
|
57
57
|
},
|
package/lib/v2/bangumi/router.js
CHANGED
|
@@ -7,8 +7,7 @@ module.exports = function (router) {
|
|
|
7
7
|
router.get('/tv/calendar/today', require('./tv/calendar/today'));
|
|
8
8
|
router.get('/tv/group/:id', require('./tv/group/topic'));
|
|
9
9
|
router.get('/tv/person/:id', require('./tv/person'));
|
|
10
|
-
router.get('/tv/subject/:id', require('./tv/subject'));
|
|
11
|
-
router.get('/tv/subject/:id/:type', require('./tv/subject'));
|
|
10
|
+
router.get('/tv/subject/:id/:type?/:showOriginalName?', require('./tv/subject'));
|
|
12
11
|
router.get('/tv/topic/:id', require('./tv/group/reply'));
|
|
13
12
|
router.get('/tv/user/blog/:id', require('./tv/user/blog'));
|
|
14
13
|
};
|
|
@@ -2,8 +2,9 @@ const got = require('@/utils/got');
|
|
|
2
2
|
const { parseDate } = require('@/utils/parse-date');
|
|
3
3
|
const { art } = require('@/utils/render');
|
|
4
4
|
const path = require('path');
|
|
5
|
+
const { getLocalName } = require('./utils');
|
|
5
6
|
|
|
6
|
-
module.exports = async (subjectID) => {
|
|
7
|
+
module.exports = async (subjectID, showOriginalName) => {
|
|
7
8
|
const url = `https://api.bgm.tv/subject/${subjectID}?responseGroup=large`;
|
|
8
9
|
const { data: epsInfo } = await got(url);
|
|
9
10
|
const activeEps = [];
|
|
@@ -15,11 +16,11 @@ module.exports = async (subjectID) => {
|
|
|
15
16
|
});
|
|
16
17
|
|
|
17
18
|
return {
|
|
18
|
-
title: epsInfo
|
|
19
|
+
title: getLocalName(epsInfo, showOriginalName),
|
|
19
20
|
link: `https://bgm.tv/subject/${subjectID}`,
|
|
20
21
|
description: epsInfo.summary,
|
|
21
22
|
item: activeEps.map((e) => ({
|
|
22
|
-
title: `ep.${e.sort} ${e
|
|
23
|
+
title: `ep.${e.sort} ${getLocalName(e, showOriginalName)}`,
|
|
23
24
|
description: art(path.resolve(__dirname, '../../templates/tv/ep.art'), {
|
|
24
25
|
e,
|
|
25
26
|
epsInfo,
|
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
const getComments = require('./comments.js');
|
|
2
2
|
const getFromAPI = require('./offcial-subject-api.js');
|
|
3
3
|
const getEps = require('./ep.js');
|
|
4
|
+
const { queryToBoolean } = require('@/utils/readable-social');
|
|
4
5
|
|
|
5
6
|
module.exports = async (ctx) => {
|
|
6
7
|
const id = ctx.params.id;
|
|
8
|
+
const type = ctx.params.type || 'ep';
|
|
9
|
+
const showOriginalName = queryToBoolean(ctx.params.showOriginalName);
|
|
7
10
|
let response;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
response = await getEps(id);
|
|
11
|
+
switch (type) {
|
|
12
|
+
case 'ep':
|
|
13
|
+
response = await getEps(id, showOriginalName);
|
|
14
|
+
break;
|
|
15
|
+
case 'comments':
|
|
16
|
+
response = await getComments(id, Number(ctx.query.minLength) || 0);
|
|
17
|
+
break;
|
|
18
|
+
case 'blogs':
|
|
19
|
+
response = await getFromAPI('blog')(id, showOriginalName);
|
|
20
|
+
break;
|
|
21
|
+
case 'topics':
|
|
22
|
+
response = await getFromAPI('topic')(id, showOriginalName);
|
|
23
|
+
break;
|
|
24
|
+
default:
|
|
25
|
+
throw Error(`暂不支持对${type}的订阅`);
|
|
24
26
|
}
|
|
25
27
|
ctx.state.data = response;
|
|
26
28
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const got = require('@/utils/got');
|
|
2
2
|
const { parseDate } = require('@/utils/parse-date');
|
|
3
|
+
const { getLocalName } = require('./utils');
|
|
3
4
|
|
|
4
5
|
module.exports = (type) => {
|
|
5
6
|
const mapping = {
|
|
@@ -13,12 +14,12 @@ module.exports = (type) => {
|
|
|
13
14
|
},
|
|
14
15
|
};
|
|
15
16
|
|
|
16
|
-
return async (subjectID) => {
|
|
17
|
+
return async (subjectID, showOriginalName) => {
|
|
17
18
|
// 官方提供的条目API文档见 https://github.com/bangumi/api/blob/3f3fa6390c468816f9883d24be488e41f8946159/docs-raw/Subject-API.md
|
|
18
19
|
const url = `https://api.bgm.tv/subject/${subjectID}?responseGroup=large`;
|
|
19
20
|
const { data: subjectInfo } = await got(url);
|
|
20
21
|
return {
|
|
21
|
-
title: `${subjectInfo
|
|
22
|
+
title: `${getLocalName(subjectInfo, showOriginalName)}的 Bangumi ${mapping[type].cn}`,
|
|
22
23
|
link: `https://bgm.tv/subject/${subjectInfo.id}/${mapping[type].en}`,
|
|
23
24
|
item: subjectInfo[type].map((article) => ({
|
|
24
25
|
title: `${article.user.nickname}:${article.title}`,
|
|
@@ -16,9 +16,9 @@ module.exports = async (ctx) => {
|
|
|
16
16
|
title = 'BBC News 中文网';
|
|
17
17
|
|
|
18
18
|
if (!channel) {
|
|
19
|
-
feed = await parser.parseURL('
|
|
19
|
+
feed = await parser.parseURL('https://www.bbc.co.uk/zhongwen/simp/index.xml');
|
|
20
20
|
} else {
|
|
21
|
-
feed = await parser.parseURL(`
|
|
21
|
+
feed = await parser.parseURL(`https://www.bbc.co.uk/zhongwen/simp/${channel}/index.xml`);
|
|
22
22
|
}
|
|
23
23
|
break;
|
|
24
24
|
|
|
@@ -26,9 +26,9 @@ module.exports = async (ctx) => {
|
|
|
26
26
|
title = 'BBC News 中文網';
|
|
27
27
|
|
|
28
28
|
if (!channel) {
|
|
29
|
-
feed = await parser.parseURL('
|
|
29
|
+
feed = await parser.parseURL('https://www.bbc.co.uk/zhongwen/trad/index.xml');
|
|
30
30
|
} else {
|
|
31
|
-
feed = await parser.parseURL(`
|
|
31
|
+
feed = await parser.parseURL(`https://www.bbc.co.uk/zhongwen/trad/${channel}/index.xml`);
|
|
32
32
|
}
|
|
33
33
|
link = 'https://www.bbc.com/zhongwen/trad';
|
|
34
34
|
break;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const got = require('@/utils/got');
|
|
2
2
|
const cache = require('./cache');
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
const { parseDate } = require('@/utils/parse-date');
|
|
5
5
|
module.exports = async (ctx) => {
|
|
6
6
|
const uid = ctx.params.uid;
|
|
@@ -18,22 +18,7 @@ module.exports = async (ctx) => {
|
|
|
18
18
|
const description = `${name} 的 bilibili 专栏`;
|
|
19
19
|
const item = await Promise.all(
|
|
20
20
|
data.articles.map(async (item) => {
|
|
21
|
-
const art_url =
|
|
22
|
-
const itemData = await ctx.cache.tryGet(
|
|
23
|
-
art_url,
|
|
24
|
-
async () =>
|
|
25
|
-
(
|
|
26
|
-
await got({
|
|
27
|
-
method: 'get',
|
|
28
|
-
url: art_url,
|
|
29
|
-
headers: {
|
|
30
|
-
Referer: `https://space.bilibili.com/${uid}/`,
|
|
31
|
-
},
|
|
32
|
-
})
|
|
33
|
-
).data
|
|
34
|
-
);
|
|
35
|
-
const content = cheerio.load(itemData);
|
|
36
|
-
const eDescription = content('#read-article-holder').html();
|
|
21
|
+
const { url: art_url, description: eDescription } = await cache.getArticleDataFromCvid(ctx, item.id, uid);
|
|
37
22
|
const publishDate = parseDate(item.publish_time * 1000);
|
|
38
23
|
const single = {
|
|
39
24
|
title: item.title,
|
package/lib/v2/bilibili/cache.js
CHANGED
|
@@ -1,23 +1,55 @@
|
|
|
1
1
|
const got = require('@/utils/got');
|
|
2
2
|
const utils = require('./utils');
|
|
3
|
+
const cheerio = require('cheerio');
|
|
4
|
+
const config = require('@/config').value;
|
|
5
|
+
const logger = require('@/utils/logger');
|
|
3
6
|
|
|
4
7
|
module.exports = {
|
|
5
8
|
getCookie: (ctx) => {
|
|
9
|
+
if (Object.keys(config.bilibili.cookies).length > 0) {
|
|
10
|
+
return config.bilibili.cookies[Object.keys(config.bilibili.cookies)[Math.floor(Math.random() * Object.keys(config.bilibili.cookies).length)]];
|
|
11
|
+
}
|
|
6
12
|
const key = 'bili-cookie';
|
|
7
13
|
return ctx.cache.tryGet(key, async () => {
|
|
8
14
|
// default Referer: https://www.bilibili.com is limited
|
|
9
15
|
// Bilibili return cookies with multiple set-cookie
|
|
10
|
-
|
|
11
|
-
const
|
|
16
|
+
let response = await got('https://space.bilibili.com/1');
|
|
17
|
+
const setCookie = response.headers['set-cookie']; // should contain buvid3 and b_nut
|
|
18
|
+
if (typeof setCookie === 'undefined') {
|
|
19
|
+
return '';
|
|
20
|
+
}
|
|
21
|
+
const cookie = setCookie.map((cookie) => cookie.split(';')[0]);
|
|
22
|
+
cookie.push(['b_lsid', utils.lsid()].join('='));
|
|
23
|
+
cookie.push(['_uuid', utils._uuid()].join('='));
|
|
24
|
+
response = await got('https://api.bilibili.com/x/frontend/finger/spi', {
|
|
12
25
|
headers: {
|
|
13
|
-
Referer:
|
|
26
|
+
Referer: 'https://www.bilibili.com/',
|
|
27
|
+
Cookie: cookie.join('; '),
|
|
14
28
|
},
|
|
15
29
|
});
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
30
|
+
cookie.push(['bvuid4', encodeURIComponent(response.data.data.b_4)].join('='));
|
|
31
|
+
const e = Math.floor(Date.now() / 1000);
|
|
32
|
+
const hexsign = utils.hexsign(e);
|
|
33
|
+
// await got('https://space.bilibili.com/1', {
|
|
34
|
+
// headers: {
|
|
35
|
+
// Referer: 'https://www.bilibili.com/',
|
|
36
|
+
// Cookie: cookie.join('; '),
|
|
37
|
+
// },
|
|
38
|
+
// });
|
|
39
|
+
try {
|
|
40
|
+
response = await got.post(`https://api.bilibili.com/bapis/bilibili.api.ticket.v1.Ticket/GenWebTicket?key_id=ec02&hexsign=${hexsign}&context[ts]=${e}&csrf=`, {
|
|
41
|
+
headers: {
|
|
42
|
+
Referer: 'https://space.bilibili.com/1',
|
|
43
|
+
Cookie: cookie.join('; '),
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
cookie.push(['bili_ticket', response.data.data.ticket].join('='));
|
|
47
|
+
cookie.push(['bili_ticket_expires', (parseInt(response.data.data.created_at) + parseInt(response.data.data.ttl)).toString()].join('='));
|
|
48
|
+
} catch (e) {
|
|
49
|
+
// HTTPError: Response code 429 (Too Many Requests)
|
|
19
50
|
}
|
|
20
|
-
|
|
51
|
+
|
|
52
|
+
return cookie.join('; ');
|
|
21
53
|
});
|
|
22
54
|
},
|
|
23
55
|
getVerifyString: (ctx) => {
|
|
@@ -33,18 +65,23 @@ module.exports = {
|
|
|
33
65
|
const imgUrl = navResponse.data.wbi_img.img_url;
|
|
34
66
|
const subUrl = navResponse.data.wbi_img.sub_url;
|
|
35
67
|
const r = imgUrl.substring(imgUrl.lastIndexOf('/') + 1, imgUrl.length).split('.')[0] + subUrl.substring(subUrl.lastIndexOf('/') + 1, subUrl.length).split('.')[0];
|
|
36
|
-
const { body: spaceResponse } = await got('https://space.bilibili.com/1', {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
});
|
|
42
|
-
const jsUrl = 'https:' + spaceResponse.match(/[^"]*9.space[^"]*/);
|
|
68
|
+
// const { body: spaceResponse } = await got('https://space.bilibili.com/1', {
|
|
69
|
+
// headers: {
|
|
70
|
+
// Referer: 'https://www.bilibili.com/',
|
|
71
|
+
// Cookie: cookie,
|
|
72
|
+
// },
|
|
73
|
+
// });
|
|
74
|
+
// const jsUrl = 'https:' + spaceResponse.match(/[^"]*9.space[^"]*/);
|
|
75
|
+
const jsUrl = 'https://s1.hdslb.com/bfs/seed/laputa-header/bili-header.umd.js';
|
|
43
76
|
const { body: jsResponse } = await got(jsUrl, {
|
|
44
77
|
headers: {
|
|
45
78
|
Referer: 'https://space.bilibili.com/1',
|
|
46
79
|
},
|
|
47
80
|
});
|
|
81
|
+
// const array = [
|
|
82
|
+
// 46, 47, 18, 2, 53, 8, 23, 32, 15, 50, 10, 31, 58, 3, 45, 35, 27, 43, 5, 49, 33, 9, 42, 19, 29, 28, 14, 39, 12, 38, 41, 13, 37, 48, 7, 16, 24, 55, 40, 61, 26, 17, 0, 1, 60, 51, 30, 4, 22, 25, 54, 21, 56, 59, 6, 63, 57,
|
|
83
|
+
// 62, 11, 36, 20, 34, 44, 52,
|
|
84
|
+
// ];
|
|
48
85
|
const array = JSON.parse(jsResponse.match(/\[(?:\d+,){63}\d+\]/));
|
|
49
86
|
const o = [];
|
|
50
87
|
array.forEach((t) => {
|
|
@@ -58,12 +95,12 @@ module.exports = {
|
|
|
58
95
|
return ctx.cache.tryGet(key, async () => {
|
|
59
96
|
const cookie = await module.exports.getCookie(ctx);
|
|
60
97
|
const verifyString = await module.exports.getVerifyString(ctx);
|
|
61
|
-
await got(`https://space.bilibili.com/${uid}/`, {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
});
|
|
98
|
+
// await got(`https://space.bilibili.com/${uid}/`, {
|
|
99
|
+
// headers: {
|
|
100
|
+
// Referer: 'https://www.bilibili.com/',
|
|
101
|
+
// Cookie: cookie,
|
|
102
|
+
// },
|
|
103
|
+
// });
|
|
67
104
|
const params = utils.addVerifyInfo(`mid=${uid}&token=&platform=web&web_location=1550101`, verifyString);
|
|
68
105
|
const { data: nameResponse } = await got(`https://api.bilibili.com/x/space/wbi/acc/info?${params}`, {
|
|
69
106
|
headers: {
|
|
@@ -82,12 +119,12 @@ module.exports = {
|
|
|
82
119
|
if (!name || !face) {
|
|
83
120
|
const cookie = await module.exports.getCookie(ctx);
|
|
84
121
|
const verifyString = await module.exports.getVerifyString(ctx);
|
|
85
|
-
await got(`https://space.bilibili.com/${uid}/`, {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
});
|
|
122
|
+
// await got(`https://space.bilibili.com/${uid}/`, {
|
|
123
|
+
// headers: {
|
|
124
|
+
// Referer: `https://www.bilibili.com/`,
|
|
125
|
+
// Cookie: cookie,
|
|
126
|
+
// },
|
|
127
|
+
// });
|
|
91
128
|
const params = utils.addVerifyInfo(`mid=${uid}&token=&platform=web&web_location=1550101`, verifyString);
|
|
92
129
|
const { data: nameResponse } = await got(`https://api.bilibili.com/x/space/wbi/acc/info?${params}`, {
|
|
93
130
|
headers: {
|
|
@@ -95,9 +132,11 @@ module.exports = {
|
|
|
95
132
|
Cookie: cookie,
|
|
96
133
|
},
|
|
97
134
|
});
|
|
98
|
-
if (nameResponse.data) {
|
|
135
|
+
if (nameResponse.data.name) {
|
|
99
136
|
name = nameResponse.data.name;
|
|
100
137
|
face = nameResponse.data.face;
|
|
138
|
+
} else {
|
|
139
|
+
logger.error(`Error when visiting /x/space/wbi/acc/info: ${JSON.stringify(nameResponse)}`);
|
|
101
140
|
}
|
|
102
141
|
ctx.cache.set(nameKey, name);
|
|
103
142
|
ctx.cache.set(faceKey, face);
|
|
@@ -164,4 +203,23 @@ module.exports = {
|
|
|
164
203
|
}
|
|
165
204
|
return aid;
|
|
166
205
|
},
|
|
206
|
+
getArticleDataFromCvid: async (ctx, cvid, uid) => {
|
|
207
|
+
const url = `https://www.bilibili.com/read/cv${cvid}`;
|
|
208
|
+
const data = await ctx.cache.tryGet(
|
|
209
|
+
url,
|
|
210
|
+
async () =>
|
|
211
|
+
(
|
|
212
|
+
await got({
|
|
213
|
+
method: 'get',
|
|
214
|
+
url,
|
|
215
|
+
headers: {
|
|
216
|
+
Referer: `https://space.bilibili.com/${uid}/`,
|
|
217
|
+
},
|
|
218
|
+
})
|
|
219
|
+
).data
|
|
220
|
+
);
|
|
221
|
+
const $ = cheerio.load(data);
|
|
222
|
+
const description = $('#read-article-holder').html();
|
|
223
|
+
return { url, description };
|
|
224
|
+
},
|
|
167
225
|
};
|
|
@@ -3,6 +3,14 @@ const cache = require('./cache');
|
|
|
3
3
|
const got = require('@/utils/got');
|
|
4
4
|
const zlib = require('zlib');
|
|
5
5
|
|
|
6
|
+
const processFloatTime = (time) => {
|
|
7
|
+
const totalSeconds = parseInt(time);
|
|
8
|
+
const seconds = totalSeconds % 60;
|
|
9
|
+
const minutes = ((totalSeconds - seconds) / 60) % 60;
|
|
10
|
+
const hours = (totalSeconds - seconds - 60 * minutes) / 3600;
|
|
11
|
+
return `${hours}:${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;
|
|
12
|
+
};
|
|
13
|
+
|
|
6
14
|
module.exports = async (ctx) => {
|
|
7
15
|
let bvid = ctx.params.bvid;
|
|
8
16
|
let aid;
|
|
@@ -46,8 +54,7 @@ module.exports = async (ctx) => {
|
|
|
46
54
|
link,
|
|
47
55
|
description: `${videoName} 的 弹幕动态`,
|
|
48
56
|
item: danmakuList.map((item) => ({
|
|
49
|
-
title: item.text
|
|
50
|
-
description: item.text,
|
|
57
|
+
title: `[${processFloatTime(item.p.split(',')[0])}] ${item.text}`,
|
|
51
58
|
pubDate: new Date(item.p.split(',')[4] * 1000).toUTCString(),
|
|
52
59
|
guid: `${cid}-${item.p.split(',')[4]}-${item.p.split(',')[7]}`,
|
|
53
60
|
link,
|