rsshub 1.0.0-master.fe69819 → 1.0.0-master.fe775f5
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/lib/config.js +144 -121
- package/lib/middleware/cache/index.js +3 -3
- package/lib/middleware/cache/memory.js +5 -5
- package/lib/middleware/cache/redis.js +17 -2
- package/lib/middleware/template.js +4 -4
- package/lib/radar-rules.js +0 -162
- package/lib/router.js +90 -164
- package/lib/routes/afdian/dynamic.js +2 -1
- package/lib/routes/dsndsht23/index.js +2 -1
- package/lib/routes/ehentai/ehapi.js +16 -6
- package/lib/routes/ehentai/favorites.js +14 -7
- package/lib/routes/ehentai/search.js +14 -5
- package/lib/routes/ehentai/tag.js +14 -5
- package/lib/routes/fdroid/apprelease.js +1 -1
- package/lib/routes/gov/fmprc/utils.js +6 -10
- package/lib/routes/hentaimama/videos.js +1 -1
- package/lib/routes/lizhi/user.js +1 -1
- package/lib/routes/manxiaosi/book.js +1 -1
- package/lib/routes/missevan/drama.js +1 -1
- package/lib/routes/missevan/latest.js +1 -1
- package/lib/routes/mofish/index.js +21 -9
- package/lib/routes/mofish/templates/description.art +4 -0
- package/lib/routes/ncm/djradio.js +3 -4
- package/lib/routes/nhentai/util.js +2 -2
- package/lib/routes/novel/biquge.js +24 -23
- package/lib/routes/novel/biqugeinfo.js +26 -26
- package/lib/routes/or/index.js +1 -1
- package/lib/routes/prestige-av/series.js +3 -6
- package/lib/routes/radio/radio.js +1 -1
- package/lib/routes/sina/rollnews.js +8 -3
- package/lib/routes/tencent/wechat/tgchannel.js +91 -30
- package/lib/routes/touhougarakuta/index.js +4 -2
- package/lib/routes/touhougarakuta/json2html.js +22 -10
- package/lib/routes/universities/hitwh/today.js +6 -6
- package/lib/routes/weibo/timeline.js +18 -1
- package/lib/routes/weibo/user.js +19 -3
- package/lib/routes/weibo/utils.js +113 -5
- package/lib/routes/ximalaya/album.js +2 -2
- package/lib/routes/yyets/todayfilelist.js +0 -1
- package/lib/routes/zhihu/activities.js +1 -0
- package/lib/routes/zhihu/daily.js +1 -0
- package/lib/routes/zhihu/daily_section.js +1 -0
- package/lib/routes/zhihu/hot.js +3 -2
- package/lib/utils/puppeteer.js +1 -1
- package/lib/v2/35photo/actual.js +7 -0
- package/lib/v2/35photo/author.js +9 -0
- package/lib/v2/35photo/genre.js +9 -0
- package/lib/v2/35photo/interesting.js +7 -0
- package/lib/v2/35photo/maintainer.js +8 -0
- package/lib/v2/35photo/map.js +7 -0
- package/lib/v2/35photo/new.js +7 -0
- package/lib/v2/35photo/radar.js +43 -0
- package/lib/v2/35photo/router.js +8 -0
- package/lib/v2/35photo/utils.js +42 -0
- package/lib/v2/36kr/maintainer.js +7 -0
- package/lib/{routes → v2}/36kr/motif.js +2 -1
- package/lib/v2/36kr/news.js +56 -0
- package/lib/{routes → v2}/36kr/newsflashes.js +2 -1
- package/lib/v2/36kr/radar.js +37 -0
- package/lib/v2/36kr/router.js +7 -0
- package/lib/{routes → v2}/36kr/search/article.js +3 -2
- package/lib/{routes → v2}/36kr/user.js +2 -1
- package/lib/v2/52hrtt/index.js +57 -0
- package/lib/v2/52hrtt/maintainer.js +4 -0
- package/lib/v2/52hrtt/radar.js +19 -0
- package/lib/v2/52hrtt/router.js +4 -0
- package/lib/v2/52hrtt/symposium.js +57 -0
- package/lib/v2/8kcos/article.js +24 -0
- package/lib/v2/8kcos/cat.js +22 -0
- package/lib/{routes → v2}/8kcos/const.js +0 -0
- package/lib/v2/8kcos/latest.js +23 -0
- package/lib/v2/8kcos/maintainer.js +5 -0
- package/lib/v2/8kcos/radar.js +25 -0
- package/lib/v2/8kcos/router.js +5 -0
- package/lib/v2/8kcos/tag.js +23 -0
- package/lib/{routes → v2}/95mm/category.js +5 -3
- package/lib/v2/95mm/maintainer.js +5 -0
- package/lib/v2/95mm/radar.js +25 -0
- package/lib/v2/95mm/router.js +5 -0
- package/lib/v2/95mm/tab.js +9 -0
- package/lib/v2/95mm/tag.js +9 -0
- package/lib/v2/95mm/templates/description.art +3 -0
- package/lib/v2/95mm/utils.js +59 -0
- package/lib/v2/abskoop/index.js +52 -0
- package/lib/v2/abskoop/maintainer.js +3 -0
- package/lib/v2/abskoop/radar.js +13 -0
- package/lib/v2/abskoop/router.js +3 -0
- package/lib/v2/abskoop/templates/description.art +3 -0
- package/lib/v2/ajmide/index.js +1 -1
- package/lib/v2/app-center/templates/description.art +1 -1
- package/lib/v2/apple/exchange_repair.js +40 -0
- package/lib/v2/apple/maintainer.js +3 -0
- package/lib/v2/apple/radar.js +13 -0
- package/lib/v2/apple/router.js +3 -0
- package/lib/{routes/apple → v2}/appstore/gofans.js +3 -3
- package/lib/{routes/apple → v2}/appstore/in-app-purchase.js +0 -0
- package/lib/v2/appstore/maintainer.js +7 -0
- package/lib/{routes/apple → v2}/appstore/price.js +0 -0
- package/lib/v2/appstore/radar.js +41 -0
- package/lib/v2/appstore/router.js +7 -0
- package/lib/{routes/apple → v2}/appstore/update.js +0 -0
- package/lib/{routes/apple → v2}/appstore/xianmian.js +3 -2
- package/lib/v2/bbcnewslabs/maintainer.js +3 -0
- package/lib/v2/bbcnewslabs/news.js +32 -0
- package/lib/v2/bbcnewslabs/radar.js +13 -0
- package/lib/v2/bbcnewslabs/router.js +3 -0
- package/lib/v2/bigquant/collections.js +35 -0
- package/lib/v2/bigquant/maintainer.js +3 -0
- package/lib/v2/bigquant/radar.js +13 -0
- package/lib/v2/bigquant/router.js +3 -0
- package/lib/{routes → v2}/bilibili/app.js +0 -0
- package/lib/{routes → v2}/bilibili/article.js +1 -0
- package/lib/{routes → v2}/bilibili/audio.js +0 -0
- package/lib/{routes → v2}/bilibili/bangumi.js +0 -0
- package/lib/{routes → v2}/bilibili/blackboard.js +0 -0
- package/lib/{routes → v2}/bilibili/cache.js +17 -0
- package/lib/{routes → v2}/bilibili/coin.js +0 -0
- package/lib/{routes → v2}/bilibili/danmaku.js +0 -0
- package/lib/{routes → v2}/bilibili/dynamic.js +1 -0
- package/lib/{routes → v2}/bilibili/fav.js +0 -0
- package/lib/{routes → v2}/bilibili/followers.js +0 -0
- package/lib/{routes → v2}/bilibili/followings.js +0 -0
- package/lib/{routes → v2}/bilibili/followings_article.js +0 -0
- package/lib/{routes → v2}/bilibili/followings_dynamic.js +0 -0
- package/lib/{routes → v2}/bilibili/followings_video.js +0 -0
- package/lib/{routes → v2}/bilibili/linkNews.js +0 -0
- package/lib/{routes → v2}/bilibili/liveArea.js +0 -0
- package/lib/{routes → v2}/bilibili/liveRoom.js +0 -0
- package/lib/{routes → v2}/bilibili/liveSearch.js +0 -0
- package/lib/{routes → v2}/bilibili/mallIP.js +0 -0
- package/lib/{routes → v2}/bilibili/mallNew.js +0 -0
- package/lib/{routes → v2}/bilibili/manga_followings.js +0 -0
- package/lib/{routes → v2}/bilibili/manga_update.js +0 -0
- package/lib/v2/bilibili/online.js +25 -0
- package/lib/{routes → v2}/bilibili/page.js +0 -0
- package/lib/{routes → v2}/bilibili/partion-ranking.js +0 -0
- package/lib/{routes → v2}/bilibili/partion.js +0 -0
- package/lib/v2/bilibili/radar.js +6 -0
- package/lib/{routes → v2}/bilibili/ranking.js +0 -0
- package/lib/{routes → v2}/bilibili/readlist.js +0 -0
- package/lib/{routes → v2}/bilibili/reply.js +0 -0
- package/lib/v2/bilibili/router.js +39 -0
- package/lib/{routes → v2}/bilibili/topic.js +0 -0
- package/lib/{routes → v2}/bilibili/userChannel.js +0 -0
- package/lib/{routes → v2}/bilibili/userFav.js +0 -0
- package/lib/{routes → v2}/bilibili/user_bangumi.js +0 -0
- package/lib/{routes → v2}/bilibili/utils.js +0 -0
- package/lib/{routes → v2}/bilibili/video.js +3 -1
- package/lib/{routes → v2}/bilibili/vsearch.js +0 -0
- package/lib/{routes → v2}/bilibili/weekly_recommend.js +0 -0
- package/lib/v2/bitbucket/commits.js +40 -0
- package/lib/v2/bitbucket/maintainer.js +4 -0
- package/lib/v2/bitbucket/radar.js +19 -0
- package/lib/v2/bitbucket/router.js +4 -0
- package/lib/v2/bitbucket/tags.js +40 -0
- package/lib/v2/bitmovin/blog.js +33 -0
- package/lib/v2/bitmovin/maintainer.js +3 -0
- package/lib/v2/bitmovin/radar.js +13 -0
- package/lib/v2/bitmovin/router.js +3 -0
- package/lib/{routes/universities → v2}/bjfu/grs.js +0 -0
- package/lib/v2/bjfu/it/index.js +49 -0
- package/lib/v2/bjfu/it/utils.js +64 -0
- package/lib/{routes/universities → v2}/bjfu/jwc/index.js +0 -0
- package/lib/{routes/universities → v2}/bjfu/jwc/utils.js +10 -9
- package/lib/{routes/universities → v2}/bjfu/kjc.js +0 -0
- package/lib/v2/bjfu/maintainer.js +7 -0
- package/lib/{routes/universities → v2}/bjfu/news/index.js +0 -0
- package/lib/{routes/universities → v2}/bjfu/news/utils.js +10 -9
- package/lib/v2/bjfu/radar.js +45 -0
- package/lib/v2/bjfu/router.js +7 -0
- package/lib/{routes → v2}/chaping/banner.js +2 -1
- package/lib/v2/chaping/maintainer.js +5 -0
- package/lib/{routes → v2}/chaping/news.js +3 -2
- package/lib/v2/chaping/newsflash.js +23 -0
- package/lib/v2/chaping/radar.js +31 -0
- package/lib/v2/chaping/router.js +5 -0
- package/lib/v2/dahecube/index.js +66 -0
- package/lib/v2/dahecube/maintainer.js +3 -0
- package/lib/v2/dahecube/radar.js +23 -0
- package/lib/v2/dahecube/router.js +3 -0
- package/lib/v2/dahecube/utils.js +47 -0
- package/lib/v2/dayanzai/index.js +58 -0
- package/lib/v2/dayanzai/maintainer.js +3 -0
- package/lib/v2/dayanzai/radar.js +13 -0
- package/lib/v2/dayanzai/router.js +3 -0
- package/lib/v2/dhu/jiaowu/news.js +37 -0
- package/lib/v2/dhu/maintainer.js +4 -0
- package/lib/v2/dhu/radar.js +17 -0
- package/lib/v2/dhu/router.js +4 -0
- package/lib/v2/dhu/xxgk/news.js +32 -0
- package/lib/v2/douban/people/wish.js +2 -1
- package/lib/{routes → v2}/dtcj/datahero.js +3 -2
- package/lib/v2/dtcj/datainsight.js +53 -0
- package/lib/v2/dtcj/maintainer.js +4 -0
- package/lib/v2/dtcj/radar.js +25 -0
- package/lib/v2/dtcj/router.js +4 -0
- package/lib/v2/eastday/24.js +90 -0
- package/lib/v2/eastday/maintainer.js +2 -0
- package/lib/v2/eastday/radar.js +16 -0
- package/lib/v2/eastday/router.js +2 -0
- package/lib/{routes → v2}/eastday/sh.js +6 -11
- package/lib/v2/eastmoney/radar.js +13 -0
- package/lib/v2/eastmoney/router.js +3 -0
- package/lib/v2/eastmoney/ttjj/user.js +65 -0
- package/lib/v2/ems/apple.js +42 -0
- package/lib/v2/ems/maintainer.js +4 -0
- package/lib/{routes → v2}/ems/news.js +0 -0
- package/lib/v2/ems/radar.js +19 -0
- package/lib/v2/ems/router.js +4 -0
- package/lib/v2/ems/templates/apple.art +6 -0
- package/lib/v2/eprice/rss.js +4 -2
- package/lib/v2/ff14/ff14_global.js +1 -1
- package/lib/{routes → v2}/flyert/creditcard.js +0 -0
- package/lib/v2/flyert/maintainer.js +4 -0
- package/lib/v2/flyert/preferential.js +48 -0
- package/lib/v2/flyert/radar.js +19 -0
- package/lib/v2/flyert/router.js +4 -0
- package/lib/{routes → v2}/flyert/utils.js +2 -1
- package/lib/v2/foresightnews/index.js +88 -0
- package/lib/v2/foresightnews/maintainer.js +6 -0
- package/lib/v2/foresightnews/radar.js +31 -0
- package/lib/v2/foresightnews/router.js +3 -0
- package/lib/v2/gcores/category.js +126 -0
- package/lib/v2/gcores/maintainer.js +4 -0
- package/lib/v2/gcores/radar.js +19 -0
- package/lib/v2/gcores/router.js +4 -0
- package/lib/v2/gcores/tag.js +126 -0
- package/lib/v2/github/comments.js +95 -37
- package/lib/v2/github/follower.js +1 -1
- package/lib/v2/github/maintainer.js +1 -1
- package/lib/v2/github/pulls.js +7 -3
- package/lib/v2/github/radar.js +1 -1
- package/lib/v2/github/router.js +3 -2
- package/lib/v2/github/star.js +1 -1
- package/lib/v2/github/starred_repos.js +1 -1
- package/lib/v2/gitpod/blog.js +52 -0
- package/lib/v2/gitpod/changelog.js +35 -0
- package/lib/v2/gitpod/maintainer.js +4 -0
- package/lib/v2/gitpod/radar.js +19 -0
- package/lib/v2/gitpod/router.js +4 -0
- package/lib/v2/gitpod/templates/description.art +2 -0
- package/lib/v2/gitpod/utils.js +3 -0
- package/lib/v2/google/maintainer.js +1 -0
- package/lib/v2/google/router.js +1 -0
- package/lib/v2/google/sitesRecentChanges.js +52 -0
- package/lib/v2/gov/maintainer.js +10 -0
- package/lib/v2/gov/mee/ywdt.js +80 -0
- package/lib/v2/gov/miit/wjfb.js +61 -0
- package/lib/{routes → v2}/gov/miit/wjgs.js +0 -0
- package/lib/v2/gov/miit/yjzj.js +59 -0
- package/lib/{routes → v2}/gov/miit/zcjd.js +0 -0
- package/lib/{routes → v2}/gov/miit/zcwj.js +0 -0
- package/lib/{routes → v2/gov}/pbc/goutongjiaoliu.js +5 -4
- package/lib/v2/gov/pbc/gzlw.js +27 -0
- package/lib/{routes → v2/gov}/pbc/tradeAnnouncement.js +5 -4
- package/lib/v2/gov/pbc/utils.js +20 -0
- package/lib/v2/gov/pbc/zcyj.js +29 -0
- package/lib/v2/gov/radar.js +57 -0
- package/lib/v2/gov/router.js +10 -0
- package/lib/{routes → v2}/guancha/headline.js +11 -8
- package/lib/{routes → v2}/guancha/index.js +55 -28
- package/lib/v2/guancha/maintainer.js +7 -0
- package/lib/{routes → v2}/guancha/member.js +30 -15
- package/lib/{routes → v2}/guancha/personalpage.js +0 -0
- package/lib/v2/guancha/radar.js +49 -0
- package/lib/v2/guancha/router.js +7 -0
- package/lib/{routes → v2}/guancha/topic.js +14 -13
- package/lib/v2/hdu/cs/index.js +57 -0
- package/lib/v2/hdu/maintainer.js +3 -0
- package/lib/v2/hdu/radar.js +13 -0
- package/lib/v2/hdu/router.js +4 -0
- package/lib/v2/hellobtc/information.js +51 -0
- package/lib/v2/hellobtc/kepu.js +64 -0
- package/lib/v2/hellobtc/maintainer.js +6 -0
- package/lib/v2/hellobtc/news.js +29 -0
- package/lib/v2/hellobtc/radar.js +85 -0
- package/lib/v2/hellobtc/router.js +6 -0
- package/lib/v2/hellobtc/topic.js +43 -0
- package/lib/v2/hellogithub/article.js +47 -0
- package/lib/v2/hellogithub/maintainer.js +5 -0
- package/lib/v2/hellogithub/month.js +42 -0
- package/lib/v2/hellogithub/radar.js +25 -0
- package/lib/v2/hellogithub/ranking.js +39 -0
- package/lib/v2/hellogithub/router.js +5 -0
- package/lib/v2/ielts/index.js +58 -0
- package/lib/v2/ielts/maintainer.js +3 -0
- package/lib/v2/ielts/radar.js +13 -0
- package/lib/v2/ielts/router.js +3 -0
- package/lib/v2/ithome/index.js +1 -0
- package/lib/v2/ixigua/maintainer.js +3 -0
- package/lib/v2/ixigua/radar.js +13 -0
- package/lib/v2/ixigua/router.js +3 -0
- package/lib/v2/ixigua/templates/userVideo.art +5 -0
- package/lib/v2/ixigua/userVideo.js +40 -0
- package/lib/v2/javbus/index.js +153 -0
- package/lib/v2/javbus/maintainer.js +18 -0
- package/lib/v2/javbus/radar.js +113 -0
- package/lib/v2/javbus/router.js +3 -0
- package/lib/v2/javbus/templates/description.art +18 -0
- package/lib/v2/javlibrary/utils.js +1 -1
- package/lib/v2/kbs/maintainer.js +4 -0
- package/lib/v2/kbs/news.js +67 -0
- package/lib/v2/kbs/radar.js +19 -0
- package/lib/v2/kbs/router.js +4 -0
- package/lib/{routes → v2}/kbs/today.js +1 -1
- package/lib/v2/liulinblog/itnews.js +23 -0
- package/lib/v2/liulinblog/kuaixun.js +17 -0
- package/lib/v2/liulinblog/maintainer.js +4 -0
- package/lib/v2/liulinblog/radar.js +33 -0
- package/lib/v2/liulinblog/router.js +4 -0
- package/lib/v2/liulinblog/utils.js +39 -0
- package/lib/v2/lofter/maintainer.js +4 -0
- package/lib/v2/lofter/radar.js +17 -0
- package/lib/v2/lofter/router.js +4 -0
- package/lib/{routes → v2}/lofter/tag.js +4 -4
- package/lib/v2/lofter/user.js +52 -0
- package/lib/v2/lvv2/maintainer.js +4 -0
- package/lib/v2/lvv2/news.js +75 -0
- package/lib/v2/lvv2/radar.js +79 -0
- package/lib/v2/lvv2/router.js +4 -0
- package/lib/v2/lvv2/templates/outlink.art +1 -0
- package/lib/v2/lvv2/top.js +77 -0
- package/lib/v2/nbd/article.js +50 -0
- package/lib/{routes → v2}/nbd/index.js +8 -5
- package/lib/v2/nbd/maintainer.js +4 -0
- package/lib/v2/nbd/radar.js +19 -0
- package/lib/v2/nbd/router.js +4 -0
- package/lib/v2/nikkei-cn/index.js +10 -5
- package/lib/v2/njnu/ceai/ceai.js +44 -0
- package/lib/v2/njnu/ceai/utils.js +55 -0
- package/lib/v2/njnu/jwc/jwc.js +43 -0
- package/lib/v2/njnu/jwc/utils.js +59 -0
- package/lib/v2/njnu/maintainer.js +4 -0
- package/lib/v2/njnu/radar.js +21 -0
- package/lib/v2/njnu/router.js +4 -0
- package/lib/v2/njupt/jwc.js +90 -0
- package/lib/v2/njupt/maintainer.js +3 -0
- package/lib/v2/njupt/radar.js +20 -0
- package/lib/v2/njupt/router.js +3 -0
- package/lib/v2/nltimes/maintainer.js +3 -0
- package/lib/v2/nltimes/news.js +89 -0
- package/lib/v2/nltimes/radar.js +19 -0
- package/lib/v2/nltimes/router.js +3 -0
- package/lib/{routes → v2}/nowcoder/discuss.js +17 -22
- package/lib/v2/nowcoder/experience.js +48 -0
- package/lib/{routes → v2}/nowcoder/jobcenter.js +0 -0
- package/lib/v2/nowcoder/maintainer.js +7 -0
- package/lib/v2/nowcoder/radar.js +40 -0
- package/lib/{routes → v2}/nowcoder/recommend.js +1 -1
- package/lib/v2/nowcoder/router.js +7 -0
- package/lib/{routes → v2}/nowcoder/schedule.js +4 -3
- package/lib/v2/ntdtv/channel.js +44 -0
- package/lib/v2/ntdtv/maintainer.js +3 -0
- package/lib/v2/ntdtv/radar.js +13 -0
- package/lib/v2/ntdtv/router.js +3 -0
- package/lib/v2/odaily/post.js +10 -8
- package/lib/v2/oilchem/index.js +67 -0
- package/lib/v2/oilchem/maintainer.js +3 -0
- package/lib/v2/oilchem/radar.js +11 -0
- package/lib/v2/oilchem/router.js +3 -0
- package/lib/v2/oilchem/routes.js +671 -0
- package/lib/v2/picuki/maintainer.js +3 -0
- package/lib/v2/picuki/profile.js +167 -0
- package/lib/v2/picuki/radar.js +13 -0
- package/lib/v2/picuki/router.js +3 -0
- package/lib/v2/picuki/templates/post.art +7 -0
- package/lib/v2/qq88/index.js +60 -0
- package/lib/v2/qq88/maintainer.js +3 -0
- package/lib/v2/qq88/radar.js +13 -0
- package/lib/v2/qq88/router.js +3 -0
- package/lib/v2/readhub/index.js +106 -0
- package/lib/v2/readhub/maintainer.js +3 -0
- package/lib/v2/readhub/radar.js +13 -0
- package/lib/v2/readhub/router.js +6 -0
- package/lib/{routes → v2}/rfa/index.js +11 -6
- package/lib/v2/rfa/maintainer.js +3 -0
- package/lib/v2/rfa/radar.js +13 -0
- package/lib/v2/rfa/router.js +3 -0
- package/lib/v2/segmentfault/channel.js +46 -0
- package/lib/v2/segmentfault/maintainer.js +4 -0
- package/lib/v2/segmentfault/radar.js +19 -0
- package/lib/v2/segmentfault/router.js +4 -0
- package/lib/v2/segmentfault/user.js +43 -0
- package/lib/v2/shmeea/maintainer.js +1 -0
- package/lib/v2/shmeea/radar.js +6 -0
- package/lib/v2/shmeea/router.js +2 -1
- package/lib/v2/shmeea/self-study.js +61 -0
- package/lib/v2/sohu/maintainer.js +3 -0
- package/lib/{routes → v2}/sohu/mp.js +9 -8
- package/lib/v2/sohu/radar.js +13 -0
- package/lib/v2/sohu/router.js +3 -0
- package/lib/v2/soundofhope/channel.js +42 -0
- package/lib/v2/soundofhope/maintainer.js +3 -0
- package/lib/v2/soundofhope/radar.js +13 -0
- package/lib/v2/soundofhope/router.js +3 -0
- package/lib/v2/sputniknews/index.js +93 -0
- package/lib/v2/sputniknews/maintainer.js +3 -0
- package/lib/v2/sputniknews/radar.js +13 -0
- package/lib/v2/sputniknews/router.js +3 -0
- package/lib/{routes/universities/sysu/sdcs.js → v2/sysu/cse.js} +3 -3
- package/lib/v2/sysu/maintainer.js +3 -0
- package/lib/v2/sysu/radar.js +13 -0
- package/lib/v2/sysu/router.js +3 -0
- package/lib/v2/telegram/channel.js +446 -112
- package/lib/v2/telegram/maintainer.js +1 -1
- package/lib/v2/telegram/router.js +1 -1
- package/lib/v2/telegram/templates/video.art +3 -1
- package/lib/v2/tencent/maintainer.js +3 -0
- package/lib/v2/tencent/qq/sdk/changelog.js +56 -0
- package/lib/v2/tencent/radar.js +56 -0
- package/lib/v2/tencent/router.js +3 -0
- package/lib/v2/test/index.js +1 -0
- package/lib/v2/tokeninsight/blog.js +52 -0
- package/lib/v2/tokeninsight/bulletin.js +44 -0
- package/lib/v2/tokeninsight/maintainer.js +5 -0
- package/lib/v2/tokeninsight/radar.js +25 -0
- package/lib/v2/tokeninsight/report.js +52 -0
- package/lib/v2/tokeninsight/router.js +5 -0
- package/lib/v2/txrjy/fornumtopic.js +72 -0
- package/lib/v2/txrjy/maintainer.js +3 -0
- package/lib/v2/txrjy/radar.js +17 -0
- package/lib/v2/txrjy/router.js +3 -0
- package/lib/v2/txrjy/templates/fornumtopic.art +6 -0
- package/lib/v2/wallstreetcn/live.js +18 -15
- package/lib/v2/wallstreetcn/router.js +1 -1
- package/lib/v2/wfu/jwc.js +54 -0
- package/lib/v2/wfu/maintainer.js +4 -0
- package/lib/v2/wfu/news.js +96 -0
- package/lib/v2/wfu/radar.js +21 -0
- package/lib/v2/wfu/router.js +4 -0
- package/lib/v2/whitehouse/maintainer.js +1 -0
- package/lib/v2/whitehouse/ostp.js +50 -0
- package/lib/v2/whitehouse/radar.js +6 -0
- package/lib/v2/whitehouse/router.js +1 -0
- package/lib/v2/who/maintainer.js +5 -0
- package/lib/v2/who/news-room.js +76 -0
- package/lib/{routes → v2}/who/news.js +1 -1
- package/lib/v2/who/radar.js +25 -0
- package/lib/v2/who/router.js +5 -0
- package/lib/{routes → v2}/who/speeches.js +0 -0
- package/lib/v2/wikinews/index.js +43 -0
- package/lib/v2/wikinews/maintainer.js +3 -0
- package/lib/v2/wikinews/radar.js +13 -0
- package/lib/v2/wikinews/router.js +4 -0
- package/lib/v2/wp-china/maintainer.js +3 -0
- package/lib/v2/wp-china/news.js +57 -0
- package/lib/v2/wp-china/radar.js +13 -0
- package/lib/v2/wp-china/router.js +3 -0
- package/lib/{routes → v2}/wsj/index.js +6 -4
- package/lib/v2/wsj/maintainer.js +3 -0
- package/lib/v2/wsj/radar.js +21 -0
- package/lib/v2/wsj/router.js +3 -0
- package/lib/v2/xiaoyuzhou/maintainer.js +1 -1
- package/lib/v2/xiaoyuzhou/pickup.js +2 -2
- package/lib/v2/xiaoyuzhou/podcast.js +2 -2
- package/lib/v2/xmanhua/index.js +74 -0
- package/lib/v2/xmanhua/radar.js +13 -0
- package/lib/v2/xmanhua/router.js +3 -0
- package/lib/{routes → v2}/zhibo8/forum.js +8 -16
- package/lib/v2/zhibo8/maintainer.js +5 -0
- package/lib/v2/zhibo8/more.js +82 -0
- package/lib/{routes → v2}/zhibo8/post.js +1 -1
- package/lib/v2/zhibo8/radar.js +27 -0
- package/lib/v2/zhibo8/router.js +5 -0
- package/lib/views/error.art +4 -4
- package/lib/views/rss.art +5 -4
- package/package.json +17 -16
- package/lib/routes/36kr/news.js +0 -94
- package/lib/routes/8kcos/article.js +0 -17
- package/lib/routes/8kcos/cat.js +0 -28
- package/lib/routes/8kcos/latest.js +0 -27
- package/lib/routes/95mm/tab.js +0 -9
- package/lib/routes/95mm/tag.js +0 -7
- package/lib/routes/95mm/utils.js +0 -51
- package/lib/routes/apple/exchange_repair.js +0 -47
- package/lib/routes/eastmoney/user.js +0 -30
- package/lib/routes/flyert/preferential.js +0 -33
- package/lib/routes/gcores/category.js +0 -127
- package/lib/routes/gov/mee/gs.js +0 -54
- package/lib/routes/ixigua/userVideo.js +0 -35
- package/lib/routes/javbus/genre.js +0 -7
- package/lib/routes/javbus/home.js +0 -3
- package/lib/routes/javbus/series.js +0 -7
- package/lib/routes/javbus/star.js +0 -7
- package/lib/routes/javbus/uncensored/genre.js +0 -6
- package/lib/routes/javbus/uncensored/home.js +0 -3
- package/lib/routes/javbus/uncensored/series.js +0 -7
- package/lib/routes/javbus/uncensored/star.js +0 -7
- package/lib/routes/javbus/util.js +0 -211
- package/lib/routes/javbus/western/genre.js +0 -7
- package/lib/routes/javbus/western/home.js +0 -3
- package/lib/routes/javbus/western/series.js +0 -7
- package/lib/routes/javbus/western/star.js +0 -7
- package/lib/routes/lofter/posts.js +0 -54
- package/lib/routes/nbd/article.js +0 -60
- package/lib/routes/picuki/profile.js +0 -90
- package/lib/routes/readhub/category.js +0 -102
- package/lib/routes/segmentfault/channel.js +0 -90
- package/lib/routes/segmentfault/user.js +0 -90
- package/lib/routes/universities/njupt/jwc.js +0 -84
- package/lib/routes/who/news-room.js +0 -56
- package/lib/routes/zhibo8/more.js +0 -45
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
4
|
+
|
|
5
|
+
const rootUrl = 'https://www.miit.gov.cn';
|
|
6
|
+
|
|
7
|
+
module.exports = async (ctx) => {
|
|
8
|
+
const url = `${rootUrl}/gzcy/yjzj/index.html`;
|
|
9
|
+
|
|
10
|
+
const cookieResponse = await got(url);
|
|
11
|
+
const cookie = cookieResponse.headers['set-cookie'][0].split(';')[0];
|
|
12
|
+
const indexContent = cheerio.load(cookieResponse.data);
|
|
13
|
+
const dataRequestUrl = indexContent('div.clist_con > script:nth-child(2)')
|
|
14
|
+
.map((_, item) => ({
|
|
15
|
+
url: `${rootUrl}${indexContent(item).attr('url')}`,
|
|
16
|
+
queryData: JSON.parse(indexContent(item).attr('querydata').replace(/"/g, '|').replace(/'/g, '"').replace(/\|/g, '"')),
|
|
17
|
+
}))
|
|
18
|
+
.get()[0];
|
|
19
|
+
|
|
20
|
+
const dataUrl = `${dataRequestUrl.url}?${Object.keys(dataRequestUrl.queryData)
|
|
21
|
+
.map((key) => `${key}=${dataRequestUrl.queryData[key]}`)
|
|
22
|
+
.join('&')}`;
|
|
23
|
+
const response = await got({
|
|
24
|
+
method: 'get',
|
|
25
|
+
url: dataUrl,
|
|
26
|
+
headers: {
|
|
27
|
+
Cookie: cookie,
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
const $ = cheerio.load(response.data.data.html);
|
|
31
|
+
const list = $('ul > li')
|
|
32
|
+
.map((_, item) => ({
|
|
33
|
+
title: $(item).find('a').text(),
|
|
34
|
+
link: new URL($(item).find('a').attr('href'), rootUrl).href,
|
|
35
|
+
pubDate: parseDate($(item).find('span').text(), 'YYYY-MM-DD'),
|
|
36
|
+
}))
|
|
37
|
+
.get();
|
|
38
|
+
|
|
39
|
+
const items = await Promise.all(
|
|
40
|
+
list.map((item) =>
|
|
41
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
42
|
+
const detailResponse = await got(item.link);
|
|
43
|
+
const content = cheerio.load(detailResponse.data);
|
|
44
|
+
|
|
45
|
+
item.description = content('#con_con')
|
|
46
|
+
.html()
|
|
47
|
+
.replace(/(<iframe.*?src=")(.*?)(".*?>)/g, '$1' + rootUrl + '$2' + '$3');
|
|
48
|
+
|
|
49
|
+
return item;
|
|
50
|
+
})
|
|
51
|
+
)
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
ctx.state.data = {
|
|
55
|
+
title: `工业和信息化部 - 意见征集`,
|
|
56
|
+
link: url,
|
|
57
|
+
item: items,
|
|
58
|
+
};
|
|
59
|
+
};
|
|
File without changes
|
|
File without changes
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
const url = require('url');
|
|
2
1
|
const cheerio = require('cheerio');
|
|
2
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
3
|
+
const timezone = require('@/utils/timezone');
|
|
3
4
|
|
|
4
5
|
module.exports = async (ctx) => {
|
|
5
|
-
const link =
|
|
6
|
+
const link = 'http://www.pbc.gov.cn/goutongjiaoliu/113456/113469/index.html';
|
|
6
7
|
|
|
7
8
|
const browser = await require('@/utils/puppeteer')();
|
|
8
9
|
const page = await browser.newPage();
|
|
@@ -19,8 +20,7 @@ module.exports = async (ctx) => {
|
|
|
19
20
|
const a = item.find('a[title]');
|
|
20
21
|
return {
|
|
21
22
|
title: a.text(),
|
|
22
|
-
link:
|
|
23
|
-
pubDate: new Date(item.next('span.hui12').text()).toUTCString(),
|
|
23
|
+
link: new URL(a.attr('href'), 'http://www.pbc.gov.cn'),
|
|
24
24
|
};
|
|
25
25
|
})
|
|
26
26
|
.get();
|
|
@@ -37,6 +37,7 @@ module.exports = async (ctx) => {
|
|
|
37
37
|
);
|
|
38
38
|
const content = cheerio.load(detailHtml);
|
|
39
39
|
item.description = content('#zoom').html();
|
|
40
|
+
item.pubDate = timezone(parseDate(content('.hui12').eq(5).text()), +8);
|
|
40
41
|
return item;
|
|
41
42
|
})
|
|
42
43
|
)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const { processItems } = require('./utils');
|
|
2
|
+
const got = require('@/utils/got');
|
|
3
|
+
const cheerio = require('cheerio');
|
|
4
|
+
|
|
5
|
+
const host = 'http://www.pbc.gov.cn';
|
|
6
|
+
|
|
7
|
+
module.exports = async (ctx) => {
|
|
8
|
+
const url = `${host}/redianzhuanti/118742/4122386/4122692/index.html`;
|
|
9
|
+
|
|
10
|
+
const response = await got.post(url);
|
|
11
|
+
const $ = cheerio.load(response.data);
|
|
12
|
+
const list = $('li.clearfix')
|
|
13
|
+
.map((_index, item) => ({
|
|
14
|
+
title: $(item).find('a').text(),
|
|
15
|
+
link: new URL($(item).find('a').attr('href'), host).href,
|
|
16
|
+
author: $(item).find('span.fr').text().replace(/…/g, ''),
|
|
17
|
+
}))
|
|
18
|
+
.get();
|
|
19
|
+
|
|
20
|
+
const items = await processItems(list, ctx);
|
|
21
|
+
|
|
22
|
+
ctx.state.data = {
|
|
23
|
+
title: '中国人民银行 工作论文',
|
|
24
|
+
link: url,
|
|
25
|
+
item: items,
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
const url = require('url');
|
|
2
1
|
const cheerio = require('cheerio');
|
|
2
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
3
|
+
const timezone = require('@/utils/timezone');
|
|
3
4
|
|
|
4
5
|
module.exports = async (ctx) => {
|
|
5
|
-
const link =
|
|
6
|
+
const link = 'http://www.pbc.gov.cn/zhengcehuobisi/125207/125213/125431/125475/index.html';
|
|
6
7
|
|
|
7
8
|
const browser = await require('@/utils/puppeteer')();
|
|
8
9
|
const page = await browser.newPage();
|
|
@@ -19,8 +20,7 @@ module.exports = async (ctx) => {
|
|
|
19
20
|
const a = item.find('a[title]');
|
|
20
21
|
return {
|
|
21
22
|
title: a.text(),
|
|
22
|
-
link:
|
|
23
|
-
pubDate: new Date(item.next('span.hui12').text()).toUTCString(),
|
|
23
|
+
link: new URL(a.attr('href'), 'http://www.pbc.gov.cn'),
|
|
24
24
|
};
|
|
25
25
|
})
|
|
26
26
|
.get();
|
|
@@ -37,6 +37,7 @@ module.exports = async (ctx) => {
|
|
|
37
37
|
);
|
|
38
38
|
const content = cheerio.load(detailHtml);
|
|
39
39
|
item.description = content('#zoom').html();
|
|
40
|
+
item.pubDate = timezone(parseDate(content('#shijian').text()), +8);
|
|
40
41
|
return item;
|
|
41
42
|
})
|
|
42
43
|
)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
|
|
4
|
+
const processItems = async (list, ctx) =>
|
|
5
|
+
await Promise.all(
|
|
6
|
+
list.map((item) =>
|
|
7
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
8
|
+
const detailResponse = await got.post(item.link);
|
|
9
|
+
const content = cheerio.load(detailResponse.data);
|
|
10
|
+
|
|
11
|
+
item.description = content('div.xxy_text').html();
|
|
12
|
+
|
|
13
|
+
return item;
|
|
14
|
+
})
|
|
15
|
+
)
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
module.exports = {
|
|
19
|
+
processItems,
|
|
20
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const { processItems } = require('./utils');
|
|
2
|
+
const got = require('@/utils/got');
|
|
3
|
+
const cheerio = require('cheerio');
|
|
4
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
5
|
+
const timezone = require('@/utils/timezone');
|
|
6
|
+
|
|
7
|
+
const host = 'http://www.pbc.gov.cn';
|
|
8
|
+
|
|
9
|
+
module.exports = async (ctx) => {
|
|
10
|
+
const url = `${host}/redianzhuanti/118742/4122386/4122510/index.html`;
|
|
11
|
+
|
|
12
|
+
const response = await got.post(url);
|
|
13
|
+
const $ = cheerio.load(response.data);
|
|
14
|
+
const list = $('li.clearfix')
|
|
15
|
+
.map((_index, item) => ({
|
|
16
|
+
title: $(item).find('a').text(),
|
|
17
|
+
link: new URL($(item).find('a').attr('href'), host).href,
|
|
18
|
+
pubDate: timezone(parseDate($(item).find('span.fr').text(), 'YYYY-MM-DD'), +8),
|
|
19
|
+
}))
|
|
20
|
+
.get();
|
|
21
|
+
|
|
22
|
+
const items = await processItems(list, ctx);
|
|
23
|
+
|
|
24
|
+
ctx.state.data = {
|
|
25
|
+
title: '中国人民银行 政策研究',
|
|
26
|
+
link: url,
|
|
27
|
+
item: items,
|
|
28
|
+
};
|
|
29
|
+
};
|
package/lib/v2/gov/radar.js
CHANGED
|
@@ -376,4 +376,61 @@ module.exports = {
|
|
|
376
376
|
},
|
|
377
377
|
],
|
|
378
378
|
},
|
|
379
|
+
'miit.gov.cn': {
|
|
380
|
+
_name: '工业和信息化部',
|
|
381
|
+
'.': [
|
|
382
|
+
{
|
|
383
|
+
title: '部门 文件发布',
|
|
384
|
+
docs: 'https://docs.rsshub.app/government.html#zhong-guo-gong-ye-he-xin-xi-hua-bu',
|
|
385
|
+
source: ['/jgsj/:ministry/wjfb/index.html'],
|
|
386
|
+
target: '/miit/wjfb/:ministry',
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
title: '征集意见',
|
|
390
|
+
docs: 'https://docs.rsshub.app/government.html#zhong-guo-gong-ye-he-xin-xi-hua-bu',
|
|
391
|
+
source: ['/gzcy/yjzj/index.html'],
|
|
392
|
+
target: '/miit/yjzj',
|
|
393
|
+
},
|
|
394
|
+
],
|
|
395
|
+
},
|
|
396
|
+
'mee.gov.cn': {
|
|
397
|
+
_name: '生态环境部',
|
|
398
|
+
www: [
|
|
399
|
+
{
|
|
400
|
+
title: '要闻动态',
|
|
401
|
+
docs: 'https://docs.rsshub.app/government.html#zhong-hua-ren-min-gong-he-guo-sheng-tai-huan-jing-bu',
|
|
402
|
+
source: ['/ywdt/:category'],
|
|
403
|
+
target: '/gov/mee/ywdt/:category',
|
|
404
|
+
},
|
|
405
|
+
],
|
|
406
|
+
},
|
|
407
|
+
'pbc.gov.cn': {
|
|
408
|
+
_name: '中国人民银行',
|
|
409
|
+
'.': [
|
|
410
|
+
{
|
|
411
|
+
title: '沟通交流',
|
|
412
|
+
docs: 'https://docs.rsshub.app/finance.html#zhong-guo-ren-min-yin-xing',
|
|
413
|
+
source: ['/goutongjiaoliu/113456/113469/index.html'],
|
|
414
|
+
target: '/gov/pbc/goutongjiaoliu',
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
title: '货币政策司公开市场交易公告',
|
|
418
|
+
docs: 'https://docs.rsshub.app/finance.html#zhong-guo-ren-min-yin-xing',
|
|
419
|
+
source: ['/zhengcehuobisi/125207/125213/125431/125475/index.html'],
|
|
420
|
+
target: '/gov/pbc/zhengcehuobisi',
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
title: '政策研究',
|
|
424
|
+
docs: 'https://docs.rsshub.app/finance.html#zhong-guo-ren-min-yin-xing',
|
|
425
|
+
source: ['/redianzhuanti/118742/4122386/4122510/index.html'],
|
|
426
|
+
target: '/gov/pbc/zcyj',
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
title: '工作论文',
|
|
430
|
+
docs: 'https://docs.rsshub.app/finance.html#zhong-guo-ren-min-yin-xing',
|
|
431
|
+
source: ['/redianzhuanti/118742/4122386/4122692/index.html'],
|
|
432
|
+
target: '/gov/pbc/gzlw',
|
|
433
|
+
},
|
|
434
|
+
],
|
|
435
|
+
},
|
|
379
436
|
};
|
package/lib/v2/gov/router.js
CHANGED
|
@@ -8,4 +8,14 @@ module.exports = function (router) {
|
|
|
8
8
|
router.get('/guangdong/tqyb/sncsyjxh', require('./guangdong/tqyb/sncsyjxh'));
|
|
9
9
|
router.get('/huizhou/zwgk/:category?', require('./huizhou/zwgk/index'));
|
|
10
10
|
router.get('/sichuan/deyang/govpulicinfo/:countyName/:institutionName?', require('./sichuan/deyang/govpulicinfo'));
|
|
11
|
+
router.get('/miit/wjfb/:ministry', require('./miit/wjfb'));
|
|
12
|
+
router.get('/miit/yjzj', require('./miit/yjzj'));
|
|
13
|
+
router.get('/miit/zcwj', require('./miit/zcwj'));
|
|
14
|
+
router.get('/miit/wjgs', require('./miit/wjgs'));
|
|
15
|
+
router.get('/miit/zcjd', require('./miit/zcjd'));
|
|
16
|
+
router.get('/mee/ywdt/:category?', require('./mee/ywdt'));
|
|
17
|
+
router.get('/pbc/goutongjiaoliu', require('./pbc/goutongjiaoliu'));
|
|
18
|
+
router.get('/pbc/tradeAnnouncement', require('./pbc/tradeAnnouncement'));
|
|
19
|
+
router.get('/pbc/gzlw', require('./pbc/gzlw'));
|
|
20
|
+
router.get('/pbc/zcyj', require('./pbc/zcyj'));
|
|
11
21
|
};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
const got = require('@/utils/got');
|
|
2
2
|
const cheerio = require('cheerio');
|
|
3
|
+
const timezone = require('@/utils/timezone');
|
|
4
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
3
5
|
|
|
4
6
|
module.exports = async (ctx) => {
|
|
5
7
|
const rootUrl = 'https://www.guancha.cn';
|
|
6
8
|
const currentUrl = `${rootUrl}/GuanChaZheTouTiao/list_1.shtml`;
|
|
9
|
+
|
|
7
10
|
const response = await got({
|
|
8
11
|
method: 'get',
|
|
9
12
|
url: currentUrl,
|
|
@@ -11,20 +14,20 @@ module.exports = async (ctx) => {
|
|
|
11
14
|
|
|
12
15
|
const $ = cheerio.load(response.data);
|
|
13
16
|
|
|
14
|
-
|
|
15
|
-
.
|
|
17
|
+
let items = $('.headline-list li .content-headline h3 a')
|
|
18
|
+
.toArray()
|
|
19
|
+
.map((item) => {
|
|
16
20
|
item = $(item);
|
|
17
21
|
return {
|
|
18
22
|
title: item.text(),
|
|
19
|
-
link: `${rootUrl}${item.attr('href')}`,
|
|
20
23
|
description: item.parent().next().html(),
|
|
21
|
-
|
|
24
|
+
link: `${rootUrl}${item.attr('href').replace(/\.shtml$/, '_s.shtml')}`,
|
|
25
|
+
pubDate: timezone(parseDate(item.parents('div').first().find('span').text()), +8),
|
|
22
26
|
};
|
|
23
|
-
})
|
|
24
|
-
.get();
|
|
27
|
+
});
|
|
25
28
|
|
|
26
|
-
|
|
27
|
-
|
|
29
|
+
items = await Promise.all(
|
|
30
|
+
items.map((item) =>
|
|
28
31
|
ctx.cache.tryGet(item.link, async () => {
|
|
29
32
|
const detailResponse = await got({
|
|
30
33
|
method: 'get',
|
|
@@ -1,21 +1,42 @@
|
|
|
1
1
|
const got = require('@/utils/got');
|
|
2
2
|
const cheerio = require('cheerio');
|
|
3
|
-
const
|
|
3
|
+
const timezone = require('@/utils/timezone');
|
|
4
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
5
|
+
const { parseRelativeDate } = require('@/utils/parse-date');
|
|
4
6
|
|
|
5
7
|
const config = {
|
|
6
|
-
review: {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
review: {
|
|
9
|
+
title: '评论 & 研究',
|
|
10
|
+
query: '.module-news-main',
|
|
11
|
+
},
|
|
12
|
+
story: {
|
|
13
|
+
title: '要闻',
|
|
14
|
+
query: '.img-List',
|
|
15
|
+
},
|
|
16
|
+
fengwen: {
|
|
17
|
+
title: '风闻',
|
|
18
|
+
query: '.fengwen-list',
|
|
19
|
+
},
|
|
20
|
+
redian: {
|
|
21
|
+
title: '热点',
|
|
22
|
+
},
|
|
23
|
+
gundong: {
|
|
24
|
+
title: '滚动',
|
|
25
|
+
},
|
|
26
|
+
all: {
|
|
27
|
+
title: '全部',
|
|
28
|
+
},
|
|
29
|
+
home: {
|
|
30
|
+
title: '首页',
|
|
31
|
+
},
|
|
32
|
+
others: {
|
|
33
|
+
title: '热点 & 滚动',
|
|
34
|
+
},
|
|
14
35
|
};
|
|
15
36
|
|
|
16
37
|
module.exports = async (ctx) => {
|
|
17
38
|
const total = 10;
|
|
18
|
-
const
|
|
39
|
+
const category = ctx.params.category ?? 'all';
|
|
19
40
|
const rootUrl = 'https://www.guancha.cn';
|
|
20
41
|
|
|
21
42
|
let newsList = [],
|
|
@@ -24,7 +45,7 @@ module.exports = async (ctx) => {
|
|
|
24
45
|
|
|
25
46
|
// 'review', 'story' and 'fengwen' come from homepage.
|
|
26
47
|
|
|
27
|
-
if (
|
|
48
|
+
if (category === 'review' || category === 'story' || category === 'fengwen' || category === 'all' || category === 'home') {
|
|
28
49
|
const response = await got({
|
|
29
50
|
method: 'get',
|
|
30
51
|
url: rootUrl,
|
|
@@ -35,54 +56,59 @@ module.exports = async (ctx) => {
|
|
|
35
56
|
const fetchPost = (slice) =>
|
|
36
57
|
slice
|
|
37
58
|
.find('h4.module-title a')
|
|
59
|
+
.toArray()
|
|
38
60
|
|
|
39
61
|
// Filter some blank links which lead to no contents but 'https://user.guancha.cn'.
|
|
40
62
|
|
|
41
|
-
.filter((
|
|
42
|
-
.map((
|
|
63
|
+
.filter((item) => $(item).attr('href') !== 'https://user.guancha.cn')
|
|
64
|
+
.map((item) => {
|
|
43
65
|
item = $(item);
|
|
66
|
+
|
|
44
67
|
const link = item.attr('href');
|
|
68
|
+
|
|
45
69
|
return {
|
|
46
70
|
title: item.text(),
|
|
47
|
-
link:
|
|
71
|
+
link: `${link.indexOf('http') === 0 ? '' : rootUrl}${link.replace(/\.shtml/, '_s.shtml')}`,
|
|
48
72
|
};
|
|
49
|
-
})
|
|
50
|
-
.get();
|
|
73
|
+
});
|
|
51
74
|
|
|
52
|
-
if (
|
|
75
|
+
if (category === 'all' || category === 'home') {
|
|
53
76
|
newsList = fetchPost($(config.review.query))
|
|
54
77
|
.slice(0, total / 3)
|
|
55
78
|
.concat(fetchPost($(config.story.query)).slice(0, total / 3), fetchPost($(config.fengwen.query)).slice(0, total / 3));
|
|
56
79
|
} else {
|
|
57
|
-
newsList = fetchPost($(config[
|
|
80
|
+
newsList = fetchPost($(config[category].query)).slice(0, total);
|
|
58
81
|
}
|
|
59
82
|
}
|
|
60
83
|
|
|
61
84
|
// 'redian' and 'gundong' come from api.
|
|
62
85
|
|
|
63
|
-
if (
|
|
86
|
+
if (category === 'redian' || category === 'all' || category === 'others') {
|
|
64
87
|
const response = await got({
|
|
65
88
|
method: 'get',
|
|
66
89
|
url: `${rootUrl}/api/redian.htm`,
|
|
67
90
|
});
|
|
91
|
+
|
|
68
92
|
redianList = response.data.items
|
|
69
93
|
.map((item) => ({
|
|
70
94
|
title: item.TITLE,
|
|
71
|
-
link: `${rootUrl}${item.HTTP_URL}`,
|
|
95
|
+
link: `${rootUrl}${item.HTTP_URL.replace(/\.shtml/, '_s.shtml')}`,
|
|
72
96
|
}))
|
|
73
|
-
.slice(0,
|
|
97
|
+
.slice(0, category === 'all' ? total / 3 : total);
|
|
74
98
|
}
|
|
75
|
-
|
|
99
|
+
|
|
100
|
+
if (category === 'gundong' || category === 'all' || category === 'others') {
|
|
76
101
|
const response = await got({
|
|
77
102
|
method: 'get',
|
|
78
103
|
url: `${rootUrl}/api/gundong.htm`,
|
|
79
104
|
});
|
|
105
|
+
|
|
80
106
|
gundongList = response.data.items
|
|
81
107
|
.map((item) => ({
|
|
82
108
|
title: item.TITLE,
|
|
83
|
-
link: `${rootUrl}${item.HTTP_URL}`,
|
|
109
|
+
link: `${rootUrl}${item.HTTP_URL.replace(/\.shtml/, '_s.shtml')}`,
|
|
84
110
|
}))
|
|
85
|
-
.slice(0,
|
|
111
|
+
.slice(0, category === 'all' ? total / 3 : total);
|
|
86
112
|
}
|
|
87
113
|
|
|
88
114
|
const items = await Promise.all(
|
|
@@ -98,8 +124,9 @@ module.exports = async (ctx) => {
|
|
|
98
124
|
// => https://user.guancha.cn/main/content?id=399176
|
|
99
125
|
|
|
100
126
|
const jumpMatch = detailResponse.data.match(/user.guancha.cn\/main\/content\?id=(.*)";/);
|
|
127
|
+
|
|
101
128
|
if (jumpMatch !== null) {
|
|
102
|
-
item.link = `https://user.guancha.cn/main/content?id=${jumpMatch[1]}`;
|
|
129
|
+
item.link = `https://user.guancha.cn/main/content?id=${jumpMatch[1]}&page=0`;
|
|
103
130
|
detailResponse = await got({
|
|
104
131
|
method: 'get',
|
|
105
132
|
url: item.link,
|
|
@@ -112,9 +139,9 @@ module.exports = async (ctx) => {
|
|
|
112
139
|
if (dateMatch === null) {
|
|
113
140
|
// PubDates of posts in 'fengwen' are in an informal format.
|
|
114
141
|
|
|
115
|
-
item.pubDate =
|
|
142
|
+
item.pubDate = parseRelativeDate(content('.time1').text());
|
|
116
143
|
} else {
|
|
117
|
-
item.pubDate =
|
|
144
|
+
item.pubDate = timezone(parseDate(dateMatch[1]), +8);
|
|
118
145
|
}
|
|
119
146
|
|
|
120
147
|
item.description = content('.all-txt').html() || content('.article-txt-content').html();
|
|
@@ -125,7 +152,7 @@ module.exports = async (ctx) => {
|
|
|
125
152
|
);
|
|
126
153
|
|
|
127
154
|
ctx.state.data = {
|
|
128
|
-
title: `观察者网 - ${config[
|
|
155
|
+
title: `观察者网 - ${config[category].title}`,
|
|
129
156
|
link: rootUrl,
|
|
130
157
|
item: items,
|
|
131
158
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
const got = require('@/utils/got');
|
|
2
|
+
const timezone = require('@/utils/timezone');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
2
4
|
|
|
3
|
-
const
|
|
5
|
+
const titles = {
|
|
4
6
|
recommend: '精选',
|
|
5
7
|
books: '观书堂',
|
|
6
8
|
courses: '在线课',
|
|
@@ -8,10 +10,11 @@ const title = {
|
|
|
8
10
|
};
|
|
9
11
|
|
|
10
12
|
module.exports = async (ctx) => {
|
|
11
|
-
const
|
|
13
|
+
const category = ctx.params.category ?? 'recommend';
|
|
12
14
|
|
|
13
15
|
const rootUrl = 'https://member.guancha.cn';
|
|
14
16
|
const apiUrl = `${rootUrl}/zaixianke/home`;
|
|
17
|
+
|
|
15
18
|
const response = await got({
|
|
16
19
|
method: 'get',
|
|
17
20
|
url: apiUrl,
|
|
@@ -19,11 +22,11 @@ module.exports = async (ctx) => {
|
|
|
19
22
|
|
|
20
23
|
let items;
|
|
21
24
|
|
|
22
|
-
switch (
|
|
25
|
+
switch (category) {
|
|
23
26
|
case 'books':
|
|
24
27
|
items = response.data.data.books.map((item) => ({
|
|
25
28
|
title: item.title,
|
|
26
|
-
link: `${rootUrl}/guanshutang/summary.html?id=${item.id}`,
|
|
29
|
+
link: `${rootUrl}/guanshutang/summary.html?id=${item.id}&page=0`,
|
|
27
30
|
description: `<img src="${item.cover}"><p>[${item.audio_time}] ${item.desc_short}</p>`,
|
|
28
31
|
pubDate: new Date(parseInt(item.cover.split('/').pop().substr(0, 10)) * 1000).toUTCString(),
|
|
29
32
|
}));
|
|
@@ -51,20 +54,32 @@ module.exports = async (ctx) => {
|
|
|
51
54
|
break;
|
|
52
55
|
|
|
53
56
|
default:
|
|
54
|
-
items = response.data.data[
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
57
|
+
items = response.data.data[category].map((item) => {
|
|
58
|
+
let timeArray = item.media_time && item.media_time.trim().split(/\D+/, 3);
|
|
59
|
+
timeArray = timeArray && timeArray.filter((item) => item !== '');
|
|
60
|
+
let itunes_duration;
|
|
61
|
+
if (timeArray) {
|
|
62
|
+
itunes_duration = 0;
|
|
63
|
+
itunes_duration += timeArray.length >= 1 ? parseInt(timeArray.slice(-1)) : 0;
|
|
64
|
+
itunes_duration += timeArray.length >= 2 ? parseInt(timeArray.slice(-2)) * 60 : 0;
|
|
65
|
+
itunes_duration += timeArray.length >= 3 ? parseInt(timeArray.slice(-3)) * 60 * 60 : 0;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
title: item.title,
|
|
69
|
+
link: item.jump_url,
|
|
70
|
+
author: item.author_name,
|
|
71
|
+
description: `<img src="${item.big_pic}"><p>${item.summary}</p>`,
|
|
72
|
+
enclosure_url: item.media_url,
|
|
73
|
+
enclosure_length: item.media_size,
|
|
74
|
+
itunes_duration,
|
|
75
|
+
enclosure_type: 'audio/mpeg',
|
|
76
|
+
pubDate: isNaN(+item.created_at) ? timezone(parseDate(item.created_at), +8) : parseDate(item.created_at * 1000),
|
|
77
|
+
};
|
|
78
|
+
});
|
|
64
79
|
}
|
|
65
80
|
|
|
66
81
|
ctx.state.data = {
|
|
67
|
-
title: `观学院 - ${
|
|
82
|
+
title: `观学院 - ${titles[category]}`,
|
|
68
83
|
link: `${rootUrl}/index.html`,
|
|
69
84
|
item: items,
|
|
70
85
|
};
|
|
File without changes
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'guancha.cn': {
|
|
3
|
+
_name: '观察者网',
|
|
4
|
+
'.': [
|
|
5
|
+
{
|
|
6
|
+
title: '头条',
|
|
7
|
+
docs: 'https://docs.rsshub.app/new-media.html#guan-cha-zhe-wang-tou-tiao',
|
|
8
|
+
source: ['/GuanChaZheTouTiao', '/'],
|
|
9
|
+
target: '/guancha/headline',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
title: '首页',
|
|
13
|
+
docs: 'https://docs.rsshub.app/new-media.html#guan-cha-zhe-wang-shou-ye',
|
|
14
|
+
source: ['/'],
|
|
15
|
+
target: '/guancha/:category?',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
title: '观学院',
|
|
19
|
+
docs: 'https://docs.rsshub.app/new-media.html#guan-cha-zhe-wang-guan-xue-yuan',
|
|
20
|
+
source: ['/'],
|
|
21
|
+
target: '/guancha/:category?',
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
app: [
|
|
25
|
+
{
|
|
26
|
+
title: '个人主页文章',
|
|
27
|
+
docs: 'https://docs.rsshub.app/new-media.html#guan-cha-zhe-wang-ge-ren-zhu-ye-wen-zhang',
|
|
28
|
+
source: ['/user/get-published-list', '/'],
|
|
29
|
+
target: (params, url) => `/guancha/personalpage/${new URL(url).searchParams.get('uid')}`,
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
member: [
|
|
33
|
+
{
|
|
34
|
+
title: '观学院',
|
|
35
|
+
docs: 'https://docs.rsshub.app/new-media.html#guan-cha-zhe-wang-guan-xue-yuan',
|
|
36
|
+
source: ['/'],
|
|
37
|
+
target: '/guancha/member/recommend',
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
user: [
|
|
41
|
+
{
|
|
42
|
+
title: '风闻话题',
|
|
43
|
+
docs: 'https://docs.rsshub.app/new-media.html#guan-cha-zhe-wang-feng-wen-hua-ti',
|
|
44
|
+
source: ['/topic/post-list', '/'],
|
|
45
|
+
target: (params, url) => `/guancha/topic/${new URL(url).searchParams.get('topic_id')}/${new URL(url).searchParams.get('order')}`,
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
module.exports = function (router) {
|
|
2
|
+
router.get('/headline', require('./headline'));
|
|
3
|
+
router.get('/member/:category?', require('./member'));
|
|
4
|
+
router.get('/personalpage/:uid', require('./personalpage'));
|
|
5
|
+
router.get('/topic/:id/:order?', require('./topic'));
|
|
6
|
+
router.get('/:category?', require('./index'));
|
|
7
|
+
};
|