rsshub 1.0.0-master.c034cfb → 1.0.0-master.c06353f
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 +3 -3
- package/lib/config.js +28 -10
- package/lib/maintainer.js +7 -2
- package/lib/middleware/access-control.js +5 -5
- package/lib/middleware/parameter.js +66 -11
- package/lib/middleware/template.js +79 -85
- package/lib/router.js +20 -20
- package/lib/routes/index.js +6 -13
- package/lib/routes/universities/ynnu/edu/news.js +3 -3
- package/lib/utils/rand-user-agent.js +2 -1
- package/lib/utils/render.js +2 -0
- package/lib/v2/2048/index.js +18 -13
- package/lib/v2/95mm/utils.js +3 -2
- package/lib/v2/abc/index.js +162 -0
- package/lib/v2/abc/maintainer.js +3 -0
- package/lib/v2/abc/radar.js +13 -0
- package/lib/v2/abc/router.js +3 -0
- package/lib/v2/abc/templates/description.art +21 -0
- package/lib/v2/aliyun/notice.js +1 -1
- package/lib/v2/aljazeera/index.js +1 -1
- package/lib/v2/apnews/topics.js +1 -0
- package/lib/v2/apple/apps.js +88 -17
- package/lib/v2/apple/maintainer.js +1 -1
- package/lib/v2/apple/radar.js +3 -3
- package/lib/v2/apple/router.js +1 -1
- package/lib/v2/asiantolick/index.js +73 -27
- package/lib/v2/asiantolick/maintainer.js +5 -3
- package/lib/v2/asiantolick/radar.js +34 -12
- package/lib/v2/asiantolick/router.js +2 -2
- package/lib/v2/asiantolick/templates/description.art +9 -3
- package/lib/v2/bangumi/maintainer.js +2 -0
- package/lib/v2/bangumi/radar.js +12 -0
- package/lib/v2/bangumi/router.js +2 -0
- package/lib/v2/bangumi/tv/other/followrank.js +42 -0
- package/lib/v2/bangumi/tv/user/wish.js +38 -0
- package/lib/v2/bilibili/cache.js +10 -7
- package/lib/v2/bilibili/fav.js +2 -0
- package/lib/v2/bilibili/maintainer.js +1 -0
- package/lib/v2/bilibili/platform.js +43 -0
- package/lib/v2/bilibili/radar.js +8 -0
- package/lib/v2/bilibili/router.js +1 -0
- package/lib/v2/bilibili/userFav.js +2 -0
- package/lib/v2/bilibili/video.js +8 -1
- package/lib/v2/bnu/dwxgb.js +17 -22
- package/lib/v2/booru/maintainer.js +3 -0
- package/lib/v2/booru/mmda.js +47 -0
- package/lib/v2/booru/radar.js +12 -0
- package/lib/v2/booru/router.js +3 -0
- package/lib/v2/bossdesign/index.js +41 -0
- package/lib/v2/bossdesign/maintainer.js +3 -0
- package/lib/v2/bossdesign/radar.js +13 -0
- package/lib/v2/bossdesign/router.js +3 -0
- package/lib/v2/brave/latest.js +4 -2
- package/lib/v2/buaa/maintainer.js +4 -0
- package/lib/v2/buaa/news/index.js +46 -0
- package/lib/v2/buaa/radar.js +21 -0
- package/lib/v2/buaa/router.js +4 -0
- package/lib/v2/buaa/sme.js +59 -0
- package/lib/v2/bytes/maintainer.js +0 -1
- package/lib/v2/caixin/blog.js +68 -45
- package/lib/v2/caixin/router.js +1 -1
- package/lib/v2/caixinglobal/latest.js +64 -0
- package/lib/v2/caixinglobal/maintainer.js +3 -0
- package/lib/v2/caixinglobal/radar.js +13 -0
- package/lib/v2/caixinglobal/router.js +3 -0
- package/lib/v2/cbc/topics.js +3 -1
- package/lib/v2/china/finance/finance.js +61 -0
- package/lib/v2/china/maintainer.js +1 -0
- package/lib/v2/china/news/military/news.js +5 -6
- package/lib/v2/china/radar.js +9 -0
- package/lib/v2/china/router.js +1 -0
- package/lib/v2/chinafactcheck/index.js +20 -21
- package/lib/v2/chinafactcheck/utils.js +16 -16
- package/lib/v2/chinaisa/index.js +83 -0
- package/lib/v2/chinaisa/maintainer.js +3 -0
- package/lib/v2/chinaisa/radar.js +18 -0
- package/lib/v2/chinaisa/router.js +3 -0
- package/lib/v2/cma/channel.js +87 -0
- package/lib/v2/cma/maintainer.js +3 -0
- package/lib/v2/cma/radar.js +18 -0
- package/lib/v2/cma/router.js +3 -0
- package/lib/v2/cma/templates/description.art +13 -0
- package/lib/v2/cmpxchg8b/articles.js +43 -0
- package/lib/v2/cmpxchg8b/maintainer.js +3 -0
- package/lib/v2/cmpxchg8b/radar.js +13 -0
- package/lib/v2/cmpxchg8b/router.js +3 -0
- package/lib/v2/cna/index.js +1 -0
- package/lib/v2/cna/maintainer.js +1 -0
- package/lib/v2/cna/radar.js +6 -0
- package/lib/v2/cna/router.js +1 -0
- package/lib/v2/cna/web/index.js +62 -0
- package/lib/v2/cnbeta/type.js +15 -9
- package/lib/v2/cnbeta/utils.js +3 -0
- package/lib/v2/cqwu/index.js +11 -8
- package/lib/v2/cqwu/radar.js +2 -2
- package/lib/v2/creative-comic/book.js +40 -34
- package/lib/v2/creative-comic/utils.js +1 -2
- package/lib/v2/cyzone/maintainer.js +1 -1
- package/lib/v2/deadline/maintainer.js +0 -1
- package/lib/v2/dlsite/ci-en/article.js +1 -1
- package/lib/v2/dongqiudi/special.js +13 -21
- package/lib/v2/dongqiudi/utils.js +26 -2
- package/lib/v2/douban/maintainer.js +4 -2
- package/lib/v2/douban/other/discussion.js +58 -0
- package/lib/v2/douban/other/doulist.js +9 -7
- package/lib/v2/douban/other/list.js +28 -19
- package/lib/v2/douban/other/recommended.js +68 -0
- package/lib/v2/douban/people/status.js +1 -1
- package/lib/v2/douban/radar.js +8 -0
- package/lib/v2/douban/router.js +3 -1
- package/lib/v2/egsea/flash.js +30 -0
- package/lib/v2/egsea/maintainer.js +3 -0
- package/lib/v2/egsea/radar.js +13 -0
- package/lib/v2/egsea/router.js +3 -0
- package/lib/v2/ehentai/ehapi.js +3 -1
- package/lib/v2/epicgames/index.js +18 -11
- package/lib/v2/epicgames/templates/description.art +1 -0
- package/lib/v2/farmatters/index.js +85 -0
- package/lib/v2/farmatters/maintainer.js +7 -0
- package/lib/v2/farmatters/radar.js +36 -0
- package/lib/v2/farmatters/router.js +6 -0
- package/lib/v2/farmatters/templates/description.art +9 -0
- package/lib/{routes → v2}/firefox/addons.js +3 -1
- package/lib/v2/firefox/breaches.js +38 -0
- package/lib/v2/firefox/maintainer.js +2 -0
- package/lib/v2/firefox/radar.js +17 -0
- package/lib/{routes → v2}/firefox/release.js +3 -3
- package/lib/v2/firefox/router.js +3 -1
- package/lib/v2/foresightnews/maintainer.js +0 -1
- package/lib/v2/fuliba/latest.js +25 -0
- package/lib/v2/fuliba/maintainer.js +3 -0
- package/lib/v2/fuliba/radar.js +15 -0
- package/lib/v2/fuliba/router.js +3 -0
- package/lib/v2/gcores/category.js +1 -0
- package/lib/v2/gcores/radio.js +1 -0
- package/lib/v2/gdsrx/index.js +72 -0
- package/lib/v2/gdsrx/maintainer.js +3 -0
- package/lib/v2/gdsrx/radar.js +61 -0
- package/lib/v2/gdsrx/router.js +3 -0
- package/lib/v2/getitfree/index.js +42 -34
- package/lib/v2/getitfree/maintainer.js +3 -1
- package/lib/v2/getitfree/radar.js +19 -2
- package/lib/v2/getitfree/router.js +10 -2
- package/lib/v2/getitfree/util.js +326 -0
- package/lib/v2/github/topic.js +26 -10
- package/lib/v2/gocn/jobs.js +14 -9
- package/lib/v2/gocn/maintainer.js +3 -1
- package/lib/v2/gocn/news.js +31 -0
- package/lib/v2/gocn/radar.js +8 -2
- package/lib/v2/gocn/router.js +3 -1
- package/lib/v2/gocn/topics.js +15 -7
- package/lib/v2/gocn/utils.js +38 -0
- package/lib/v2/gogoanimehd/radar.js +1 -1
- package/lib/v2/gogoanimehd/recent-releases.js +1 -1
- package/lib/v2/google/alerts.js +33 -0
- package/lib/v2/google/maintainer.js +1 -0
- package/lib/v2/google/router.js +1 -0
- package/lib/v2/gov/forestry/gjlckjdjt.js +96 -0
- package/lib/v2/gov/forestry/templates/description.art +15 -0
- package/lib/v2/gov/maintainer.js +12 -3
- package/lib/v2/gov/mem/sgcc.js +64 -0
- package/lib/v2/gov/moa/zdscxx.js +104 -0
- package/lib/v2/gov/mot/index.js +66 -0
- package/lib/v2/gov/nifdc/index.js +40 -33
- package/lib/v2/gov/npc/index.js +47 -0
- package/lib/v2/gov/radar.js +290 -2
- package/lib/v2/gov/router.js +12 -2
- package/lib/v2/gov/samr/templates/description.art +26 -0
- package/lib/v2/gov/samr/xgzlyhd.js +100 -0
- package/lib/v2/gov/zhejiang/gwy.js +84 -0
- package/lib/v2/gov/zhengce/index.js +99 -0
- package/lib/v2/greasyfork/maintainer.js +1 -0
- package/lib/v2/greasyfork/router.js +1 -0
- package/lib/v2/greasyfork/scripts.js +25 -20
- package/lib/v2/grubstreet/maintainer.js +3 -0
- package/lib/v2/grubstreet/radar.js +13 -0
- package/lib/v2/grubstreet/router.js +3 -0
- package/lib/v2/grubstreet/utils.js +84 -0
- package/lib/v2/guangdiu/maintainer.js +1 -0
- package/lib/v2/guangdiu/radar.js +6 -0
- package/lib/v2/guangdiu/router.js +1 -0
- package/lib/v2/guangdiu/search.js +40 -0
- package/lib/v2/guanhai/maintainer.js +0 -1
- package/lib/{routes/universities → v2}/harvard/health/blog.js +8 -7
- package/lib/v2/harvard/maintainer.js +3 -0
- package/lib/v2/harvard/radar.js +13 -0
- package/lib/v2/harvard/router.js +3 -0
- package/lib/v2/hebtv/maintainer.js +3 -0
- package/lib/v2/hebtv/nong-bo-shi-zai-xing-dong.js +109 -0
- package/lib/v2/hebtv/radar.js +13 -0
- package/lib/v2/hebtv/router.js +3 -0
- package/lib/v2/hebtv/templates/description.art +24 -0
- package/lib/v2/hostmonit/cloudflareyes.js +91 -0
- package/lib/v2/hostmonit/maintainer.js +3 -0
- package/lib/v2/hostmonit/radar.js +17 -0
- package/lib/v2/hostmonit/router.js +8 -0
- package/lib/v2/hostmonit/templates/description.art +28 -0
- package/lib/v2/hostmonit/templates/title.art +1 -0
- package/lib/v2/ianspriggs/index.js +90 -0
- package/lib/v2/ianspriggs/maintainer.js +3 -0
- package/lib/v2/ianspriggs/radar.js +17 -0
- package/lib/v2/ianspriggs/router.js +3 -0
- package/lib/v2/ianspriggs/templates/description.art +13 -0
- package/lib/v2/instagram/templates/images.art +8 -2
- package/lib/v2/instagram/templates/video.art +4 -1
- package/lib/v2/instagram/web-api/index.js +21 -11
- package/lib/v2/instagram/web-api/utils.js +86 -15
- package/lib/v2/iqilu/maintainer.js +3 -0
- package/lib/v2/iqilu/program.js +98 -0
- package/lib/v2/iqilu/radar.js +107 -0
- package/lib/v2/iqilu/router.js +3 -0
- package/lib/v2/iqilu/templates/description.art +24 -0
- package/lib/v2/javbus/index.js +6 -0
- package/lib/v2/javlibrary/maintainer.js +1 -0
- package/lib/v2/javlibrary/maker.js +10 -0
- package/lib/v2/javlibrary/router.js +1 -0
- package/lib/v2/javlibrary/utils.js +1 -0
- package/lib/v2/kamen-rider-official/news.js +1 -1
- package/lib/v2/kemono/index.js +28 -4
- package/lib/v2/kemono/radar.js +1 -1
- package/lib/v2/leetcode/articles.js +14 -10
- package/lib/v2/leetcode/dailyquestion-solution-cn.js +6 -3
- package/lib/v2/leetcode/dailyquestion-solution-en.js +7 -4
- package/lib/v2/liquipedia/cs_matches.js +52 -0
- package/lib/v2/liquipedia/dota2_matches.js +47 -0
- package/lib/v2/liquipedia/maintainer.js +4 -0
- package/lib/v2/liquipedia/radar.js +19 -0
- package/lib/v2/liquipedia/router.js +4 -0
- package/lib/v2/logclub/index.js +134 -0
- package/lib/v2/logclub/maintainer.js +9 -0
- package/lib/v2/logclub/radar.js +139 -0
- package/lib/v2/logclub/report.js +98 -0
- package/lib/v2/logclub/router.js +5 -0
- package/lib/v2/logclub/templates/description.art +33 -0
- package/lib/v2/metacritic/index.js +121 -0
- package/lib/v2/metacritic/maintainer.js +5 -0
- package/lib/v2/metacritic/radar.js +43 -0
- package/lib/v2/metacritic/router.js +3 -0
- package/lib/v2/metacritic/templates/description.art +19 -0
- package/lib/v2/metacritic/util.js +42 -0
- package/lib/v2/mittrchina/index.js +104 -0
- package/lib/v2/mittrchina/maintainer.js +3 -0
- package/lib/v2/mittrchina/radar.js +31 -0
- package/lib/v2/mittrchina/router.js +3 -0
- package/lib/v2/mittrchina/templates/movie.art +5 -0
- package/lib/v2/modb/maintainer.js +3 -0
- package/lib/v2/modb/radar.js +13 -0
- package/lib/v2/modb/router.js +3 -0
- package/lib/v2/modb/topic.js +59 -0
- package/lib/v2/mymusicsheet/maintainer.js +3 -0
- package/lib/v2/mymusicsheet/radar.js +13 -0
- package/lib/v2/mymusicsheet/router.js +3 -0
- package/lib/v2/mymusicsheet/templates/description.art +41 -0
- package/lib/v2/mymusicsheet/usersheets.js +120 -0
- package/lib/v2/nature/cover.js +32 -42
- package/lib/v2/nature/highlight.js +2 -2
- package/lib/v2/nature/news-and-comment.js +2 -2
- package/lib/v2/nature/news.js +2 -2
- package/lib/v2/nature/research.js +2 -2
- package/lib/v2/nature/siteindex.js +5 -5
- package/lib/v2/nature/utils.js +124 -5
- package/lib/v2/nbd/index.js +4 -1
- package/lib/v2/nbd/maintainer.js +1 -1
- package/lib/v2/nbd/radar.js +3 -3
- package/lib/v2/nbd/router.js +1 -1
- package/lib/v2/netflav/index.js +39 -0
- package/lib/v2/netflav/maintainer.js +3 -0
- package/lib/v2/netflav/radar.js +13 -0
- package/lib/v2/netflav/router.js +3 -0
- package/lib/v2/netflav/templates/description.art +8 -0
- package/lib/v2/niaogebiji/maintainer.js +0 -1
- package/lib/v2/npr/radar.js +2 -2
- package/lib/v2/oschina/news.js +1 -0
- package/lib/v2/ouc/it-tx.js +44 -0
- package/lib/v2/ouc/it.js +2 -2
- package/lib/v2/ouc/maintainer.js +2 -1
- package/lib/v2/ouc/radar.js +6 -0
- package/lib/v2/ouc/router.js +1 -0
- package/lib/v2/paulgraham/article.js +62 -0
- package/lib/v2/paulgraham/maintainer.js +3 -0
- package/lib/v2/paulgraham/radar.js +13 -0
- package/lib/v2/paulgraham/router.js +5 -0
- package/lib/v2/people/index.js +15 -24
- package/lib/v2/people/router.js +1 -2
- package/lib/v2/pixiv/ranking.js +1 -0
- package/lib/v2/pixiv/user.js +2 -1
- package/lib/v2/pixiv/utils.js +2 -2
- package/lib/v2/pku/cls/announcement.js +42 -0
- package/lib/v2/pku/maintainer.js +1 -0
- package/lib/v2/pku/radar.js +6 -0
- package/lib/v2/pku/router.js +1 -0
- package/lib/v2/qbitai/category.js +27 -0
- package/lib/v2/qbitai/maintainer.js +4 -0
- package/lib/v2/qbitai/radar.js +19 -0
- package/lib/v2/qbitai/router.js +4 -0
- package/lib/v2/qbitai/tag.js +27 -0
- package/lib/v2/qqorw/maintainer.js +1 -1
- package/lib/v2/reactnewsletter/maintainer.js +0 -1
- package/lib/v2/readhub/index.js +92 -83
- package/lib/v2/readhub/maintainer.js +1 -1
- package/lib/v2/readhub/radar.js +6 -2
- package/lib/v2/readhub/router.js +1 -4
- package/lib/v2/readhub/templates/description.art +40 -0
- package/lib/v2/reuters/common.js +19 -6
- package/lib/v2/reuters/maintainer.js +0 -2
- package/lib/v2/reuters/router.js +0 -2
- package/lib/v2/rfi/maintainer.js +1 -1
- package/lib/v2/rfi/news.js +35 -22
- package/lib/v2/rfi/radar.js +5 -5
- package/lib/v2/rfi/router.js +1 -1
- package/lib/v2/runtrail/maintainer.js +0 -1
- package/lib/v2/scau/maintainer.js +1 -0
- package/lib/v2/scau/radar.js +8 -0
- package/lib/v2/scau/router.js +1 -0
- package/lib/v2/scau/yjs.js +2 -2
- package/lib/v2/scau/yjsy.js +27 -0
- package/lib/v2/science/utils.js +4 -4
- package/lib/v2/scmp/index.js +61 -85
- package/lib/v2/scmp/utils.js +60 -0
- package/lib/v2/segmentfault/blogs.js +6 -23
- package/lib/v2/segmentfault/channel.js +18 -30
- package/lib/v2/segmentfault/user.js +6 -32
- package/lib/v2/segmentfault/utils.js +32 -0
- package/lib/v2/showstart/artist.js +15 -0
- package/lib/v2/showstart/brand.js +15 -0
- package/lib/v2/showstart/const.js +4 -0
- package/lib/v2/showstart/event.js +18 -0
- package/lib/v2/showstart/maintainer.js +6 -0
- package/lib/v2/showstart/radar.js +40 -0
- package/lib/v2/showstart/router.js +6 -0
- package/lib/v2/showstart/search.js +51 -0
- package/lib/v2/showstart/service.js +166 -0
- package/lib/v2/showstart/utils.js +92 -0
- package/lib/v2/sohu/mp.js +48 -35
- package/lib/v2/sohu/templates/video.art +7 -0
- package/lib/v2/tableau/maintainer.js +3 -0
- package/lib/v2/tableau/radar.js +11 -0
- package/lib/v2/tableau/router.js +3 -0
- package/lib/v2/tableau/viz-of-the-day.js +26 -0
- package/lib/v2/techpowerup/maintainer.js +0 -1
- package/lib/v2/telegram/maintainer.js +3 -3
- package/lib/v2/tesla/cx.js +119 -0
- package/lib/v2/tesla/maintainer.js +1 -0
- package/lib/v2/tesla/radar.js +13 -1
- package/lib/v2/tesla/router.js +1 -0
- package/lib/v2/tesla/templates/description.art +140 -0
- package/lib/v2/test/index.js +46 -0
- package/lib/v2/tfc-taiwan/maintainer.js +0 -1
- package/lib/v2/thepaper/featured.js +1 -1
- package/lib/v2/thepaper/utils.js +18 -12
- package/lib/v2/thoughtco/index.js +95 -0
- package/lib/v2/thoughtco/maintainer.js +3 -0
- package/lib/v2/thoughtco/radar.js +155 -0
- package/lib/v2/thoughtco/router.js +3 -0
- package/lib/v2/thoughtco/templates/description.art +16 -0
- package/lib/v2/threads/index.js +20 -150
- package/lib/v2/threads/utils.js +147 -0
- package/lib/v2/twitch/live.js +88 -0
- package/lib/v2/twitch/maintainer.js +5 -0
- package/lib/v2/twitch/radar.js +37 -0
- package/lib/v2/twitch/router.js +5 -0
- package/lib/v2/twitch/schedule.js +75 -0
- package/lib/v2/twitch/video.js +64 -0
- package/lib/v2/twitter/keyword.js +1 -3
- package/lib/v2/twitter/media.js +1 -5
- package/lib/v2/twitter/user.js +1 -3
- package/lib/v2/twitter/utils.js +5 -3
- package/lib/v2/twitter/web-api/constants.js +80 -68
- package/lib/v2/twitter/web-api/twitter-api.js +96 -103
- package/lib/v2/udn/breaking-news.js +6 -2
- package/lib/v2/uniqlo/maintainer.js +3 -0
- package/lib/v2/uniqlo/new.js +62 -0
- package/lib/v2/uniqlo/radar.js +12 -0
- package/lib/v2/uniqlo/router.js +3 -0
- package/lib/v2/v1tx/maintainer.js +0 -1
- package/lib/v2/weekendhk/maintainer.js +0 -1
- package/lib/v2/weibo/maintainer.js +1 -1
- package/lib/v2/weibo/oasis/user.js +4 -3
- package/lib/v2/weibo/radar.js +1 -1
- package/lib/v2/weibo/router.js +1 -1
- package/lib/v2/weibo/search/hot.js +118 -7
- package/lib/v2/weibo/search/template/digest.art +17 -0
- package/lib/v2/whu/hyxt.js +50 -0
- package/lib/v2/whu/maintainer.js +2 -1
- package/lib/v2/whu/news.js +48 -80
- package/lib/v2/whu/radar.js +252 -4
- package/lib/v2/whu/router.js +2 -1
- package/lib/v2/whu/templates/description.art +39 -0
- package/lib/v2/whu/util.js +148 -0
- package/lib/v2/x-mol/maintainer.js +4 -0
- package/lib/v2/x-mol/news.js +63 -0
- package/lib/v2/x-mol/paper.js +73 -0
- package/lib/v2/x-mol/radar.js +25 -0
- package/lib/v2/x-mol/router.js +4 -0
- package/lib/v2/x-mol/templates/description.art +6 -0
- package/lib/v2/x-mol/utils.js +3 -0
- package/lib/v2/xiaohongshu/user.js +33 -9
- package/lib/v2/xiaohongshu/util.js +26 -20
- package/lib/v2/xmnn/docs.js +0 -0
- package/lib/v2/xmnn/maintainer.js +1 -0
- package/lib/v2/xmnn/news.js +65 -0
- package/lib/v2/xmnn/radar.js +67 -1
- package/lib/v2/xmnn/router.js +1 -0
- package/lib/v2/yomujp/level.js +101 -0
- package/lib/v2/yomujp/maintainer.js +3 -0
- package/lib/v2/yomujp/radar.js +13 -0
- package/lib/v2/yomujp/router.js +3 -0
- package/lib/v2/yuque/utils.js +1 -0
- package/lib/v2/zcool/maintainer.js +1 -1
- package/lib/v2/zhubai/radar.js +2 -1
- package/lib/v2/zhubai/templates/description.art +41 -13
- package/lib/v2/zhubai/top20.js +31 -22
- package/lib/{routes → v2}/zimuxia/index.js +16 -8
- package/lib/v2/zimuxia/maintainer.js +4 -0
- package/lib/v2/zimuxia/portfolio.js +52 -0
- package/lib/v2/zimuxia/radar.js +19 -0
- package/lib/v2/zimuxia/router.js +4 -0
- package/lib/v2/zjuvag/blog.js +33 -0
- package/lib/v2/zjuvag/maintainer.js +3 -0
- package/lib/v2/zjuvag/radar.js +11 -0
- package/lib/v2/zjuvag/router.js +3 -0
- package/lib/views/rss3-ums.js +62 -0
- package/package.json +60 -60
- package/lib/routes/abc/documentId.js +0 -7272
- package/lib/routes/abc/id.js +0 -7272
- package/lib/routes/abc/index.js +0 -74
- package/lib/routes/blogs/paulgraham.js +0 -46
- package/lib/routes/egsea/flash.js +0 -40
- package/lib/routes/getitfree/category.js +0 -59
- package/lib/routes/getitfree/search.js +0 -25
- package/lib/routes/getitfree/utils.js +0 -47
- package/lib/routes/gov/moa/sjzxfb.js +0 -20
- package/lib/routes/growincity/news.js +0 -49
- package/lib/routes/grubstreet/utils.js +0 -78
- package/lib/routes/liquipedia/dota2_matches.js +0 -50
- package/lib/routes/mittrchina/index.js +0 -45
- package/lib/routes/npc/index.js +0 -42
- package/lib/routes/uniqlo/stylingbook.js +0 -24
- package/lib/routes/universities/buaa/news/index.js +0 -66
- package/lib/routes/universities/buaa/utils.js +0 -57
- package/lib/routes/x-mol/news.js +0 -48
- package/lib/routes/x-mol/paper.js +0 -78
- package/lib/routes/x-mol/utils.js +0 -16
- package/lib/routes/zimuxia/portfolio.js +0 -39
- package/lib/v2/chinafactcheck/templates/description.art +0 -1
- package/lib/v2/firefox/index.js +0 -74
- package/lib/v2/gocn/util.js +0 -17
- package/lib/v2/gov/zhengce/zuixin.js +0 -39
- package/lib/v2/nbd/article.js +0 -50
- package/lib/v2/reuters/migration_prompt.js +0 -3
- package/lib/v2/twitter/web-api/twitter-got.js +0 -113
- /package/lib/{routes → v2}/gov/moa/moa.js +0 -0
- /package/lib/{routes → v2}/grubstreet/index.js +0 -0
- /package/lib/{routes → v2}/metacritic/release.js +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
3
|
+
|
|
4
|
+
module.exports = async (ctx) => {
|
|
5
|
+
const { category } = ctx.params;
|
|
6
|
+
const limit = parseInt(ctx.query.limit, 10) || undefined;
|
|
7
|
+
const baseUrl = 'https://www.bossdesign.cn';
|
|
8
|
+
|
|
9
|
+
const currentCategory = await ctx.cache.tryGet(`bossdesign:categories:${category}`, async () => {
|
|
10
|
+
const { data: categories } = await got(`${baseUrl}/wp-json/wp/v2/categories`);
|
|
11
|
+
return categories.find((item) => item.slug === category || item.name === category);
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
const categoryId = currentCategory?.id;
|
|
15
|
+
|
|
16
|
+
const { data: posts } = await got(`${baseUrl}/wp-json/wp/v2/posts`, {
|
|
17
|
+
searchParams: {
|
|
18
|
+
categories: categoryId,
|
|
19
|
+
per_page: limit,
|
|
20
|
+
_embed: '',
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
const items = posts.map((item) => ({
|
|
25
|
+
title: item.title.rendered,
|
|
26
|
+
description: item.content.rendered,
|
|
27
|
+
pubDate: parseDate(item.date_gmt),
|
|
28
|
+
updated: parseDate(item.modified_gmt),
|
|
29
|
+
link: item.link,
|
|
30
|
+
guid: item.guid.rendered,
|
|
31
|
+
category: [...new Set([...item._embedded['wp:term'][0].map((item) => item.name), ...item._embedded['wp:term'][1].map((item) => item.name)])],
|
|
32
|
+
}));
|
|
33
|
+
|
|
34
|
+
ctx.state.data = {
|
|
35
|
+
title: currentCategory?.name ? `${currentCategory.name} | Boss设计` : 'Boss设计 | 收集国外设计素材网站的资源平台。',
|
|
36
|
+
description: currentCategory?.description ?? 'Boss设计-收集国外设计素材网站的资源平台。专注于收集国外设计素材和国外设计网站,以及超实用的设计师神器,只为设计初学者和设计师提供海量的资源平台。..',
|
|
37
|
+
image: currentCategory?.cover ?? `${baseUrl}/wp-content/themes/pinghsu/images/Bossdesign-ico.ico`,
|
|
38
|
+
link: currentCategory?.link ?? baseUrl,
|
|
39
|
+
item: items,
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'bossdesign.cn': {
|
|
3
|
+
_name: 'Boss 设计',
|
|
4
|
+
'.': [
|
|
5
|
+
{
|
|
6
|
+
title: '分类',
|
|
7
|
+
docs: 'https://docs.rsshub.app/routes/design#boss-she-ji',
|
|
8
|
+
source: ['/:category?', '/'],
|
|
9
|
+
target: (params) => `/bossdesign${params.category ? `/${params.category}` : ''}`,
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
|
+
},
|
|
13
|
+
};
|
package/lib/v2/brave/latest.js
CHANGED
|
@@ -20,13 +20,15 @@ module.exports = async (ctx) => {
|
|
|
20
20
|
|
|
21
21
|
const title = item.text();
|
|
22
22
|
const device = item.parent().find('h2').text();
|
|
23
|
+
const matchVersion = title.match(/(v[\d.]+)/);
|
|
24
|
+
const matchDate = title.match(/\((.*?)\)/);
|
|
23
25
|
|
|
24
26
|
return {
|
|
25
27
|
title: `[${device}] ${title}`,
|
|
26
28
|
link: currentUrl,
|
|
27
|
-
guid: `${currentUrl}#${device}-${
|
|
29
|
+
guid: `${currentUrl}#${device}-${matchVersion?.[1] ?? title}`,
|
|
28
30
|
description: item.next().html(),
|
|
29
|
-
pubDate: parseDate(
|
|
31
|
+
pubDate: parseDate(matchDate?.[1].replace(/(st|nd|rd|th)?,/, ''), ['MMMM D YYYY', 'MMM D YYYY']),
|
|
30
32
|
};
|
|
31
33
|
});
|
|
32
34
|
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
4
|
+
const timezone = require('@/utils/timezone');
|
|
5
|
+
|
|
6
|
+
module.exports = async (ctx) => {
|
|
7
|
+
const baseUrl = 'https://news.buaa.edu.cn';
|
|
8
|
+
const { type } = ctx.params;
|
|
9
|
+
|
|
10
|
+
const { data: response, url: link } = await got(`${baseUrl}/${type}.htm`);
|
|
11
|
+
|
|
12
|
+
const $ = cheerio.load(response);
|
|
13
|
+
const title = $('.subnav span').text().trim();
|
|
14
|
+
const list = $('.mainleft > .listlefttop > .listleftop1')
|
|
15
|
+
.toArray()
|
|
16
|
+
.map((item) => {
|
|
17
|
+
item = $(item);
|
|
18
|
+
const title = item.find('h2 > a');
|
|
19
|
+
return {
|
|
20
|
+
title: title.text(),
|
|
21
|
+
link: new URL(title.attr('href'), baseUrl).href,
|
|
22
|
+
pubDate: timezone(parseDate(item.find('h2 em').text(), '[YYYY-MM-DD]'), +8),
|
|
23
|
+
};
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const result = await Promise.all(
|
|
27
|
+
list.map((item) =>
|
|
28
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
29
|
+
const response = await got(item.link);
|
|
30
|
+
const $ = cheerio.load(response.data);
|
|
31
|
+
|
|
32
|
+
item.description = $('.v_news_content').html();
|
|
33
|
+
item.author = $('.vsbcontent_end').text().trim();
|
|
34
|
+
|
|
35
|
+
return item;
|
|
36
|
+
})
|
|
37
|
+
)
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
ctx.state.data = {
|
|
41
|
+
title: `北航新闻 - ${title}`,
|
|
42
|
+
link,
|
|
43
|
+
description: `北京航空航天大学新闻网 - ${title}`,
|
|
44
|
+
item: result,
|
|
45
|
+
};
|
|
46
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'buaa.edu.cn': {
|
|
3
|
+
_name: '北京航空航天大学',
|
|
4
|
+
news: [
|
|
5
|
+
{
|
|
6
|
+
title: '新闻网',
|
|
7
|
+
docs: 'https://docs.rsshub.app/routes/university#bei-jing-hang-kong-hang-tian-da-xue',
|
|
8
|
+
source: ['/*'],
|
|
9
|
+
target: (_, url) => `/buaa/news${new URL(url).pathname.replace('.htm', '')}`,
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
|
+
'www.sme': [
|
|
13
|
+
{
|
|
14
|
+
title: '集成电路科学与工程学院',
|
|
15
|
+
docs: 'https://docs.rsshub.app/routes/university#bei-jing-hang-kong-hang-tian-da-xue-ji-cheng-dian-lu-ke-xue-yu-gong-cheng-xue-yuan',
|
|
16
|
+
source: ['/*'],
|
|
17
|
+
target: (_, url) => `/buaa/sme${new URL(url).pathname.replace('.htm', '')}`,
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
},
|
|
21
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
4
|
+
const timezone = require('@/utils/timezone');
|
|
5
|
+
|
|
6
|
+
const BASE_URL = 'http://www.sme.buaa.edu.cn';
|
|
7
|
+
|
|
8
|
+
module.exports = async (ctx) => {
|
|
9
|
+
const { path = 'tzgg' } = ctx.params;
|
|
10
|
+
const url = `${BASE_URL}/${path}.htm`;
|
|
11
|
+
const { title, list } = await getList(url);
|
|
12
|
+
ctx.state.data = {
|
|
13
|
+
// 源标题
|
|
14
|
+
title,
|
|
15
|
+
// 源链接
|
|
16
|
+
link: url,
|
|
17
|
+
// 源文章
|
|
18
|
+
item: await getItems(ctx, list),
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
async function getList(url) {
|
|
23
|
+
const { data } = await got(url);
|
|
24
|
+
const $ = cheerio.load(data);
|
|
25
|
+
const title = $('.nytit .fr a')
|
|
26
|
+
.toArray()
|
|
27
|
+
.slice(1)
|
|
28
|
+
.map((item) => $(item).text().trim())
|
|
29
|
+
.join(' - ');
|
|
30
|
+
const list = $("div[class='Newslist'] > ul > li")
|
|
31
|
+
.toArray()
|
|
32
|
+
.map((item) => {
|
|
33
|
+
item = $(item);
|
|
34
|
+
const $a = item.find('a');
|
|
35
|
+
const link = $a.attr('href');
|
|
36
|
+
return {
|
|
37
|
+
title: item.find('a').text(),
|
|
38
|
+
link: link.startsWith('http') ? link : `${BASE_URL}/${link}`, // 有些链接是相对路径
|
|
39
|
+
pubDate: timezone(parseDate(item.find('span').text()), +8),
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
return {
|
|
43
|
+
title,
|
|
44
|
+
list,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function getItems(ctx, list) {
|
|
49
|
+
return Promise.all(
|
|
50
|
+
list.map((item) =>
|
|
51
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
52
|
+
const { data: descrptionResponse } = await got(item.link);
|
|
53
|
+
const $descrption = cheerio.load(descrptionResponse);
|
|
54
|
+
item.description = $descrption('div[class="v_news_content"]').html();
|
|
55
|
+
return item;
|
|
56
|
+
})
|
|
57
|
+
)
|
|
58
|
+
);
|
|
59
|
+
}
|
package/lib/v2/caixin/blog.js
CHANGED
|
@@ -6,53 +6,76 @@ const { parseBlogArticle } = require('./utils');
|
|
|
6
6
|
|
|
7
7
|
module.exports = async (ctx) => {
|
|
8
8
|
const { column } = ctx.params;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
.
|
|
17
|
-
.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
.
|
|
9
|
+
const { limit = 20 } = ctx.query;
|
|
10
|
+
if (!column) {
|
|
11
|
+
const { data } = await got('https://blog.caixin.com/blog-api/post/index', {
|
|
12
|
+
searchParams: {
|
|
13
|
+
page: 1,
|
|
14
|
+
size: limit,
|
|
15
|
+
},
|
|
16
|
+
}).json();
|
|
17
|
+
const posts = data.map((item) => ({
|
|
18
|
+
title: item.title,
|
|
19
|
+
description: item.brief,
|
|
20
|
+
author: item.authorName,
|
|
21
|
+
link: item.postUrl.replace('http://', 'https://'),
|
|
22
|
+
pubDate: parseDate(item.publishTime, 'x'),
|
|
23
|
+
}));
|
|
24
|
+
const items = await Promise.all(posts.map((item) => parseBlogArticle(item, ctx.cache.tryGet)));
|
|
25
|
+
|
|
26
|
+
ctx.state.data = {
|
|
27
|
+
title: `财新博客 - 全部`,
|
|
28
|
+
link: 'https://blog.caixin.com',
|
|
29
|
+
// description: introduce,
|
|
30
|
+
// image: avatar,
|
|
31
|
+
item: items,
|
|
32
|
+
};
|
|
33
|
+
} else {
|
|
34
|
+
if (!isValidHost(column)) {
|
|
35
|
+
throw Error('Invalid column');
|
|
36
|
+
}
|
|
37
|
+
const link = `https://${column}.blog.caixin.com`;
|
|
38
|
+
const { data: response } = await got(link);
|
|
39
|
+
const $ = cheerio.load(response);
|
|
40
|
+
const user = $('div.indexMainConri > script[type="text/javascript"]')
|
|
41
|
+
.text()
|
|
42
|
+
.substring('window.user = '.length + 1)
|
|
43
|
+
.split(';')[0]
|
|
44
|
+
.replaceAll(/\s/g, '');
|
|
45
|
+
const authorId = user.match(/id:"(\d+)"/)[1];
|
|
46
|
+
const authorName = user.match(/name:"(.*?)"/)[1];
|
|
47
|
+
const avatar = user.match(/avatar:"(.*?)"/)[1];
|
|
48
|
+
const introduce = user.match(/introduce:"(.*?)"/)[1];
|
|
27
49
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
50
|
+
const {
|
|
51
|
+
data: { data },
|
|
52
|
+
} = await got('https://blog.caixin.com/blog-api/post/posts', {
|
|
53
|
+
searchParams: {
|
|
54
|
+
page: 1,
|
|
55
|
+
size: ctx.query.limit ? parseInt(ctx.query.limit) : 20,
|
|
56
|
+
content: '',
|
|
57
|
+
authorId,
|
|
58
|
+
sort: 'publishTime',
|
|
59
|
+
direction: 'DESC',
|
|
60
|
+
},
|
|
61
|
+
});
|
|
40
62
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
63
|
+
const posts = data.map((item) => ({
|
|
64
|
+
title: item.title,
|
|
65
|
+
description: item.brief,
|
|
66
|
+
author: item.displayName,
|
|
67
|
+
link: item.guid.replace('http://', 'https://'),
|
|
68
|
+
pubDate: parseDate(item.publishTime, 'x'),
|
|
69
|
+
}));
|
|
48
70
|
|
|
49
|
-
|
|
71
|
+
const items = await Promise.all(posts.map((item) => parseBlogArticle(item, ctx.cache.tryGet)));
|
|
50
72
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
73
|
+
ctx.state.data = {
|
|
74
|
+
title: `财新博客 - ${authorName}`,
|
|
75
|
+
link,
|
|
76
|
+
description: introduce,
|
|
77
|
+
image: avatar,
|
|
78
|
+
item: items,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
58
81
|
};
|
package/lib/v2/caixin/router.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
module.exports = (router) => {
|
|
2
2
|
router.get('/article', require('./article'));
|
|
3
|
-
router.get('/blog/:column', require('./blog'));
|
|
3
|
+
router.get('/blog/:column?', require('./blog'));
|
|
4
4
|
router.get('/database', require('./database'));
|
|
5
5
|
router.get('/k', require('./k'));
|
|
6
6
|
router.get('/latest', require('./latest'));
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
4
|
+
|
|
5
|
+
module.exports = async (ctx) => {
|
|
6
|
+
const { data } = await got('https://gateway.caixin.com/api/extapi/homeInterface.jsp', {
|
|
7
|
+
searchParams: {
|
|
8
|
+
subject: '100990318;100990314;100990311',
|
|
9
|
+
start: 0,
|
|
10
|
+
count: ctx.query.limit ? parseInt(ctx.query.limit, 10) : 20,
|
|
11
|
+
type: '2',
|
|
12
|
+
_: Date.now(),
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const list = data.datas.map((e) => ({
|
|
17
|
+
title: e.desc,
|
|
18
|
+
description: e.summ,
|
|
19
|
+
link: e.link,
|
|
20
|
+
pubDate: parseDate(e.time),
|
|
21
|
+
category: e.tags.map((t) => t.name),
|
|
22
|
+
nid: e.nid,
|
|
23
|
+
attr: e.attr,
|
|
24
|
+
enclosure_url: e.audioUrl,
|
|
25
|
+
enclosure_type: e.audioUrl ? 'audio/mpeg' : undefined,
|
|
26
|
+
itunes_item_image: e.audioUrl ? e.pict.imgs[0].url : undefined,
|
|
27
|
+
}));
|
|
28
|
+
|
|
29
|
+
const items = await Promise.all(
|
|
30
|
+
list.map((item) =>
|
|
31
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
32
|
+
const { data } = await got(item.link);
|
|
33
|
+
const $ = cheerio.load(data);
|
|
34
|
+
$('.loadingBox, .cons-pay-tip').remove();
|
|
35
|
+
|
|
36
|
+
let content = $('#appContent').prop('outerHTML');
|
|
37
|
+
|
|
38
|
+
if (item.attr === 0) {
|
|
39
|
+
const { data } = await got('https://u.caixinglobal.com/get/reading.do', {
|
|
40
|
+
searchParams: {
|
|
41
|
+
id: item.nid,
|
|
42
|
+
source: '',
|
|
43
|
+
url: item.link,
|
|
44
|
+
_: Date.now(),
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
content = data.data.content;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
item.description = $('.cons-photo').prop('outerHTML') + content;
|
|
51
|
+
|
|
52
|
+
return item;
|
|
53
|
+
})
|
|
54
|
+
)
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
ctx.state.data = {
|
|
58
|
+
title: 'The Latest Top Headlines on China - Caixin Global',
|
|
59
|
+
description: 'The latest headlines on China finance, companies, politics, international affairs and other China-related issues from around the world. Caixin Global',
|
|
60
|
+
language: 'en',
|
|
61
|
+
link: 'https://www.caixinglobal.com/news/',
|
|
62
|
+
item: items,
|
|
63
|
+
};
|
|
64
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'caixinglobal.com': {
|
|
3
|
+
_name: 'Caixin Global',
|
|
4
|
+
'.': [
|
|
5
|
+
{
|
|
6
|
+
title: 'Latest News',
|
|
7
|
+
docs: 'https://docs.rsshub.app/routes/traditional-media#caixin-global',
|
|
8
|
+
source: ['/news', '/'],
|
|
9
|
+
target: '/caixinglobal/latest',
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
|
+
},
|
|
13
|
+
};
|
package/lib/v2/cbc/topics.js
CHANGED
|
@@ -41,7 +41,9 @@ module.exports = async (ctx) => {
|
|
|
41
41
|
author = head.author.map((author) => author.name).join(' & ');
|
|
42
42
|
}
|
|
43
43
|
const pubDate = head.datePublished;
|
|
44
|
-
const
|
|
44
|
+
const descriptionDom = $('div[data-cy=storyWrapper]');
|
|
45
|
+
descriptionDom.find('div[class=share]').remove();
|
|
46
|
+
const description = descriptionDom.html();
|
|
45
47
|
|
|
46
48
|
return { title, author, pubDate, description, link };
|
|
47
49
|
})
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
const cheerio = require('cheerio');
|
|
2
|
+
const got = require('@/utils/got');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
4
|
+
const timezone = require('@/utils/timezone');
|
|
5
|
+
|
|
6
|
+
const CATEGORY_MAP = {
|
|
7
|
+
tuijian: 'tuijian', // 推荐
|
|
8
|
+
TMT: 'TMT', // TMT
|
|
9
|
+
jinrong: 'jinrong', // 金融
|
|
10
|
+
dichan: 'dichan', // 地产
|
|
11
|
+
xiaofei: 'xiaofei', // 消费
|
|
12
|
+
yiyao: 'yiyao', // 医药
|
|
13
|
+
wine: 'wine', // 酒业
|
|
14
|
+
IPO: 'IPO', // IPO观察
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
module.exports = async (ctx) => {
|
|
18
|
+
const baseUrl = 'https://finance.china.com';
|
|
19
|
+
const category = CATEGORY_MAP[ctx.params.category] ?? CATEGORY_MAP.tuijian;
|
|
20
|
+
const websiteUrl = `${baseUrl}/${category}`;
|
|
21
|
+
const response = await got(websiteUrl);
|
|
22
|
+
const data = response.data;
|
|
23
|
+
const $ = cheerio.load(data);
|
|
24
|
+
const categoryTitle = $('.list-hd strong').text();
|
|
25
|
+
const listCategory = `中华网-财经-${categoryTitle}新闻`;
|
|
26
|
+
const limit = ctx.query.limit ? parseInt(ctx.query.limit, 10) : 30;
|
|
27
|
+
const detailsUrls = $('.item-con-inner')
|
|
28
|
+
.map((_, item) => {
|
|
29
|
+
item = $(item);
|
|
30
|
+
return {
|
|
31
|
+
link: item.find('.tit>a').attr('href'),
|
|
32
|
+
};
|
|
33
|
+
})
|
|
34
|
+
.get()
|
|
35
|
+
.filter((item) => item.link !== void 0)
|
|
36
|
+
.slice(0, limit);
|
|
37
|
+
|
|
38
|
+
const items = await Promise.all(
|
|
39
|
+
detailsUrls.map((item) =>
|
|
40
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
41
|
+
const detailsResponse = await got(item.link);
|
|
42
|
+
const $d = cheerio.load(detailsResponse.data);
|
|
43
|
+
return {
|
|
44
|
+
title: $d('.article_title').text(),
|
|
45
|
+
link: item.link,
|
|
46
|
+
description: $d('#js_article_content').html(),
|
|
47
|
+
pubDate: timezone(parseDate($d('.article_info>span.time').text()), +8),
|
|
48
|
+
author: $d(' div.article_info > span.source').text(),
|
|
49
|
+
category: listCategory,
|
|
50
|
+
};
|
|
51
|
+
})
|
|
52
|
+
)
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
ctx.state.data = {
|
|
56
|
+
title: $('head title').text(),
|
|
57
|
+
link: websiteUrl,
|
|
58
|
+
category: listCategory,
|
|
59
|
+
item: items,
|
|
60
|
+
};
|
|
61
|
+
};
|
|
@@ -7,8 +7,7 @@ module.exports = async (ctx) => {
|
|
|
7
7
|
const response = await got(websiteUrl);
|
|
8
8
|
const data = response.data;
|
|
9
9
|
const $ = cheerio.load(data);
|
|
10
|
-
const commonList = $('.
|
|
11
|
-
|
|
10
|
+
const commonList = $('.item_list li');
|
|
12
11
|
ctx.state.data = {
|
|
13
12
|
title: '中华网-军事新闻',
|
|
14
13
|
link: 'https://military.china.com/news/',
|
|
@@ -18,12 +17,12 @@ module.exports = async (ctx) => {
|
|
|
18
17
|
.map((_, item) => {
|
|
19
18
|
item = $(item);
|
|
20
19
|
return {
|
|
21
|
-
title: item.find('.
|
|
20
|
+
title: item.find('h3.item_title').text(),
|
|
22
21
|
author: '中华网军事',
|
|
23
22
|
category: '中华网军事',
|
|
24
|
-
pubDate: parseDate(item.find('.
|
|
25
|
-
description: item.find('.
|
|
26
|
-
link: item.find('.
|
|
23
|
+
pubDate: parseDate(item.find('em.item_time').text()),
|
|
24
|
+
description: item.find('.item_source').text(),
|
|
25
|
+
link: item.find('h3.item_title a').attr('href'),
|
|
27
26
|
};
|
|
28
27
|
})
|
|
29
28
|
.get(),
|
package/lib/v2/china/radar.js
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
'china.com': {
|
|
3
3
|
_name: '中华网',
|
|
4
|
+
|
|
5
|
+
finance: [
|
|
6
|
+
{
|
|
7
|
+
title: '财经新闻',
|
|
8
|
+
docs: 'https://docs.rsshub.app/routes/new-media#zhong-hua-wang',
|
|
9
|
+
source: '/:category',
|
|
10
|
+
target: '/china/finance/:category?',
|
|
11
|
+
},
|
|
12
|
+
],
|
|
4
13
|
military: [
|
|
5
14
|
{
|
|
6
15
|
title: '军事新闻',
|
package/lib/v2/china/router.js
CHANGED
|
@@ -3,35 +3,34 @@ const cheerio = require('cheerio');
|
|
|
3
3
|
const got = require('@/utils/got');
|
|
4
4
|
|
|
5
5
|
module.exports = async (ctx) => {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
const response = await got(utils.siteLink, {
|
|
7
|
+
headers: {
|
|
8
|
+
'user-agent': utils.trueUA,
|
|
9
|
+
},
|
|
10
|
+
});
|
|
9
11
|
const $ = cheerio.load(response.data);
|
|
10
12
|
|
|
11
|
-
const
|
|
12
|
-
.
|
|
13
|
-
.
|
|
14
|
-
const articlesLinkList = Array.from(new Set(articlesLinkListNode));
|
|
13
|
+
const articlesLink = $('.post-info-box .post-thumb a')
|
|
14
|
+
.toArray()
|
|
15
|
+
.map((item) => ({ link: $(item).attr('href') }));
|
|
15
16
|
|
|
16
17
|
const articles = await Promise.all(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const detail = await ctx.cache.tryGet(articlesLink, () => utils.getArticleDetail(articlesLink));
|
|
18
|
+
articlesLink.map((item) =>
|
|
19
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
20
|
+
const { title, author, pubDate, description, category } = await utils.getArticleDetail(item.link);
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
})
|
|
22
|
+
item.title = title;
|
|
23
|
+
item.author = author;
|
|
24
|
+
item.pubDate = pubDate;
|
|
25
|
+
item.description = description;
|
|
26
|
+
item.category = category;
|
|
27
|
+
return item;
|
|
28
|
+
})
|
|
29
|
+
)
|
|
31
30
|
);
|
|
32
31
|
|
|
33
32
|
ctx.state.data = {
|
|
34
|
-
title:
|
|
33
|
+
title: $('head title').text(),
|
|
35
34
|
link: utils.siteLink,
|
|
36
35
|
item: articles,
|
|
37
36
|
};
|