rsshub 1.0.0-master.fd3a269 → 1.0.0-master.fd40700
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/config.js +17 -0
- package/lib/middleware/parameter.js +6 -4
- package/lib/radar-rules.js +1 -254
- package/lib/router.js +95 -172
- package/lib/routes/aeon/category.js +18 -27
- package/lib/routes/bof/home.js +1 -2
- package/lib/routes/bookwalkertw/news.js +2 -2
- package/lib/routes/ccdi/scdc.js +10 -6
- package/lib/routes/coolapk/utils.js +2 -0
- package/lib/routes/copymanga/comic.js +9 -2
- package/lib/routes/coronavirus/dxy-data.js +1 -1
- package/lib/routes/coronavirus/dxy.js +2 -2
- package/lib/routes/cpta/notice.js +6 -1
- package/lib/routes/dilbert/strip.js +7 -4
- package/lib/routes/dongqiudi/result.js +13 -25
- package/lib/routes/dsndsht23/index.js +1 -1
- package/lib/routes/dykszx/news.js +5 -2
- package/lib/routes/eastday/sh.js +4 -12
- package/lib/routes/ehentai/ehapi.js +0 -1
- package/lib/routes/fashionnetwork/headline.js +53 -0
- package/lib/routes/{flyertea → flyert}/creditcard.js +3 -2
- package/lib/routes/{flyertea → flyert}/preferential.js +2 -2
- package/lib/routes/{flyertea → flyert}/utils.js +5 -5
- package/lib/routes/futunn/highlights.js +39 -37
- package/lib/routes/gamer/gnn_index.js +1 -1
- package/lib/routes/gameres/utils.js +4 -1
- package/lib/routes/gelonghui/user.js +1 -1
- package/lib/routes/gov/fmprc/fyrbt.js +1 -1
- package/lib/routes/gov/guangdong/edu.js +5 -1
- package/lib/routes/gov/shenzhen/xxgk/zfxxgj.js +5 -1
- package/lib/routes/hackerone/hacktivity.js +17 -16
- package/lib/routes/hackerone/search.js +1 -2
- package/lib/routes/hexo/fluid.js +45 -0
- package/lib/routes/hkcnews/news.js +5 -1
- package/lib/routes/hkej/index.js +7 -1
- package/lib/routes/infzm/news.js +9 -17
- package/lib/routes/kbs/today.js +56 -0
- package/lib/routes/lolapp/article.js +53 -0
- package/lib/routes/manhuagui/comic.js +74 -28
- package/lib/routes/maoyan/hotComplete.js +87 -0
- package/lib/routes/mhgui/comic.js +74 -28
- package/lib/routes/mi/youpin/new.js +13 -31
- package/lib/routes/mirror/entries.js +80 -0
- package/lib/routes/nasa/apod-cn.js +4 -1
- package/lib/routes/ncm/djradio.js +59 -44
- package/lib/routes/ncm/playlist.js +2 -0
- package/lib/routes/ncm/templates/djradio-content.art +11 -0
- package/lib/routes/ncm/userplayrecords.js +57 -0
- package/lib/routes/newzmz/index.js +5 -1
- package/lib/routes/nintendo/eshop_us.js +3 -6
- package/lib/routes/novel/axdzs.js +22 -12
- package/lib/routes/novel/biquge.js +1 -1
- package/lib/routes/picuki/profile.js +53 -14
- package/lib/routes/pingwest/utils.js +4 -1
- package/lib/routes/qstheory/index.js +7 -1
- package/lib/routes/rsshub/routes.js +7 -6
- package/lib/routes/t66y/index.js +4 -4
- package/lib/routes/tencent/wechat/tgchannel.js +47 -10
- package/lib/routes/tencent/wechat/wechat-open/pay/announce.js +2 -4
- package/lib/routes/tingshuitz/guangzhou.js +1 -2
- package/lib/routes/twmanhuagui/comic.js +74 -28
- package/lib/routes/ui-cn/article.js +8 -1
- package/lib/routes/universities/njtech/jwc.js +1 -1
- package/lib/routes/universities/nuc/index.js +6 -1
- package/lib/routes/universities/sjtu/jwc.js +51 -53
- package/lib/routes/vgn/index.js +1 -1
- package/lib/routes/weibo/search/hot.js +1 -2
- package/lib/routes/weibo/super_index.js +2 -1
- package/lib/routes/weibo/timeline.js +72 -124
- package/lib/routes/weibo/user.js +27 -2
- package/lib/routes/weibo/utils.js +6 -2
- package/lib/routes/who/news-room.js +2 -2
- package/lib/routes/ximalaya/album.js +9 -12
- package/lib/routes/ximalaya/utils.js +3 -128
- package/lib/routes/yahoo-news/index.js +1 -1
- package/lib/routes/youzhiyouxing/materials.js +29 -0
- package/lib/routes/zhihu/collection.js +26 -2
- package/lib/routes/zhihu/pin/utils.js +17 -7
- package/lib/routes/zhihu/posts.js +2 -1
- package/lib/routes/zhihu/topic.js +10 -2
- package/lib/routes/zhihu/zhuanlan.js +12 -1
- package/lib/utils/puppeteer.js +0 -1
- package/lib/v2/12306/index.js +108 -0
- package/lib/v2/12306/maintainer.js +4 -0
- package/lib/v2/12306/radar.js +28 -0
- package/lib/v2/12306/router.js +4 -0
- package/lib/v2/12306/templates/train.art +31 -0
- package/lib/{routes → v2}/12306/zxdt.js +0 -0
- package/lib/v2/18comic/album.js +75 -0
- package/lib/v2/18comic/blogs.js +63 -0
- package/lib/v2/18comic/index.js +12 -0
- package/lib/v2/18comic/maintainer.js +6 -0
- package/lib/v2/18comic/radar.js +31 -0
- package/lib/v2/18comic/router.js +6 -0
- package/lib/v2/18comic/search.js +13 -0
- package/lib/v2/18comic/utils.js +71 -0
- package/lib/v2/2048/index.js +8 -1
- package/lib/v2/423down/index.js +114 -0
- package/lib/v2/423down/maintainer.js +3 -0
- package/lib/v2/423down/radar.js +193 -0
- package/lib/v2/423down/router.js +3 -0
- package/lib/v2/abmedia/category.js +30 -0
- package/lib/v2/abmedia/index.js +26 -0
- package/lib/v2/abmedia/maintainer.js +3 -0
- package/lib/v2/abmedia/radar.js +19 -0
- package/lib/v2/abmedia/router.js +4 -0
- package/lib/v2/acm-ecnu/contest.js +44 -0
- package/lib/v2/acm-ecnu/maintainer.js +3 -0
- package/lib/v2/acm-ecnu/radar.js +19 -0
- package/lib/v2/acm-ecnu/router.js +3 -0
- package/lib/v2/acm-ecnu/templates/description.art +3 -0
- package/lib/v2/agirls/index.js +71 -0
- package/lib/v2/agirls/maintainer.js +5 -0
- package/lib/v2/agirls/radar.js +25 -0
- package/lib/v2/agirls/router.js +5 -0
- package/lib/v2/agirls/templates/description.art +1 -0
- package/lib/v2/agirls/topic.js +71 -0
- package/lib/v2/agirls/topic_list.js +44 -0
- package/lib/v2/ahjzu/maintainer.js +3 -0
- package/lib/v2/ahjzu/news.js +57 -0
- package/lib/v2/ahjzu/radar.js +13 -0
- package/lib/v2/ahjzu/router.js +3 -0
- package/lib/v2/ajmide/index.js +29 -0
- package/lib/v2/ajmide/maintainer.js +3 -0
- package/lib/v2/ajmide/radar.js +16 -0
- package/lib/v2/ajmide/router.js +3 -0
- package/lib/v2/app-center/maintainer.js +3 -0
- package/lib/v2/app-center/radar.js +13 -0
- package/lib/v2/app-center/release.js +120 -0
- package/lib/v2/app-center/router.js +3 -0
- package/lib/v2/app-center/templates/description.art +24 -0
- package/lib/v2/appledaily/index.js +69 -0
- package/lib/v2/appledaily/maintainer.js +3 -0
- package/lib/v2/appledaily/radar.js +157 -0
- package/lib/v2/appledaily/router.js +3 -0
- package/lib/v2/appledaily/templates/content.art +7 -0
- package/lib/v2/atcoder/contest.js +64 -0
- package/lib/v2/atcoder/maintainer.js +4 -0
- package/lib/v2/atcoder/post.js +38 -0
- package/lib/v2/atcoder/radar.js +22 -0
- package/lib/v2/atcoder/router.js +4 -0
- package/lib/v2/baozimh/index.js +55 -0
- package/lib/v2/baozimh/maintainer.js +3 -0
- package/lib/v2/baozimh/radar.js +13 -0
- package/lib/v2/baozimh/router.js +3 -0
- package/lib/v2/baozimh/templates/desc.art +3 -0
- package/lib/v2/barronschina/index.js +70 -0
- package/lib/v2/barronschina/maintainer.js +3 -0
- package/lib/v2/barronschina/radar.js +13 -0
- package/lib/v2/barronschina/router.js +3 -0
- package/lib/v2/bendibao/maintainer.js +3 -0
- package/lib/{routes → v2}/bendibao/news.js +39 -18
- package/lib/v2/bendibao/radar.js +13 -0
- package/lib/v2/bendibao/router.js +3 -0
- package/lib/{routes → v2}/bioone/featured.js +9 -8
- package/lib/v2/bioone/journal.js +58 -0
- package/lib/v2/bioone/maintainer.js +4 -0
- package/lib/v2/bioone/radar.js +19 -0
- package/lib/v2/bioone/router.js +4 -0
- package/lib/v2/blockbeats/index.js +50 -0
- package/lib/v2/blockbeats/maintainer.js +3 -0
- package/lib/v2/blockbeats/radar.js +19 -0
- package/lib/v2/blockbeats/router.js +3 -0
- package/lib/v2/bse/index.js +173 -0
- package/lib/v2/bse/maintainer.js +3 -0
- package/lib/v2/bse/radar.js +13 -0
- package/lib/v2/bse/router.js +3 -0
- package/lib/v2/btzj/index.js +98 -0
- package/lib/v2/btzj/maintainer.js +3 -0
- package/lib/v2/btzj/radar.js +13 -0
- package/lib/v2/btzj/router.js +3 -0
- package/lib/v2/btzj/templates/torrents.art +5 -0
- package/lib/v2/cahkms/index.js +69 -0
- package/lib/v2/cahkms/maintainer.js +3 -0
- package/lib/v2/cahkms/radar.js +13 -0
- package/lib/v2/cahkms/router.js +3 -0
- package/lib/v2/cahkms/templates/description.art +15 -0
- package/lib/v2/cbirc/index.js +119 -0
- package/lib/v2/cbirc/maintainer.js +3 -0
- package/lib/v2/cbirc/radar.js +13 -0
- package/lib/v2/cbirc/router.js +3 -0
- package/lib/v2/ccreports/index.js +41 -0
- package/lib/v2/ccreports/maintainer.js +3 -0
- package/lib/v2/ccreports/radar.js +13 -0
- package/lib/v2/ccreports/router.js +3 -0
- package/lib/v2/cde/index.js +132 -0
- package/lib/v2/cde/maintainer.js +3 -0
- package/lib/v2/cde/radar.js +43 -0
- package/lib/v2/cde/router.js +3 -0
- package/lib/v2/cde/utils.js +20 -0
- package/lib/v2/cdi/index.js +61 -0
- package/lib/v2/cdi/maintainer.js +3 -0
- package/lib/v2/cdi/radar.js +13 -0
- package/lib/v2/cdi/router.js +3 -0
- package/lib/v2/changba/maintainer.js +3 -0
- package/lib/v2/changba/radar.js +13 -0
- package/lib/v2/changba/router.js +3 -0
- package/lib/v2/changba/templates/work_description.art +2 -0
- package/lib/v2/changba/user.js +84 -0
- package/lib/v2/chaoxing/maintainer.js +3 -0
- package/lib/v2/chaoxing/qk.js +59 -0
- package/lib/v2/chaoxing/radar.js +13 -0
- package/lib/v2/chaoxing/router.js +3 -0
- package/lib/v2/chaoxing/templates/description.art +3 -0
- package/lib/v2/cnbeta/index.js +15 -0
- package/lib/v2/cnbeta/maintainer.js +5 -0
- package/lib/v2/cnbeta/radar.js +25 -0
- package/lib/v2/cnbeta/router.js +4 -0
- package/lib/v2/cnbeta/type.js +42 -0
- package/lib/v2/cnbeta/utils.js +27 -0
- package/lib/v2/cnki/debut.js +62 -0
- package/lib/v2/cnki/journals.js +74 -0
- package/lib/v2/cnki/maintainer.js +4 -0
- package/lib/v2/cnki/radar.js +19 -0
- package/lib/v2/cnki/router.js +4 -0
- package/lib/v2/cnki/templates/desc.art +5 -0
- package/lib/v2/cntv/column.js +29 -0
- package/lib/v2/cntv/maintainer.js +3 -0
- package/lib/v2/cntv/radar.js +13 -0
- package/lib/v2/cntv/router.js +3 -0
- package/lib/v2/cntv/templates/column.art +4 -0
- package/lib/v2/codeforces/contests.js +37 -0
- package/lib/v2/codeforces/maintainer.js +3 -0
- package/lib/v2/codeforces/radar.js +13 -0
- package/lib/v2/codeforces/router.js +3 -0
- package/lib/v2/codeforces/templates/contest.art +11 -0
- package/lib/v2/consumer/index.js +55 -0
- package/lib/v2/consumer/maintainer.js +3 -0
- package/lib/v2/consumer/radar.js +13 -0
- package/lib/v2/consumer/router.js +3 -0
- package/lib/{routes → v2}/cool18/index.js +17 -13
- package/lib/v2/cool18/maintainer.js +3 -0
- package/lib/v2/cool18/radar.js +13 -0
- package/lib/v2/cool18/router.js +3 -0
- package/lib/v2/cpcey/index.js +60 -0
- package/lib/v2/cpcey/maintainer.js +3 -0
- package/lib/v2/cpcey/radar.js +27 -0
- package/lib/v2/cpcey/router.js +3 -0
- package/lib/v2/cqwu/index.js +46 -0
- package/lib/v2/cqwu/maintainer.js +3 -0
- package/lib/v2/cqwu/radar.js +27 -0
- package/lib/v2/cqwu/router.js +3 -0
- package/lib/v2/csc/maintainer.js +3 -0
- package/lib/v2/csc/notice.js +99 -0
- package/lib/v2/csc/radar.js +31 -0
- package/lib/v2/csc/router.js +3 -0
- package/lib/v2/ddosi/category.js +42 -0
- package/lib/v2/ddosi/index.js +41 -0
- package/lib/v2/ddosi/maintainer.js +4 -0
- package/lib/v2/ddosi/radar.js +19 -0
- package/lib/v2/ddosi/router.js +4 -0
- package/lib/{routes → v2}/dockerhub/build.js +3 -1
- package/lib/v2/dockerhub/maintainer.js +4 -0
- package/lib/v2/dockerhub/radar.js +19 -0
- package/lib/v2/dockerhub/router.js +4 -0
- package/lib/v2/dockerhub/tag.js +33 -0
- package/lib/v2/dockerhub/utils.js +10 -0
- package/lib/{routes → v2}/douban/book/rank.js +0 -0
- package/lib/{routes → v2}/douban/channel/subject.js +0 -0
- package/lib/{routes → v2}/douban/channel/topic.js +0 -0
- package/lib/{routes → v2}/douban/commercialpress/latest.js +0 -0
- package/lib/{routes → v2}/douban/event/hot.js +0 -0
- package/lib/v2/douban/maintainer.js +27 -0
- package/lib/{routes/douban → v2/douban/other}/bookstore.js +0 -0
- package/lib/{routes/douban → v2/douban/other}/celebrity.js +0 -0
- package/lib/{routes/douban → v2/douban/other}/classification.js +0 -0
- package/lib/{routes/douban → v2/douban/other}/doulist.js +0 -0
- package/lib/v2/douban/other/explore.js +50 -0
- package/lib/{routes/douban → v2/douban/other}/explore_column.js +0 -0
- package/lib/{routes/douban → v2/douban/other}/group.js +1 -1
- package/lib/v2/douban/other/jobs.js +33 -0
- package/lib/{routes/douban → v2/douban/other}/later.js +0 -0
- package/lib/{routes/douban → v2/douban/other}/latest_book.js +0 -0
- package/lib/{routes/douban → v2/douban/other}/latest_music.js +0 -0
- package/lib/{routes/douban → v2/douban/other}/playing.js +0 -0
- package/lib/{routes/douban → v2/douban/other}/replied.js +0 -0
- package/lib/{routes/douban → v2/douban/other}/replies.js +0 -0
- package/lib/{routes/douban → v2/douban/other}/topic.js +1 -1
- package/lib/{routes/douban → v2/douban/other}/ustop.js +0 -0
- package/lib/{routes/douban → v2/douban/other}/weekly_best.js +0 -0
- package/lib/{routes → v2}/douban/people/status.js +15 -5
- package/lib/{routes → v2}/douban/people/wish.js +0 -0
- package/lib/v2/douban/radar.js +54 -0
- package/lib/v2/douban/router.js +27 -0
- package/lib/v2/douban/templates/explore.art +7 -0
- package/lib/v2/dushu/fuzhou/index.js +42 -0
- package/lib/v2/dushu/fuzhou/templates/message.art +9 -0
- package/lib/v2/dushu/maintainer.js +3 -0
- package/lib/v2/dushu/radar.js +24 -0
- package/lib/v2/dushu/router.js +3 -0
- package/lib/v2/e-hentai/index.js +115 -0
- package/lib/v2/e-hentai/maintainer.js +5 -0
- package/lib/v2/e-hentai/radar.js +25 -0
- package/lib/v2/e-hentai/router.js +3 -0
- package/lib/v2/e-hentai/templates/images.art +3 -0
- package/lib/v2/ecust-jxjy/maintainer.js +3 -0
- package/lib/v2/ecust-jxjy/news.js +47 -0
- package/lib/v2/ecust-jxjy/radar.js +13 -0
- package/lib/v2/ecust-jxjy/router.js +3 -0
- package/lib/v2/elsevier/latest.js +87 -0
- package/lib/v2/elsevier/maintainer.js +4 -0
- package/lib/v2/elsevier/radar.js +19 -0
- package/lib/v2/elsevier/router.js +4 -0
- package/lib/v2/elsevier/templates/description.art +9 -0
- package/lib/v2/elsevier/volume.js +75 -0
- package/lib/v2/epicgames/router.js +1 -1
- package/lib/v2/epicgames/supportedList.js +2 -3
- package/lib/v2/eprice/radar.js +2 -2
- package/lib/v2/eprice/rss.js +29 -19
- package/lib/v2/eprice/templates/description.art +1 -1
- package/lib/v2/eprice/templates/image.art +1 -0
- package/lib/{routes/everything → v2}/eventernote/actors.js +0 -0
- package/lib/v2/eventernote/maintainer.js +3 -0
- package/lib/v2/eventernote/radar.js +13 -0
- package/lib/v2/eventernote/router.js +3 -0
- package/lib/{routes → v2}/ezone/index.js +13 -5
- package/lib/v2/ezone/maintainer.js +3 -0
- package/lib/v2/ezone/radar.js +13 -0
- package/lib/v2/ezone/router.js +3 -0
- package/lib/v2/filmdeepfocus/index.js +58 -0
- package/lib/v2/filmdeepfocus/maintainer.js +3 -0
- package/lib/v2/filmdeepfocus/radar.js +13 -0
- package/lib/v2/filmdeepfocus/router.js +3 -0
- package/lib/v2/firefox/index.js +69 -0
- package/lib/v2/firefox/maintainer.js +3 -0
- package/lib/v2/firefox/radar.js +13 -0
- package/lib/v2/firefox/router.js +3 -0
- package/lib/v2/firefox/templates/description.art +5 -0
- package/lib/v2/fortunechina/index.js +70 -0
- package/lib/v2/fortunechina/maintainer.js +3 -0
- package/lib/v2/fortunechina/radar.js +13 -0
- package/lib/v2/fortunechina/router.js +3 -0
- package/lib/{routes → v2}/ft/channel.js +1 -0
- package/lib/v2/ft/maintainer.js +4 -0
- package/lib/v2/ft/myft.js +44 -0
- package/lib/v2/ft/radar.js +24 -0
- package/lib/v2/ft/router.js +4 -0
- package/lib/{routes → v2}/ft/utils.js +19 -19
- package/lib/v2/gameapps/index.js +56 -0
- package/lib/v2/gameapps/maintainer.js +3 -0
- package/lib/v2/gameapps/radar.js +13 -0
- package/lib/v2/gameapps/router.js +3 -0
- package/lib/v2/gameapps/templates/description.art +3 -0
- package/lib/{routes → v2}/gamer/hot.js +15 -4
- package/lib/v2/gamer/maintainer.js +3 -0
- package/lib/v2/gamer/radar.js +13 -0
- package/lib/v2/gamer/router.js +3 -0
- package/lib/v2/gamersecret/index.js +60 -0
- package/lib/v2/gamersecret/maintainer.js +3 -0
- package/lib/v2/gamersecret/radar.js +31 -0
- package/lib/v2/gamersecret/router.js +3 -0
- package/lib/{routes → v2}/github/branches.js +0 -0
- package/lib/v2/github/comments.js +64 -0
- package/lib/{routes → v2}/github/contributors.js +0 -0
- package/lib/{routes → v2}/github/file.js +0 -0
- package/lib/{routes → v2}/github/follower.js +0 -0
- package/lib/{routes → v2}/github/issue.js +0 -0
- package/lib/v2/github/maintainer.js +15 -0
- package/lib/{routes → v2}/github/pulls.js +0 -0
- package/lib/v2/github/radar.js +79 -0
- package/lib/{routes → v2}/github/repos.js +0 -0
- package/lib/v2/github/router.js +15 -0
- package/lib/{routes → v2}/github/search.js +0 -0
- package/lib/{routes → v2}/github/star.js +0 -0
- package/lib/{routes → v2}/github/starred_repos.js +0 -0
- package/lib/v2/github/templates/comments-description.art +1 -0
- package/lib/{routes → v2}/github/topic.js +0 -0
- package/lib/{routes → v2}/github/trending.js +3 -3
- package/lib/{routes → v2}/google/album.js +0 -0
- package/lib/{routes → v2}/google/citations.js +0 -0
- package/lib/{routes → v2}/google/doodles.js +0 -0
- package/lib/v2/google/fonts.js +43 -0
- package/lib/v2/google/maintainer.js +8 -0
- package/lib/{routes → v2}/google/news.js +0 -0
- package/lib/v2/google/radar.js +64 -0
- package/lib/v2/google/router.js +8 -0
- package/lib/{routes → v2}/google/scholar.js +0 -0
- package/lib/{routes → v2}/google/sites.js +0 -0
- package/lib/v2/google/templates/fonts.art +15 -0
- package/lib/v2/gov/beijing/kw/index.js +44 -0
- package/lib/v2/gov/guangdong/tqyb/sncsyjxh.js +37 -0
- package/lib/v2/gov/guangdong/tqyb/templates/sncsyjxh.art +5 -0
- package/lib/v2/gov/guangdong/tqyb/templates/tfxtq.art +1 -0
- package/lib/v2/gov/guangdong/tqyb/tfxtq.js +30 -0
- package/lib/v2/gov/maintainer.js +8 -0
- package/lib/v2/gov/radar.js +333 -0
- package/lib/v2/gov/router.js +9 -0
- package/lib/v2/gov/shanghai/rsj/ksxm.js +39 -0
- package/lib/v2/gov/shanghai/rsj/templates/ksxm.art +7 -0
- package/lib/v2/gov/shanghai/wsjkw/yqtb/index.js +33 -0
- package/lib/v2/gov/shenzhen/hrss/szksy/index.js +41 -0
- package/lib/v2/gov/shenzhen/zzb/index.js +40 -0
- package/lib/v2/guduodata/daily.js +63 -0
- package/lib/v2/guduodata/maintainer.js +3 -0
- package/lib/v2/guduodata/radar.js +13 -0
- package/lib/v2/guduodata/router.js +3 -0
- package/lib/v2/guduodata/templates/daily.art +26 -0
- package/lib/v2/hackernews/index.js +103 -0
- package/lib/v2/hackernews/maintainer.js +3 -0
- package/lib/v2/hackernews/radar.js +13 -0
- package/lib/v2/hackernews/router.js +3 -0
- package/lib/v2/heu/job/list.js +2 -2
- package/lib/v2/hex-rays/index.js +47 -0
- package/lib/v2/hex-rays/maintainer.js +3 -0
- package/lib/v2/hex-rays/radar.js +13 -0
- package/lib/v2/hex-rays/router.js +3 -0
- package/lib/v2/hizu/index.js +76 -0
- package/lib/v2/hizu/maintainer.js +3 -0
- package/lib/v2/hizu/radar.js +13 -0
- package/lib/v2/hizu/router.js +3 -0
- package/lib/v2/hkej/index.js +7 -1
- package/lib/v2/hkepc/index.js +198 -0
- package/lib/v2/hkepc/maintainer.js +3 -0
- package/lib/v2/hkepc/radar.js +19 -0
- package/lib/v2/hkepc/router.js +3 -0
- package/lib/v2/hkepc/templates/description.art +1 -0
- package/lib/v2/hkepc/templates/image.art +1 -0
- package/lib/v2/hongkong/chp.js +103 -0
- package/lib/v2/hongkong/dh.js +53 -0
- package/lib/v2/hongkong/maintainer.js +4 -0
- package/lib/v2/hongkong/radar.js +19 -0
- package/lib/v2/hongkong/router.js +4 -0
- package/lib/v2/houxu/index.js +85 -0
- package/lib/v2/houxu/maintainer.js +4 -0
- package/lib/v2/houxu/radar.js +19 -0
- package/lib/v2/houxu/router.js +3 -0
- package/lib/v2/houxu/templates/description.art +9 -0
- package/lib/v2/ieee/latestdate.js +103 -0
- package/lib/v2/ieee/latestvol.js +87 -0
- package/lib/v2/ieee/maintainer.js +4 -0
- package/lib/v2/ieee/radar.js +19 -0
- package/lib/v2/ieee/router.js +4 -0
- package/lib/v2/ieee/templates/description.art +9 -0
- package/lib/v2/informs/index.js +74 -0
- package/lib/v2/informs/maintainer.js +3 -0
- package/lib/v2/informs/radar.js +109 -0
- package/lib/v2/informs/router.js +3 -0
- package/lib/v2/informs/templates/content.art +3 -0
- package/lib/v2/iresearch/maintainer.js +3 -0
- package/lib/v2/iresearch/radar.js +13 -0
- package/lib/v2/iresearch/report.js +60 -0
- package/lib/v2/iresearch/router.js +3 -0
- package/lib/v2/iresearch/templates/report.art +5 -0
- package/lib/v2/ithome/zt.js +9 -1
- package/lib/v2/iwara/index.js +42 -0
- package/lib/v2/iwara/maintainer.js +3 -0
- package/lib/v2/iwara/radar.js +19 -0
- package/lib/v2/iwara/router.js +3 -0
- package/lib/v2/jandan/index.js +65 -0
- package/lib/v2/jandan/maintainer.js +4 -0
- package/lib/v2/jandan/radar.js +19 -0
- package/lib/v2/jandan/router.js +4 -0
- package/lib/v2/jandan/section.js +49 -0
- package/lib/v2/jandan/templates/description.art +4 -0
- package/lib/v2/jasa/latest.js +70 -0
- package/lib/v2/jasa/maintainer.js +4 -0
- package/lib/v2/jasa/radar.js +19 -0
- package/lib/v2/jasa/router.js +4 -0
- package/lib/v2/jasa/section.js +95 -0
- package/lib/v2/jasa/templates/description.art +9 -0
- package/lib/{routes → v2}/javdb/actors.js +2 -2
- package/lib/{routes → v2}/javdb/index.js +3 -3
- package/lib/v2/javdb/maintainer.js +10 -0
- package/lib/{routes → v2}/javdb/makers.js +2 -2
- package/lib/v2/javdb/radar.js +49 -0
- package/lib/{routes → v2}/javdb/rankings.js +2 -2
- package/lib/v2/javdb/router.js +10 -0
- package/lib/{routes → v2}/javdb/search.js +3 -3
- package/lib/{routes → v2}/javdb/series.js +2 -2
- package/lib/{routes → v2}/javdb/tags.js +2 -2
- package/lib/v2/javdb/utils.js +73 -0
- package/lib/v2/javlibrary/bestrated.js +9 -0
- package/lib/v2/javlibrary/bestreviews.js +9 -0
- package/lib/v2/javlibrary/genre.js +10 -0
- package/lib/v2/javlibrary/maintainer.js +11 -0
- package/lib/v2/javlibrary/mostwanted.js +9 -0
- package/lib/v2/javlibrary/newentries.js +8 -0
- package/lib/v2/javlibrary/newrelease.js +9 -0
- package/lib/v2/javlibrary/radar.js +79 -0
- package/lib/v2/javlibrary/router.js +19 -0
- package/lib/v2/javlibrary/star.js +10 -0
- package/lib/v2/javlibrary/templates/description.art +17 -0
- package/lib/v2/javlibrary/update.js +8 -0
- package/lib/v2/javlibrary/user.js +10 -0
- package/lib/v2/javlibrary/utils.js +98 -0
- package/lib/v2/jisilu/index.js +90 -0
- package/lib/v2/jisilu/maintainer.js +3 -0
- package/lib/v2/jisilu/radar.js +25 -0
- package/lib/v2/jisilu/router.js +3 -0
- package/lib/v2/kemono/index.js +99 -0
- package/lib/v2/kemono/maintainer.js +4 -0
- package/lib/v2/kemono/radar.js +13 -0
- package/lib/v2/kemono/router.js +3 -0
- package/lib/v2/knowmedia/index.js +38 -0
- package/lib/v2/knowmedia/maintainer.js +3 -0
- package/lib/v2/knowmedia/radar.js +31 -0
- package/lib/v2/knowmedia/router.js +3 -0
- package/lib/v2/knowmedia/templates/desc.art +3 -0
- package/lib/v2/lanqiao/author.js +61 -0
- package/lib/v2/lanqiao/courses.js +62 -0
- package/lib/v2/lanqiao/maintainer.js +5 -0
- package/lib/v2/lanqiao/questions.js +52 -0
- package/lib/v2/lanqiao/radar.js +25 -0
- package/lib/v2/lanqiao/router.js +5 -0
- package/lib/v2/lanqiao/templates/courseDesc.art +1 -0
- package/lib/v2/lanqiao/utils.js +12 -0
- package/lib/v2/latepost/index.js +62 -0
- package/lib/v2/latepost/maintainer.js +3 -0
- package/lib/v2/latepost/radar.js +13 -0
- package/lib/v2/latepost/router.js +3 -0
- package/lib/v2/lativ/index.js +42 -0
- package/lib/v2/lativ/maintainer.js +3 -0
- package/lib/v2/lativ/radar.js +13 -0
- package/lib/v2/lativ/router.js +3 -0
- package/lib/v2/lativ/templates/detail.art +9 -0
- package/lib/v2/learnku/maintainer.js +3 -0
- package/lib/v2/learnku/radar.js +13 -0
- package/lib/v2/learnku/router.js +3 -0
- package/lib/v2/learnku/templates/topic.art +14 -0
- package/lib/v2/learnku/topic.js +72 -0
- package/lib/v2/leiphone/index.js +25 -0
- package/lib/v2/leiphone/maintainer.js +5 -0
- package/lib/v2/leiphone/newsflash.js +19 -0
- package/lib/v2/leiphone/radar.js +25 -0
- package/lib/v2/leiphone/router.js +4 -0
- package/lib/v2/leiphone/utils.js +41 -0
- package/lib/v2/line/maintainer.js +3 -0
- package/lib/v2/line/radar.js +13 -0
- package/lib/v2/line/router.js +3 -0
- package/lib/v2/line/today.js +80 -0
- package/lib/v2/logonews/index.js +76 -0
- package/lib/v2/logonews/maintainer.js +8 -0
- package/lib/v2/logonews/radar.js +43 -0
- package/lib/v2/logonews/router.js +5 -0
- package/lib/v2/logonews/templates/description.art +4 -0
- package/lib/v2/medsci/index.js +67 -0
- package/lib/v2/medsci/maintainer.js +3 -0
- package/lib/v2/medsci/radar.js +13 -0
- package/lib/v2/medsci/router.js +3 -0
- package/lib/v2/mohw/clarification.js +50 -0
- package/lib/v2/mohw/maintainer.js +3 -0
- package/lib/v2/mohw/radar.js +13 -0
- package/lib/v2/mohw/router.js +3 -0
- package/lib/v2/mox/index.js +57 -0
- package/lib/v2/mox/maintainer.js +3 -0
- package/lib/v2/mox/radar.js +13 -0
- package/lib/v2/mox/router.js +3 -0
- package/lib/v2/mvm/index.js +10 -7
- package/lib/{routes → v2}/neea/index.js +0 -0
- package/lib/v2/neea/jlpt.js +52 -0
- package/lib/v2/neea/maintainer.js +4 -0
- package/lib/v2/neea/radar.js +13 -0
- package/lib/v2/neea/router.js +4 -0
- package/lib/v2/netease/maintainer.js +1 -0
- package/lib/v2/netease/radar.js +10 -2
- package/lib/v2/netease/router.js +1 -0
- package/lib/v2/netease/today.js +55 -0
- package/lib/v2/news/maintainer.js +3 -0
- package/lib/v2/news/radar.js +13 -0
- package/lib/v2/news/router.js +3 -0
- package/lib/{routes → v2}/news/whxw.js +18 -10
- package/lib/v2/nifd/maintainer.js +3 -0
- package/lib/v2/nifd/radar.js +117 -0
- package/lib/v2/nifd/research.js +52 -0
- package/lib/v2/nifd/router.js +3 -0
- package/lib/v2/nikkei-asia/index.js +40 -0
- package/lib/v2/nikkei-asia/maintainer.js +3 -0
- package/lib/v2/nikkei-asia/radar.js +13 -0
- package/lib/v2/nikkei-asia/router.js +3 -0
- package/lib/v2/nikkei-cn/index.js +77 -0
- package/lib/v2/nikkei-cn/maintainer.js +3 -0
- package/lib/v2/nikkei-cn/radar.js +21 -0
- package/lib/v2/nikkei-cn/router.js +3 -0
- package/lib/v2/nippon/index.js +31 -0
- package/lib/v2/nippon/maintainer.js +3 -0
- package/lib/v2/nippon/radar.js +13 -0
- package/lib/v2/nippon/router.js +3 -0
- package/lib/v2/nju/gra.js +31 -0
- package/lib/v2/nju/jw.js +45 -0
- package/lib/v2/nju/maintainer.js +8 -0
- package/lib/v2/nju/radar.js +53 -0
- package/lib/v2/nju/rczp.js +38 -0
- package/lib/v2/nju/router.js +8 -0
- package/lib/v2/nju/scit.js +36 -0
- package/lib/v2/nju/zbb.js +81 -0
- package/lib/v2/nju/zcc.js +48 -0
- package/lib/v2/nodejs/blog.js +60 -0
- package/lib/v2/nodejs/maintainer.js +3 -0
- package/lib/v2/nodejs/radar.js +13 -0
- package/lib/v2/nodejs/router.js +3 -0
- package/lib/v2/now/maintainer.js +3 -0
- package/lib/v2/now/news.js +66 -0
- package/lib/v2/now/radar.js +13 -0
- package/lib/v2/now/router.js +3 -0
- package/lib/v2/nsfc/maintainer.js +3 -0
- package/lib/{routes → v2}/nsfc/news.js +0 -0
- package/lib/v2/nsfc/radar.js +31 -0
- package/lib/v2/nsfc/router.js +3 -0
- package/lib/{routes → v2}/odaily/activity.js +7 -6
- package/lib/v2/odaily/maintainer.js +6 -0
- package/lib/v2/odaily/newsflash.js +26 -0
- package/lib/v2/odaily/post.js +66 -0
- package/lib/v2/odaily/radar.js +60 -0
- package/lib/v2/odaily/router.js +6 -0
- package/lib/v2/odaily/user.js +54 -0
- package/lib/v2/odaily/utils.js +3 -0
- package/lib/v2/oncc/index.js +83 -0
- package/lib/v2/oncc/maintainer.js +3 -0
- package/lib/v2/oncc/radar.js +37 -0
- package/lib/v2/oncc/router.js +3 -0
- package/lib/v2/oncc/templates/article.art +2 -0
- package/lib/v2/people/index.js +83 -0
- package/lib/v2/people/maintainer.js +3 -0
- package/lib/v2/people/radar.js +9 -1
- package/lib/v2/people/router.js +3 -0
- package/lib/{routes → v2}/people/xjpjh.js +0 -0
- package/lib/v2/polkaworld/home.js +24 -0
- package/lib/v2/polkaworld/maintainer.js +3 -0
- package/lib/v2/polkaworld/radar.js +13 -0
- package/lib/v2/polkaworld/router.js +3 -0
- package/lib/v2/producthunt/maintainer.js +3 -0
- package/lib/v2/producthunt/radar.js +13 -0
- package/lib/v2/producthunt/router.js +3 -0
- package/lib/v2/producthunt/templates/descImg.art +5 -0
- package/lib/v2/producthunt/today.js +41 -0
- package/lib/v2/qidiantu/index.js +87 -0
- package/lib/v2/qidiantu/maintainer.js +4 -0
- package/lib/v2/qidiantu/radar.js +19 -0
- package/lib/v2/qidiantu/router.js +3 -0
- package/lib/v2/qq/ac/comic.js +43 -0
- package/lib/v2/qq/ac/rank.js +20 -0
- package/lib/v2/qq/ac/templates/description.art +9 -0
- package/lib/v2/qq/ac/utils.js +71 -0
- package/lib/v2/qq/maintainer.js +2 -0
- package/lib/v2/qq/radar.js +14 -0
- package/lib/v2/qq/router.js +2 -0
- package/lib/v2/radio-canada/latest.js +43 -0
- package/lib/v2/radio-canada/maintainer.js +3 -0
- package/lib/v2/radio-canada/radar.js +13 -0
- package/lib/v2/radio-canada/router.js +3 -0
- package/lib/v2/ruc/hr.js +22 -16
- package/lib/v2/shmeea/index.js +44 -0
- package/lib/v2/shmeea/maintainer.js +3 -0
- package/lib/v2/shmeea/radar.js +13 -0
- package/lib/v2/shmeea/router.js +3 -0
- package/lib/v2/shopback/maintainer.js +3 -0
- package/lib/v2/shopback/radar.js +13 -0
- package/lib/v2/shopback/router.js +3 -0
- package/lib/v2/shopback/store.js +37 -0
- package/lib/v2/sicau/maintainer.js +3 -0
- package/lib/v2/sicau/radar.js +13 -0
- package/lib/v2/sicau/router.js +3 -0
- package/lib/{routes/people/cpc/24h.js → v2/sicau/zsjy.js} +14 -13
- package/lib/v2/solidot/_article.js +4 -1
- package/lib/v2/spotify/artist.js +41 -0
- package/lib/v2/spotify/maintainer.js +7 -0
- package/lib/v2/spotify/playlist.js +31 -0
- package/lib/v2/spotify/radar.js +37 -0
- package/lib/v2/spotify/router.js +7 -0
- package/lib/v2/spotify/saved.js +30 -0
- package/lib/v2/spotify/top.js +24 -0
- package/lib/v2/spotify/utils.js +62 -0
- package/lib/v2/ssm/maintainer.js +3 -0
- package/lib/v2/ssm/news.js +38 -0
- package/lib/v2/ssm/radar.js +13 -0
- package/lib/v2/ssm/router.js +3 -0
- package/lib/v2/ssm/templates/news.art +1 -0
- package/lib/{routes/medsci/recommend.js → v2/storm/index.js} +16 -10
- package/lib/v2/storm/maintainer.js +3 -0
- package/lib/v2/storm/radar.js +13 -0
- package/lib/v2/storm/router.js +3 -0
- package/lib/v2/swissinfo/index.js +73 -0
- package/lib/v2/swissinfo/maintainer.js +3 -0
- package/lib/v2/swissinfo/radar.js +13 -0
- package/lib/v2/swissinfo/router.js +3 -0
- package/lib/v2/taobao/maintainer.js +3 -0
- package/lib/v2/taobao/radar.js +117 -0
- package/lib/v2/taobao/router.js +3 -0
- package/lib/v2/taobao/templates/zhongchou.art +4 -0
- package/lib/{routes → v2}/taobao/zhongchou.js +6 -7
- package/lib/{routes → v2}/telegram/blog.js +3 -3
- package/lib/{routes → v2}/telegram/channel.js +2 -1
- package/lib/v2/telegram/maintainer.js +5 -0
- package/lib/v2/telegram/radar.js +35 -0
- package/lib/v2/telegram/router.js +5 -0
- package/lib/{routes → v2}/telegram/stickerpack.js +0 -0
- package/lib/v2/topys/index.js +66 -0
- package/lib/v2/topys/maintainer.js +3 -0
- package/lib/v2/topys/radar.js +13 -0
- package/lib/v2/topys/router.js +3 -0
- package/lib/v2/ucas/index.js +59 -0
- package/lib/v2/ucas/maintainer.js +3 -0
- package/lib/v2/ucas/rader.js +47 -0
- package/lib/v2/ucas/router.js +3 -0
- package/lib/v2/uibe/hr.js +19 -15
- package/lib/v2/ulapia/index.js +47 -0
- package/lib/v2/ulapia/maintainer.js +3 -0
- package/lib/v2/ulapia/radar.js +55 -0
- package/lib/v2/ulapia/research.js +38 -0
- package/lib/v2/ulapia/router.js +4 -0
- package/lib/v2/ustb/maintainer.js +24 -0
- package/lib/v2/ustb/radar.js +13 -0
- package/lib/v2/ustb/router.js +3 -0
- package/lib/v2/ustb/yjsy/news.js +464 -0
- package/lib/v2/wallhaven/index.js +55 -0
- package/lib/v2/wallhaven/maintainer.js +4 -0
- package/lib/v2/wallhaven/radar.js +53 -0
- package/lib/v2/wallhaven/router.js +4 -0
- package/lib/v2/wallstreetcn/live.js +40 -0
- package/lib/v2/wallstreetcn/maintainer.js +5 -0
- package/lib/v2/wallstreetcn/news.js +61 -0
- package/lib/v2/wallstreetcn/radar.js +19 -0
- package/lib/v2/wallstreetcn/router.js +5 -0
- package/lib/v2/wechat/feeddd.js +13 -5
- package/lib/v2/wechat/maintainer.js +1 -1
- package/lib/{routes → v2}/wenku8/chapter.js +0 -0
- package/lib/v2/wenku8/index.js +52 -0
- package/lib/v2/wenku8/maintainer.js +5 -0
- package/lib/v2/wenku8/radar.js +85 -0
- package/lib/v2/wenku8/router.js +5 -0
- package/lib/{routes → v2}/wenku8/volume.js +0 -0
- package/lib/v2/whoscall/index.js +55 -0
- package/lib/v2/whoscall/maintainer.js +5 -0
- package/lib/v2/whoscall/radar.js +25 -0
- package/lib/v2/whoscall/router.js +3 -0
- package/lib/v2/wsyu/maintainer.js +3 -0
- package/lib/{routes/universities → v2}/wsyu/news.js +0 -0
- package/lib/v2/wsyu/radar.js +25 -0
- package/lib/v2/wsyu/router.js +3 -0
- package/lib/v2/wyzxwk/article.js +65 -0
- package/lib/v2/wyzxwk/maintainer.js +3 -0
- package/lib/v2/wyzxwk/radar.js +13 -0
- package/lib/v2/wyzxwk/router.js +3 -0
- package/lib/v2/xaut/index.js +72 -0
- package/lib/v2/xaut/jwc.js +65 -0
- package/lib/v2/xaut/maintainer.js +5 -0
- package/lib/v2/xaut/radar.js +23 -0
- package/lib/v2/xaut/router.js +5 -0
- package/lib/v2/xaut/rsc.js +67 -0
- package/lib/v2/youku/channel.js +56 -0
- package/lib/v2/youku/maintainer.js +3 -0
- package/lib/v2/youku/radar.js +13 -0
- package/lib/v2/youku/router.js +3 -0
- package/lib/v2/youku/templates/channel.art +5 -0
- package/lib/{routes → v2}/yxdzqb/index.js +12 -8
- package/lib/v2/yxdzqb/maintainer.js +3 -0
- package/lib/v2/yxdzqb/radar.js +13 -0
- package/lib/v2/yxdzqb/router.js +3 -0
- package/lib/v2/yxdzqb/templates/description.art +2 -0
- package/lib/v2/zaker/index.js +65 -0
- package/lib/v2/zaker/maintainer.js +3 -0
- package/lib/v2/zaker/radar.js +19 -0
- package/lib/v2/zaker/router.js +3 -0
- package/lib/{routes → v2}/zaobao/index.js +2 -2
- package/lib/{routes → v2}/zaobao/interactive.js +0 -0
- package/lib/v2/zaobao/maintainer.js +6 -0
- package/lib/v2/zaobao/radar.js +28 -0
- package/lib/{routes → v2}/zaobao/realtime.js +4 -2
- package/lib/v2/zaobao/router.js +6 -0
- package/lib/v2/zaobao/templates/zaobao.art +17 -0
- package/lib/{routes → v2}/zaobao/util.js +55 -18
- package/lib/{routes → v2}/zaobao/znews.js +0 -3
- package/lib/v2/zjgtjy/index.js +46 -0
- package/lib/v2/zjgtjy/maintainer.js +3 -0
- package/lib/v2/zjgtjy/radar.js +31 -0
- package/lib/v2/zjgtjy/router.js +3 -0
- package/package.json +58 -55
- package/lib/routes/btzj/index.js +0 -77
- package/lib/routes/ccreports/index.js +0 -40
- package/lib/routes/changba/user.js +0 -71
- package/lib/routes/cnbeta/home.js +0 -53
- package/lib/routes/cntv/cntv.js +0 -24
- package/lib/routes/douban/explore.js +0 -33
- package/lib/routes/ft/myft.js +0 -46
- package/lib/routes/hackernews/story.js +0 -60
- package/lib/routes/hex-rays/index.js +0 -28
- package/lib/routes/hkepc/index.js +0 -164
- package/lib/routes/houxu/events.js +0 -27
- package/lib/routes/houxu/live.js +0 -39
- package/lib/routes/houxu/lives.js +0 -58
- package/lib/routes/iresearch/report.js +0 -63
- package/lib/routes/jandan/article.js +0 -62
- package/lib/routes/jandan/pic.js +0 -89
- package/lib/routes/javdb/utils.js +0 -82
- package/lib/routes/javlibrary/bestreviews.js +0 -11
- package/lib/routes/javlibrary/stars.js +0 -9
- package/lib/routes/javlibrary/users.js +0 -22
- package/lib/routes/javlibrary/utils.js +0 -68
- package/lib/routes/javlibrary/videos.js +0 -9
- package/lib/routes/jisilu/reply.js +0 -63
- package/lib/routes/jisilu/topic.js +0 -68
- package/lib/routes/latepost/index.js +0 -84
- package/lib/routes/learnku/topic.js +0 -53
- package/lib/routes/people/env.js +0 -73
- package/lib/routes/people/opinion.js +0 -69
- package/lib/routes/producthunt/today.js +0 -24
- package/lib/routes/topys/article.js +0 -55
- package/lib/routes/universities/cqwu/news.js +0 -39
- package/lib/routes/wallstreetcn/live.js +0 -44
- package/lib/routes/wallstreetcn/news.js +0 -33
- package/lib/routes/youku/channel.js +0 -56
- package/lib/routes/zaker/focusread.js +0 -65
- package/lib/routes/zaker/source.js +0 -66
|
@@ -5,10 +5,11 @@ const queryString = require('query-string');
|
|
|
5
5
|
|
|
6
6
|
module.exports = async (ctx) => {
|
|
7
7
|
const id = ctx.params.id;
|
|
8
|
+
const type = ctx.params.type ?? 'feed';
|
|
8
9
|
|
|
9
10
|
const res = await got.get('https://m.weibo.cn/api/container/getIndex', {
|
|
10
11
|
searchParams: queryString.stringify({
|
|
11
|
-
containerid: `${id}_-
|
|
12
|
+
containerid: `${id}_-_${type}`,
|
|
12
13
|
luicode: '10000011',
|
|
13
14
|
lfid: `${id}_-_main`,
|
|
14
15
|
}),
|
|
@@ -1,12 +1,37 @@
|
|
|
1
|
+
const querystring = require('querystring');
|
|
1
2
|
const got = require('@/utils/got');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
2
4
|
const config = require('@/config').value;
|
|
5
|
+
const weiboUtils = require('./utils');
|
|
6
|
+
const { fallback, queryToBoolean } = require('@/utils/readable-social');
|
|
3
7
|
|
|
4
8
|
module.exports = async (ctx) => {
|
|
5
9
|
const uid = ctx.params.uid;
|
|
6
10
|
const feature = ctx.params.feature || 0;
|
|
11
|
+
const routeParams = ctx.params.routeParams || undefined;
|
|
7
12
|
const token = await ctx.cache.get('weibotimelineuid' + uid, false);
|
|
13
|
+
let displayVideo = '1';
|
|
14
|
+
if (routeParams) {
|
|
15
|
+
if (routeParams === '1' || routeParams === '0') {
|
|
16
|
+
displayVideo = routeParams;
|
|
17
|
+
} else {
|
|
18
|
+
const routeParams = querystring.parse(ctx.params.routeParams);
|
|
19
|
+
displayVideo = fallback(undefined, queryToBoolean(routeParams.displayVideo), true) ? '1' : '0';
|
|
20
|
+
}
|
|
21
|
+
}
|
|
8
22
|
|
|
9
23
|
if (token) {
|
|
24
|
+
const containerResponse = await got({
|
|
25
|
+
method: 'get',
|
|
26
|
+
url: `https://m.weibo.cn/api/container/getIndex?type=uid&value=${uid}`,
|
|
27
|
+
headers: {
|
|
28
|
+
Referer: 'https://m.weibo.cn/',
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
const name = containerResponse.data.data.userInfo.screen_name;
|
|
32
|
+
const description = containerResponse.data.data.userInfo.description;
|
|
33
|
+
const profileImageUrl = containerResponse.data.data.userInfo.profile_image_url;
|
|
34
|
+
|
|
10
35
|
const response = await got.get(`https://api.weibo.com/2/statuses/home_timeline.json?access_token=${token}&count=100&feature=${feature}`);
|
|
11
36
|
// 检查token失效
|
|
12
37
|
if (response.data.error !== undefined) {
|
|
@@ -16,143 +41,66 @@ module.exports = async (ctx) => {
|
|
|
16
41
|
ctx.set({
|
|
17
42
|
'Cache-Control': 'no-cache',
|
|
18
43
|
});
|
|
19
|
-
ctx.redirect(`https://api.weibo.com/oauth2/authorize?client_id=${app_key}&redirect_uri=${redirect_url}`);
|
|
44
|
+
ctx.redirect(`https://api.weibo.com/oauth2/authorize?client_id=${app_key}&redirect_uri=${redirect_url}${routeParams ? `&state=${routeParams}` : ''}`);
|
|
20
45
|
}
|
|
21
|
-
|
|
22
|
-
const weiboEmotion = await ctx.cache.tryGet('weiboEmotion', async () => {
|
|
23
|
-
const tmpEmotionList = {};
|
|
24
|
-
await Promise.all(
|
|
25
|
-
['face', 'ani', 'cartoon'].map(async (type) => {
|
|
26
|
-
try {
|
|
27
|
-
const rep = await got.get(`https://api.weibo.com/2/emotions.json?access_token=${token}&type=${type}`);
|
|
28
|
-
rep.data.forEach((item) => {
|
|
29
|
-
tmpEmotionList[item.phrase] = item.url;
|
|
30
|
-
});
|
|
31
|
-
return Promise.resolve(rep);
|
|
32
|
-
} catch (err) {
|
|
33
|
-
// pass
|
|
34
|
-
}
|
|
35
|
-
})
|
|
36
|
-
);
|
|
37
|
-
return tmpEmotionList;
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
const data = await Promise.all(
|
|
46
|
+
const resultItem = await Promise.all(
|
|
41
47
|
response.data.statuses.map(async (item) => {
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const rep = await got.get(`https://m.weibo.cn/${item.user.id}/${item.id}`);
|
|
49
|
-
rep.body.replace(/"text": "([\s\S]*?)",/g, (s, value) => {
|
|
50
|
-
res.push(value.replace(/\\"/g, "'"));
|
|
51
|
-
});
|
|
52
|
-
rep.body.replace(/"mp4_720p_mp4": "([\s\S]*?)",/, (s, value) => {
|
|
53
|
-
videoList.push(value);
|
|
54
|
-
});
|
|
55
|
-
if (res.length > 1) {
|
|
56
|
-
const sub_rep = await got.get(`https://m.weibo.cn/${item.retweeted_status.user.id}/${item.retweeted_status.id}`);
|
|
57
|
-
sub_rep.body.replace(/"text": "([\s\S]*?)",/g, (s, value) => {
|
|
58
|
-
res[1] = value.replace(/\\"/g, "'");
|
|
59
|
-
});
|
|
60
|
-
sub_rep.body.replace(/"mp4_720p_mp4": "([\s\S]*?)",/, (s, value) => {
|
|
61
|
-
videoList.push(value);
|
|
62
|
-
});
|
|
63
|
-
picUrlList = picUrlList.concat(item.retweeted_status.pic_urls);
|
|
64
|
-
}
|
|
65
|
-
} catch (err) {
|
|
66
|
-
res.push(item.text);
|
|
67
|
-
if (item.retweeted_status) {
|
|
68
|
-
res.push(item.retweeted_status.text);
|
|
69
|
-
picUrlList = picUrlList.concat(item.retweeted_status.pic_urls);
|
|
70
|
-
}
|
|
71
|
-
// 非全文获取的微博内容需要替换表情
|
|
72
|
-
res.forEach((content, index) => {
|
|
73
|
-
const emotion = [];
|
|
74
|
-
content.replace(/(\[.*?\])/g, (s, value) => {
|
|
75
|
-
emotion.push(value);
|
|
76
|
-
});
|
|
48
|
+
const key = `weibotimelineurl${item.user.id}${item.id}`;
|
|
49
|
+
const value = await ctx.cache.tryGet(key, async () => {
|
|
50
|
+
const _data = await weiboUtils.getShowData(uid, item.id);
|
|
51
|
+
return JSON.stringify(_data);
|
|
52
|
+
});
|
|
53
|
+
const data = JSON.parse(value);
|
|
77
54
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
let content = '';
|
|
86
|
-
try {
|
|
87
|
-
if (res.length >= 2) {
|
|
88
|
-
content = `${res[0]}<br><br><hr style="height:5px;border:none;border-top:5px ridge green;" /><span style="background-color:#71adec">${item.retweeted_status.user.screen_name}:<hr style="height:1px;border:none;border-top:1px solid #555555;" /><br>${res[1]}</span>`;
|
|
89
|
-
} else if (res.length === 1) {
|
|
90
|
-
content = res[0];
|
|
91
|
-
}
|
|
55
|
+
// 是否通过api拿到了data
|
|
56
|
+
const isDataOK = data?.text;
|
|
57
|
+
if (isDataOK) {
|
|
58
|
+
item = data;
|
|
59
|
+
}
|
|
92
60
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
61
|
+
// 转发的长微博处理
|
|
62
|
+
const retweet = item.retweeted_status;
|
|
63
|
+
if (retweet?.isLongText) {
|
|
64
|
+
const retweetData = await weiboUtils.getShowData(retweet.user.id, retweet.id);
|
|
65
|
+
if (retweetData?.text) {
|
|
66
|
+
item.retweeted_status.text = retweetData.text;
|
|
99
67
|
}
|
|
68
|
+
}
|
|
100
69
|
|
|
101
|
-
|
|
102
|
-
if (res.length >= 2) {
|
|
103
|
-
title = `${item.user.name}--转发微博`;
|
|
104
|
-
} else if (item.pic_urls.length > 0) {
|
|
105
|
-
title = `${item.user.name}--原创图文微博`;
|
|
106
|
-
} else {
|
|
107
|
-
title = `${item.user.name}--原创微博`;
|
|
108
|
-
}
|
|
109
|
-
return {
|
|
110
|
-
title,
|
|
111
|
-
content,
|
|
112
|
-
author: item.user.name,
|
|
113
|
-
date: item.created_at,
|
|
114
|
-
link: `https://m.weibo.cn/detail/${item.id}`,
|
|
115
|
-
pic_urls: picUrlList,
|
|
116
|
-
videoList: Array.from(new Set(videoList)),
|
|
117
|
-
};
|
|
118
|
-
});
|
|
119
|
-
return Promise.resolve(realContent);
|
|
120
|
-
})
|
|
121
|
-
);
|
|
70
|
+
const link = `https://weibo.com/${uid}/${item.id}`;
|
|
122
71
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
let description = '';
|
|
128
|
-
if (item.content !== null) {
|
|
129
|
-
description = item.content;
|
|
130
|
-
}
|
|
72
|
+
const formatExtended = weiboUtils.formatExtended(ctx, item);
|
|
73
|
+
let description = formatExtended.description;
|
|
74
|
+
const title = formatExtended.title;
|
|
75
|
+
const pubDate = isDataOK ? parseDate(data.created_at) : parseDate(item.created_at);
|
|
131
76
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
if (item.videoList.length !== 0) {
|
|
136
|
-
item.videoList.forEach((url) => {
|
|
137
|
-
description += `<iframe height=720 width=1080 src='${url}' frameborder=0 'allowfullscreen'></iframe>`;
|
|
138
|
-
});
|
|
77
|
+
// 视频的处理
|
|
78
|
+
if (displayVideo === '1') {
|
|
79
|
+
description = weiboUtils.formatVideo(description, item);
|
|
139
80
|
}
|
|
81
|
+
|
|
140
82
|
return {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
pubDate: item.date,
|
|
147
|
-
title: item.title,
|
|
148
|
-
author: item.author,
|
|
83
|
+
title,
|
|
84
|
+
description,
|
|
85
|
+
link,
|
|
86
|
+
pubDate,
|
|
87
|
+
author: item.user.screen_name,
|
|
149
88
|
};
|
|
150
|
-
})
|
|
89
|
+
})
|
|
90
|
+
);
|
|
91
|
+
|
|
92
|
+
ctx.state.data = {
|
|
93
|
+
title: `个人微博时间线--${name}`,
|
|
94
|
+
link: `http://weibo.com/${uid}/`,
|
|
95
|
+
description,
|
|
96
|
+
image: profileImageUrl,
|
|
97
|
+
item: resultItem,
|
|
151
98
|
};
|
|
152
99
|
} else if (uid === '0' || ctx.querystring) {
|
|
153
100
|
const { app_key = '', redirect_url = ctx.request.origin + '/weibo/timeline/0', app_secret = '' } = config.weibo;
|
|
154
101
|
|
|
155
|
-
const code =
|
|
102
|
+
const code = ctx.query.code;
|
|
103
|
+
const routeParams = ctx.query.state;
|
|
156
104
|
if (code) {
|
|
157
105
|
const rep = await got.post(`https://api.weibo.com/oauth2/access_token?client_id=${app_key}&client_secret=${app_secret}&code=${code}&redirect_uri=${redirect_url}&grant_type=authorization_code`);
|
|
158
106
|
const token = rep.data.access_token;
|
|
@@ -164,7 +112,7 @@ module.exports = async (ctx) => {
|
|
|
164
112
|
'Content-Type': 'text/html; charset=UTF-8',
|
|
165
113
|
'Cache-Control': 'no-cache',
|
|
166
114
|
});
|
|
167
|
-
ctx.body = `<script>window.location = '/weibo/timeline/${uid}'</script>`;
|
|
115
|
+
ctx.body = `<script>window.location = '/weibo/timeline/${uid}${routeParams ? `/${routeParams}` : ''}'</script>`;
|
|
168
116
|
}
|
|
169
117
|
} else {
|
|
170
118
|
const { app_key = '', redirect_url = ctx.request.origin + '/weibo/timeline/0' } = config.weibo;
|
|
@@ -173,6 +121,6 @@ module.exports = async (ctx) => {
|
|
|
173
121
|
ctx.set({
|
|
174
122
|
'Cache-Control': 'no-cache',
|
|
175
123
|
});
|
|
176
|
-
ctx.redirect(`https://api.weibo.com/oauth2/authorize?client_id=${app_key}&redirect_uri=${redirect_url}`);
|
|
124
|
+
ctx.redirect(`https://api.weibo.com/oauth2/authorize?client_id=${app_key}&redirect_uri=${redirect_url}${routeParams ? `&state=${feature}/${routeParams.replace(/&/g, '%26')}` : ''}`);
|
|
177
125
|
}
|
|
178
126
|
};
|
package/lib/routes/weibo/user.js
CHANGED
|
@@ -39,22 +39,47 @@ module.exports = async (ctx) => {
|
|
|
39
39
|
},
|
|
40
40
|
});
|
|
41
41
|
|
|
42
|
+
let earliestDate;
|
|
43
|
+
|
|
42
44
|
const resultItem = await Promise.all(
|
|
43
45
|
response.data.data.cards
|
|
44
|
-
.
|
|
46
|
+
.reverse() // reverse first to ensure the pinned card will be processed lastly
|
|
45
47
|
.map(async (item) => {
|
|
48
|
+
if (!item.mblog && item.card_group && Array.isArray(item.card_group) && item.card_group.length > 0) {
|
|
49
|
+
// w/o `mblog`, it may have a `card_group` containing only 1 card
|
|
50
|
+
// only get the 1st card because we haven't observed that there can be multiple cards in it
|
|
51
|
+
item = item.card_group[0];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (!item.mblog) {
|
|
55
|
+
return; // drop
|
|
56
|
+
}
|
|
57
|
+
|
|
46
58
|
const key = 'weibo:user:' + item.mblog.bid;
|
|
47
59
|
const data = await ctx.cache.tryGet(key, () => weiboUtils.getShowData(uid, item.mblog.bid));
|
|
48
60
|
|
|
49
61
|
if (data && data.text) {
|
|
50
62
|
item.mblog.text = data.text;
|
|
51
63
|
item.mblog.created_at = parseDate(data.created_at);
|
|
64
|
+
item.mblog.pics = data.pics;
|
|
52
65
|
if (item.mblog.retweeted_status && data.retweeted_status) {
|
|
53
66
|
item.mblog.retweeted_status.created_at = data.retweeted_status.created_at;
|
|
54
67
|
}
|
|
55
68
|
} else {
|
|
56
69
|
item.mblog.created_at = timezone(item.mblog.created_at, +8);
|
|
57
70
|
}
|
|
71
|
+
|
|
72
|
+
// drop too old pinned weibo, otherwise preserve it
|
|
73
|
+
if (!item.mblog.title || item.mblog.title.text !== '置顶') {
|
|
74
|
+
if (!earliestDate || (item.mblog.created_at && earliestDate > item.mblog.created_at)) {
|
|
75
|
+
earliestDate = item.mblog.created_at;
|
|
76
|
+
}
|
|
77
|
+
} else {
|
|
78
|
+
if (earliestDate && item.mblog.created_at && earliestDate > item.mblog.created_at) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
58
83
|
// 转发的长微博处理
|
|
59
84
|
const retweet = item.mblog.retweeted_status;
|
|
60
85
|
if (retweet && retweet.isLongText) {
|
|
@@ -91,6 +116,6 @@ module.exports = async (ctx) => {
|
|
|
91
116
|
link: `http://weibo.com/${uid}/`,
|
|
92
117
|
description,
|
|
93
118
|
image: profileImageUrl,
|
|
94
|
-
item: resultItem,
|
|
119
|
+
item: resultItem.filter((item) => item).reverse(),
|
|
95
120
|
};
|
|
96
121
|
};
|
|
@@ -22,6 +22,7 @@ const weiboUtils = {
|
|
|
22
22
|
widthOfPics: fallback(params.widthOfPics, queryToInteger(routeParams.widthOfPics), -1),
|
|
23
23
|
heightOfPics: fallback(params.heightOfPics, queryToInteger(routeParams.heightOfPics), -1),
|
|
24
24
|
sizeOfAuthorAvatar: fallback(params.sizeOfAuthorAvatar, queryToInteger(routeParams.sizeOfAuthorAvatar), 48),
|
|
25
|
+
showEmojiInDescription: fallback(params.showEmojiInDescription, queryToInteger(routeParams.showEmojiInDescription), true),
|
|
25
26
|
};
|
|
26
27
|
|
|
27
28
|
params = mergedParams;
|
|
@@ -41,17 +42,20 @@ const weiboUtils = {
|
|
|
41
42
|
widthOfPics,
|
|
42
43
|
heightOfPics,
|
|
43
44
|
sizeOfAuthorAvatar,
|
|
45
|
+
showEmojiInDescription,
|
|
44
46
|
} = params;
|
|
45
47
|
|
|
46
48
|
let retweeted = '';
|
|
47
49
|
// 长文章的处理
|
|
48
50
|
let htmlNewLineUnreplaced = (status.longText && status.longText.longTextContent) || status.text || '';
|
|
49
51
|
// 表情图标转换为文字
|
|
50
|
-
|
|
52
|
+
if (!showEmojiInDescription) {
|
|
53
|
+
htmlNewLineUnreplaced = htmlNewLineUnreplaced.replace(/<span class="url-icon"><img.*?alt="?(.*?)"? [\s\S]*?\/><\/span>/g, '$1');
|
|
54
|
+
}
|
|
51
55
|
// 去掉外部链接的图标
|
|
52
56
|
htmlNewLineUnreplaced = htmlNewLineUnreplaced.replace(/<span class=["|']url-icon["|']>.*?<\/span><span class="surl-text">(.*?)<\/span>/g, '$1');
|
|
53
57
|
// 去掉乱七八糟的图标
|
|
54
|
-
htmlNewLineUnreplaced = htmlNewLineUnreplaced.replace(/<span class=["|']url-icon["|']>(.*?)<\/span>/g, '');
|
|
58
|
+
// htmlNewLineUnreplaced = htmlNewLineUnreplaced.replace(/<span class=["|']url-icon["|']>(.*?)<\/span>/g, '');
|
|
55
59
|
// 去掉全文
|
|
56
60
|
htmlNewLineUnreplaced = htmlNewLineUnreplaced.replace(/全文<br>/g, '<br>');
|
|
57
61
|
htmlNewLineUnreplaced = htmlNewLineUnreplaced.replace(/<a href="(.*?)">全文<\/a>/g, '');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const got = require('@/utils/got');
|
|
2
2
|
const cheerio = require('cheerio');
|
|
3
3
|
const url = require('url');
|
|
4
|
-
const
|
|
4
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
5
5
|
|
|
6
6
|
const host = 'https://www.who.int/';
|
|
7
7
|
|
|
@@ -20,7 +20,7 @@ module.exports = async (ctx) => {
|
|
|
20
20
|
const $elem = $(elem);
|
|
21
21
|
const title = $elem.find('p').text();
|
|
22
22
|
const link = url.resolve(host, $elem.find('a').attr('href'));
|
|
23
|
-
const pubDate =
|
|
23
|
+
const pubDate = parseDate($elem.find('.timestamp').text(), 'YYYY年M月D日');
|
|
24
24
|
|
|
25
25
|
const item = {
|
|
26
26
|
title,
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
const got = require('@/utils/got');
|
|
2
2
|
const cheerio = require('cheerio');
|
|
3
3
|
const { getUrl, getRandom16 } = require('./utils');
|
|
4
|
-
const baseUrl = '
|
|
5
|
-
const gotIns = got.extend({
|
|
6
|
-
headers: {
|
|
7
|
-
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36',
|
|
8
|
-
},
|
|
9
|
-
});
|
|
4
|
+
const baseUrl = 'https://www.ximalaya.com';
|
|
10
5
|
const config = require('@/config').value;
|
|
11
6
|
|
|
12
7
|
// Find category from: https://help.apple.com/itc/podcasts_connect/?lang=en#/itc9267a2f12
|
|
@@ -47,11 +42,12 @@ function getTextFromElement(element) {
|
|
|
47
42
|
return '';
|
|
48
43
|
}
|
|
49
44
|
|
|
50
|
-
async function parseAlbumData(album_id) {
|
|
45
|
+
async function parseAlbumData(category, album_id) {
|
|
51
46
|
// 解析网页版的 HTML 获取该专辑的信息
|
|
52
47
|
// 这里的 {category} 并不重要,系统会准确的返回该 id 对应专辑的信息
|
|
48
|
+
// 现在 {category} 必须要精确到大的类别
|
|
53
49
|
// https://www.ximalaya.com/{category}/{album_id}/
|
|
54
|
-
const response = await
|
|
50
|
+
const response = await got(`https://www.ximalaya.com/${category}/${album_id}/`);
|
|
55
51
|
const data = response.body;
|
|
56
52
|
const $ = cheerio.load(data);
|
|
57
53
|
const stateElement = $('script')
|
|
@@ -83,12 +79,13 @@ function judgeTrue(str, ...validStrings) {
|
|
|
83
79
|
}
|
|
84
80
|
|
|
85
81
|
module.exports = async (ctx) => {
|
|
82
|
+
const type = ctx.params.type; // 专辑分类
|
|
86
83
|
const id = ctx.params.id; // 专辑id
|
|
87
84
|
const shouldAll = judgeTrue(ctx.params.all, 'all');
|
|
88
85
|
const shouldShowNote = judgeTrue(ctx.params.shownote, 'shownote');
|
|
89
86
|
const pageSize = shouldAll ? 200 : 30;
|
|
90
87
|
|
|
91
|
-
const albumData = await parseAlbumData(id);
|
|
88
|
+
const albumData = await parseAlbumData(type, id);
|
|
92
89
|
|
|
93
90
|
const isPaid = albumData.store.AlbumDetailPage.albumPageMainInfo.isPaid;
|
|
94
91
|
|
|
@@ -108,7 +105,7 @@ module.exports = async (ctx) => {
|
|
|
108
105
|
// const isAsc = albumData.store.AlbumDetailTrackList.sort === 0;
|
|
109
106
|
// 喜马拉雅的 API 的 query 参数 isAsc=0 时才是升序,不写就是降序。
|
|
110
107
|
const trackInfoApi = `http://mobile.ximalaya.com/mobile/v1/album/track/?albumId=${id}&pageSize=${pageSize}&pageId=`;
|
|
111
|
-
const trackInfoResponse = await
|
|
108
|
+
const trackInfoResponse = await got.get(trackInfoApi + '1');
|
|
112
109
|
const maxPageId = trackInfoResponse.data.data.maxPageId; // 最大页数
|
|
113
110
|
|
|
114
111
|
let playList = trackInfoResponse.data.data.list;
|
|
@@ -117,7 +114,7 @@ module.exports = async (ctx) => {
|
|
|
117
114
|
const promises = [];
|
|
118
115
|
for (let i = 2; i <= maxPageId; i++) {
|
|
119
116
|
// string + number -> string
|
|
120
|
-
promises.push(
|
|
117
|
+
promises.push(got.get(trackInfoApi + i));
|
|
121
118
|
}
|
|
122
119
|
const responses = await Promise.all(promises);
|
|
123
120
|
for (let j = 0; j < responses.length; j++) {
|
|
@@ -132,7 +129,7 @@ module.exports = async (ctx) => {
|
|
|
132
129
|
let _desc;
|
|
133
130
|
if (shouldShowNote) {
|
|
134
131
|
const trackRichInfoApi = `https://mobile.ximalaya.com/mobile-track/richIntro?trackId=${item.trackId}`;
|
|
135
|
-
const trackRichInfoResponse = await
|
|
132
|
+
const trackRichInfoResponse = await got.get(trackRichInfoApi);
|
|
136
133
|
_desc = trackRichInfoResponse.data.richIntro;
|
|
137
134
|
}
|
|
138
135
|
if (!_desc) {
|
|
@@ -2,134 +2,9 @@ const crypto = require('crypto');
|
|
|
2
2
|
const getParams = (ep) => {
|
|
3
3
|
const a1 = 'xkt3a41psizxrh9l';
|
|
4
4
|
const a = [
|
|
5
|
-
-1,
|
|
6
|
-
-1,
|
|
7
|
-
-1,
|
|
8
|
-
-1,
|
|
9
|
-
-1,
|
|
10
|
-
-1,
|
|
11
|
-
-1,
|
|
12
|
-
-1,
|
|
13
|
-
-1,
|
|
14
|
-
-1,
|
|
15
|
-
-1,
|
|
16
|
-
-1,
|
|
17
|
-
-1,
|
|
18
|
-
-1,
|
|
19
|
-
-1,
|
|
20
|
-
-1,
|
|
21
|
-
-1,
|
|
22
|
-
-1,
|
|
23
|
-
-1,
|
|
24
|
-
-1,
|
|
25
|
-
-1,
|
|
26
|
-
-1,
|
|
27
|
-
-1,
|
|
28
|
-
-1,
|
|
29
|
-
-1,
|
|
30
|
-
-1,
|
|
31
|
-
-1,
|
|
32
|
-
-1,
|
|
33
|
-
-1,
|
|
34
|
-
-1,
|
|
35
|
-
-1,
|
|
36
|
-
-1,
|
|
37
|
-
-1,
|
|
38
|
-
-1,
|
|
39
|
-
-1,
|
|
40
|
-
-1,
|
|
41
|
-
-1,
|
|
42
|
-
-1,
|
|
43
|
-
-1,
|
|
44
|
-
-1,
|
|
45
|
-
-1,
|
|
46
|
-
-1,
|
|
47
|
-
-1,
|
|
48
|
-
62,
|
|
49
|
-
-1,
|
|
50
|
-
-1,
|
|
51
|
-
-1,
|
|
52
|
-
63,
|
|
53
|
-
52,
|
|
54
|
-
53,
|
|
55
|
-
54,
|
|
56
|
-
55,
|
|
57
|
-
56,
|
|
58
|
-
57,
|
|
59
|
-
58,
|
|
60
|
-
59,
|
|
61
|
-
60,
|
|
62
|
-
61,
|
|
63
|
-
-1,
|
|
64
|
-
-1,
|
|
65
|
-
-1,
|
|
66
|
-
-1,
|
|
67
|
-
-1,
|
|
68
|
-
-1,
|
|
69
|
-
-1,
|
|
70
|
-
0,
|
|
71
|
-
1,
|
|
72
|
-
2,
|
|
73
|
-
3,
|
|
74
|
-
4,
|
|
75
|
-
5,
|
|
76
|
-
6,
|
|
77
|
-
7,
|
|
78
|
-
8,
|
|
79
|
-
9,
|
|
80
|
-
10,
|
|
81
|
-
11,
|
|
82
|
-
12,
|
|
83
|
-
13,
|
|
84
|
-
14,
|
|
85
|
-
15,
|
|
86
|
-
16,
|
|
87
|
-
17,
|
|
88
|
-
18,
|
|
89
|
-
19,
|
|
90
|
-
20,
|
|
91
|
-
21,
|
|
92
|
-
22,
|
|
93
|
-
23,
|
|
94
|
-
24,
|
|
95
|
-
25,
|
|
96
|
-
-1,
|
|
97
|
-
-1,
|
|
98
|
-
-1,
|
|
99
|
-
-1,
|
|
100
|
-
-1,
|
|
101
|
-
-1,
|
|
102
|
-
26,
|
|
103
|
-
27,
|
|
104
|
-
28,
|
|
105
|
-
29,
|
|
106
|
-
30,
|
|
107
|
-
31,
|
|
108
|
-
32,
|
|
109
|
-
33,
|
|
110
|
-
34,
|
|
111
|
-
35,
|
|
112
|
-
36,
|
|
113
|
-
37,
|
|
114
|
-
38,
|
|
115
|
-
39,
|
|
116
|
-
40,
|
|
117
|
-
41,
|
|
118
|
-
42,
|
|
119
|
-
43,
|
|
120
|
-
44,
|
|
121
|
-
45,
|
|
122
|
-
46,
|
|
123
|
-
47,
|
|
124
|
-
48,
|
|
125
|
-
49,
|
|
126
|
-
50,
|
|
127
|
-
51,
|
|
128
|
-
-1,
|
|
129
|
-
-1,
|
|
130
|
-
-1,
|
|
131
|
-
-1,
|
|
132
|
-
-1,
|
|
5
|
+
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59,
|
|
6
|
+
60, 61, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
|
|
7
|
+
44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1,
|
|
133
8
|
];
|
|
134
9
|
let o = ep.length;
|
|
135
10
|
let r = 0;
|
|
@@ -21,7 +21,7 @@ module.exports = async (ctx) => {
|
|
|
21
21
|
|
|
22
22
|
const $ = cheerio.load(response.data);
|
|
23
23
|
const $descriptionRoot = cheerio.load('<div><div class="img-root"></div><div class="content-root"></div></div>');
|
|
24
|
-
$descriptionRoot('div.img-root').append($('article img'));
|
|
24
|
+
$descriptionRoot('div.img-root').append($('article img:not(header img)'));
|
|
25
25
|
$descriptionRoot('div.content-root').append($('article p').removeAttr('content'));
|
|
26
26
|
return $descriptionRoot.html();
|
|
27
27
|
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
|
|
4
|
+
module.exports = async (ctx) => {
|
|
5
|
+
const link = `https://youzhiyouxing.cn/materials`;
|
|
6
|
+
const response = await got({
|
|
7
|
+
method: 'get',
|
|
8
|
+
url: link,
|
|
9
|
+
});
|
|
10
|
+
const $ = cheerio.load(response.data);
|
|
11
|
+
const list = $('[phx-click=material]');
|
|
12
|
+
const resData = {
|
|
13
|
+
title: '有知有行 - 有知',
|
|
14
|
+
link,
|
|
15
|
+
description: '有知有行 - 有知',
|
|
16
|
+
item: list
|
|
17
|
+
.map((_index, item) => {
|
|
18
|
+
const $item = $(item);
|
|
19
|
+
const res = {
|
|
20
|
+
title: $item.find('.title-bar > h3').text(),
|
|
21
|
+
description: $item.find('.sm-text').text(),
|
|
22
|
+
link: `https://youzhiyouxing.cn/materials/${$item.attr('phx-value-id')}`,
|
|
23
|
+
};
|
|
24
|
+
return res;
|
|
25
|
+
})
|
|
26
|
+
.get(),
|
|
27
|
+
};
|
|
28
|
+
ctx.state.data = resData;
|
|
29
|
+
};
|
|
@@ -5,6 +5,7 @@ const { generateData } = require('./pin/utils');
|
|
|
5
5
|
|
|
6
6
|
module.exports = async (ctx) => {
|
|
7
7
|
const id = ctx.params.id;
|
|
8
|
+
const getAll = ctx.params.getAll;
|
|
8
9
|
|
|
9
10
|
const response = await got({
|
|
10
11
|
method: 'get',
|
|
@@ -17,6 +18,29 @@ module.exports = async (ctx) => {
|
|
|
17
18
|
|
|
18
19
|
const list = response.data.data;
|
|
19
20
|
|
|
21
|
+
if (getAll) {
|
|
22
|
+
const totals = response.data.paging.totals;
|
|
23
|
+
|
|
24
|
+
const offsetList = [...new Array(Math.round(totals / 20)).keys()].map((item) => item * 20).slice(1);
|
|
25
|
+
const otherList = await Promise.all(
|
|
26
|
+
offsetList.map((offset) =>
|
|
27
|
+
ctx.cache.tryGet(`https://www.zhihu.com/api/v4/collections/${id}/items?offset=${offset}&limit=20`, async () => {
|
|
28
|
+
const response = await got({
|
|
29
|
+
method: 'get',
|
|
30
|
+
url: `https://www.zhihu.com/api/v4/collections/${id}/items?offset=${offset}&limit=20`,
|
|
31
|
+
headers: {
|
|
32
|
+
...utils.header,
|
|
33
|
+
Referer: `https://www.zhihu.com/collection/${id}`,
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
return response.data.data;
|
|
38
|
+
})
|
|
39
|
+
)
|
|
40
|
+
).then((item) => item.flat());
|
|
41
|
+
list.push(...otherList);
|
|
42
|
+
}
|
|
43
|
+
|
|
20
44
|
const response2 = await got({
|
|
21
45
|
method: 'get',
|
|
22
46
|
url: `https://www.zhihu.com/collection/${id}`,
|
|
@@ -42,9 +66,9 @@ module.exports = async (ctx) => {
|
|
|
42
66
|
item.content.type === 'pin'
|
|
43
67
|
? generateDataPin(item)
|
|
44
68
|
: {
|
|
45
|
-
title: item.content.type === 'article' ? item.content.title : item.content.question.title,
|
|
69
|
+
title: item.content.type === 'article' || item.content.type === 'zvideo' ? item.content.title : item.content.question.title,
|
|
46
70
|
link: item.content.url,
|
|
47
|
-
description: item.content.content,
|
|
71
|
+
description: item.content.type === 'zvideo' ? `<img src=${item.content.video.url}/>` : item.content.content,
|
|
48
72
|
pubDate: new Date((item.content.type === 'article' ? item.content.updated : item.content.updated_time) * 1000).toUTCString(),
|
|
49
73
|
}
|
|
50
74
|
),
|