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
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
const { art } = require('@/utils/render');
|
|
2
|
-
const path = require('path');
|
|
3
1
|
const cheerio = require('cheerio');
|
|
4
2
|
const got = require('@/utils/got');
|
|
5
3
|
const { parseDate } = require('@/utils/parse-date');
|
|
4
|
+
const { trueUA } = require('@/config').value;
|
|
6
5
|
|
|
7
6
|
const siteLink = 'https://chinafactcheck.com';
|
|
8
7
|
|
|
9
|
-
const renderDesc = (desc) =>
|
|
10
|
-
art(path.join(__dirname, 'templates/description.art'), {
|
|
11
|
-
desc,
|
|
12
|
-
});
|
|
13
|
-
|
|
14
8
|
const cleanDom = (dom) => {
|
|
15
9
|
dom('*[style]').removeAttr('style');
|
|
16
10
|
dom('br').remove();
|
|
@@ -30,31 +24,37 @@ const cleanDom = (dom) => {
|
|
|
30
24
|
};
|
|
31
25
|
|
|
32
26
|
const getArticleDetail = async (link) => {
|
|
33
|
-
const response = await got(link
|
|
27
|
+
const response = await got(link, {
|
|
28
|
+
headers: {
|
|
29
|
+
'user-agent': trueUA,
|
|
30
|
+
},
|
|
31
|
+
});
|
|
34
32
|
const $ = cleanDom(cheerio.load(response.data));
|
|
35
33
|
|
|
36
34
|
const title = $('.content-head h2').text().trim();
|
|
37
35
|
const author = $('.content-persons p span:last').text().trim();
|
|
38
|
-
const
|
|
36
|
+
const pubDate = parseDate($('.content-time').text().trim(), 'YYYY-MM-DD');
|
|
39
37
|
|
|
40
|
-
const description =
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
const description = $('div[class=content-list-box]').html();
|
|
39
|
+
const category = $('.content-tags a[rel="tag"]')
|
|
40
|
+
.toArray()
|
|
41
|
+
.map((item) => $(item).text().trim());
|
|
42
|
+
return new ArticleDetail(title, author, pubDate, description, category);
|
|
44
43
|
};
|
|
45
44
|
class ArticleDetail {
|
|
46
|
-
constructor(title, author,
|
|
45
|
+
constructor(title, author, pubDate, description, category) {
|
|
47
46
|
this.title = title;
|
|
48
47
|
this.author = author;
|
|
49
|
-
this.
|
|
48
|
+
this.pubDate = pubDate;
|
|
50
49
|
this.description = description;
|
|
50
|
+
this.category = category;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
module.exports = {
|
|
55
55
|
siteLink,
|
|
56
|
-
renderDesc,
|
|
57
56
|
cleanDom,
|
|
58
57
|
getArticleDetail,
|
|
59
58
|
ArticleDetail,
|
|
59
|
+
trueUA,
|
|
60
60
|
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
4
|
+
|
|
5
|
+
module.exports = async (ctx) => {
|
|
6
|
+
const { id = '58af05dfb6b4300151760176d2aad0a04c275aaadbb1315039263f021f920dcd' } = ctx.params;
|
|
7
|
+
const limit = ctx.query.limit ? parseInt(ctx.query.limit, 10) : 15;
|
|
8
|
+
|
|
9
|
+
const rootUrl = 'https://www.chinaisa.org.cn';
|
|
10
|
+
|
|
11
|
+
const apiUrl = new URL('gxportal/xfpt/portal/getColumnList', rootUrl).href;
|
|
12
|
+
const apiArticleUrl = new URL('gxportal/xfpt/portal/viewArticleById', rootUrl).href;
|
|
13
|
+
const currentUrl = new URL(`gxportal/xfgl/portal/list.html?columnId=${id}`, rootUrl).href;
|
|
14
|
+
|
|
15
|
+
const { data: response } = await got.post(apiUrl, {
|
|
16
|
+
form: {
|
|
17
|
+
params: encodeURI(`{"columnId":"${id}"}`),
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
let $ = cheerio.load(response.articleListHtml);
|
|
22
|
+
|
|
23
|
+
let items = $('ul.list li a')
|
|
24
|
+
.slice(0, limit)
|
|
25
|
+
.toArray()
|
|
26
|
+
.map((item) => {
|
|
27
|
+
item = $(item);
|
|
28
|
+
|
|
29
|
+
return {
|
|
30
|
+
title: item.prop('title') ?? item.text(),
|
|
31
|
+
link: new URL(`gxportal/xfgl/portal/${item.prop('href')}`, rootUrl).href,
|
|
32
|
+
guid: item.prop('href').match(/articleId=(\w+)/)[1],
|
|
33
|
+
pubDate: parseDate(item.parent().find('span.times').text().replace(/\[|\]/g, '')),
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
items = await Promise.all(
|
|
38
|
+
items.map((item) =>
|
|
39
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
40
|
+
const { data: detailResponse } = await got.post(apiArticleUrl, {
|
|
41
|
+
form: {
|
|
42
|
+
params: encodeURI(`{"articleId":"${item.guid}","columnId":"${id}"}`),
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
const articleContent = detailResponse.article_content;
|
|
47
|
+
|
|
48
|
+
const content = cheerio.load(articleContent);
|
|
49
|
+
|
|
50
|
+
const matches = articleContent.match(/文章来源:(.*?)日期:(\d+-\d+-\d+)/);
|
|
51
|
+
|
|
52
|
+
item.title = content('div.article_title').contents().first().text() || item.title;
|
|
53
|
+
item.description = content('div.article_main').html();
|
|
54
|
+
item.author = matches[1].split(/&/)[0];
|
|
55
|
+
item.guid = `chinaisa-${item.guid}`;
|
|
56
|
+
item.pubDate = parseDate(matches[2]);
|
|
57
|
+
|
|
58
|
+
return item;
|
|
59
|
+
})
|
|
60
|
+
)
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
const subtitle = $('div.head-tit').text();
|
|
64
|
+
|
|
65
|
+
const { data: currentResponse } = await got(currentUrl);
|
|
66
|
+
|
|
67
|
+
$ = cheerio.load(currentResponse);
|
|
68
|
+
|
|
69
|
+
const icon = new URL($('link[rel="shortcut icon"]').prop('href'), rootUrl).href;
|
|
70
|
+
|
|
71
|
+
ctx.state.data = {
|
|
72
|
+
item: items,
|
|
73
|
+
title: `${$('title').text()} - ${subtitle}`,
|
|
74
|
+
link: currentUrl,
|
|
75
|
+
description: $('meta[name="description"]').prop('content'),
|
|
76
|
+
language: 'cn',
|
|
77
|
+
image: new URL('img/logo.jpg', rootUrl).href,
|
|
78
|
+
icon,
|
|
79
|
+
logo: icon,
|
|
80
|
+
subtitle,
|
|
81
|
+
allowEmpty: true,
|
|
82
|
+
};
|
|
83
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'chinaisa.org.cn': {
|
|
3
|
+
_name: '中国钢铁工业协会',
|
|
4
|
+
'.': [
|
|
5
|
+
{
|
|
6
|
+
title: '栏目',
|
|
7
|
+
docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-gang-tie-gong-ye-xie-hui-lan-mu',
|
|
8
|
+
source: ['/gxportal/xfgl/portal/list.html'],
|
|
9
|
+
target: (params, url) => {
|
|
10
|
+
url = new URL(url);
|
|
11
|
+
const columnId = url.searchParams.get('columnId');
|
|
12
|
+
|
|
13
|
+
return `/chinaisa${columnId ? `/${columnId}` : ''}`;
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const timezone = require('@/utils/timezone');
|
|
4
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
5
|
+
const { art } = require('@/utils/render');
|
|
6
|
+
const path = require('path');
|
|
7
|
+
|
|
8
|
+
module.exports = async (ctx) => {
|
|
9
|
+
const { id = '380' } = ctx.params;
|
|
10
|
+
|
|
11
|
+
const author = '中国气象局·天气预报';
|
|
12
|
+
const rootUrl = 'https://weather.cma.cn';
|
|
13
|
+
const apiUrl = new URL('api/channel', rootUrl).href;
|
|
14
|
+
const currentUrl = new URL(`web/channel-${id}.html`, rootUrl).href;
|
|
15
|
+
|
|
16
|
+
const { data: response } = await got(apiUrl, {
|
|
17
|
+
searchParams: {
|
|
18
|
+
id,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const data = response?.data?.pop() ?? {};
|
|
23
|
+
|
|
24
|
+
data.image = data.image?.replace(/\?.*$/, '') ?? undefined;
|
|
25
|
+
|
|
26
|
+
const { data: currentResponse } = await got(currentUrl);
|
|
27
|
+
|
|
28
|
+
const $ = cheerio.load(currentResponse);
|
|
29
|
+
|
|
30
|
+
const title = [
|
|
31
|
+
...new Set(
|
|
32
|
+
$('ol#breadcrumb li')
|
|
33
|
+
.slice(1)
|
|
34
|
+
.toArray()
|
|
35
|
+
.map((li) => $(li).text())
|
|
36
|
+
),
|
|
37
|
+
].join(' > ');
|
|
38
|
+
const description = $('div.xml').html();
|
|
39
|
+
const image = new URL($('li.active a img').prop('src'), rootUrl).href;
|
|
40
|
+
const icon = new URL($('link[rel="shortcut icon"]').prop('href'), rootUrl).href;
|
|
41
|
+
|
|
42
|
+
const items = data
|
|
43
|
+
? [
|
|
44
|
+
{
|
|
45
|
+
title: `${data.title} ${data.releaseTime}`,
|
|
46
|
+
link: new URL(data.link, rootUrl).href,
|
|
47
|
+
description: art(path.join(__dirname, 'templates/description.art'), {
|
|
48
|
+
description,
|
|
49
|
+
image: data.image
|
|
50
|
+
? {
|
|
51
|
+
src: new URL(data.image, rootUrl).href,
|
|
52
|
+
alt: data.title,
|
|
53
|
+
}
|
|
54
|
+
: undefined,
|
|
55
|
+
}),
|
|
56
|
+
author:
|
|
57
|
+
$(
|
|
58
|
+
$('div.col-xs-8 span')
|
|
59
|
+
.toArray()
|
|
60
|
+
.filter((a) => $(a).text().startsWith('来源'))
|
|
61
|
+
?.pop()
|
|
62
|
+
)
|
|
63
|
+
?.text()
|
|
64
|
+
?.split(/:/)
|
|
65
|
+
?.pop() || author,
|
|
66
|
+
guid: `cma${data.link}#${data.releaseTime.replace(/\s/g, '-')}`,
|
|
67
|
+
pubDate: timezone(parseDate(data.releaseTime), +8),
|
|
68
|
+
enclosure_url: new URL(data.image, rootUrl).href,
|
|
69
|
+
enclosure_type: data.image ? `image/${data.image.split(/\./).pop()}` : undefined,
|
|
70
|
+
},
|
|
71
|
+
]
|
|
72
|
+
: [];
|
|
73
|
+
|
|
74
|
+
ctx.state.data = {
|
|
75
|
+
item: items,
|
|
76
|
+
title: `${author} - ${title}`,
|
|
77
|
+
link: currentUrl,
|
|
78
|
+
description: $('meta[name="description"]').prop('content'),
|
|
79
|
+
language: 'zh',
|
|
80
|
+
image,
|
|
81
|
+
icon,
|
|
82
|
+
logo: icon,
|
|
83
|
+
subtitle: $('meta[name="keywords"]').prop('content'),
|
|
84
|
+
author,
|
|
85
|
+
allowEmpty: true,
|
|
86
|
+
};
|
|
87
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'cma.cn': {
|
|
3
|
+
_name: '中国气象局',
|
|
4
|
+
weather: [
|
|
5
|
+
{
|
|
6
|
+
title: '天气预报频道',
|
|
7
|
+
docs: 'https://docs.rsshub.app/routes/forecast#zhong-guo-qi-xiang-ju-tian-qi-yu-bao-pin-dao',
|
|
8
|
+
source: ['/web/*'],
|
|
9
|
+
target: (_, url) => {
|
|
10
|
+
url = new URL(url).href;
|
|
11
|
+
const idMatches = url.match(/channel-(\d+)\.html/);
|
|
12
|
+
|
|
13
|
+
return `/cma/channel${idMatches ? `/${idMatches[1]}` : ''}`;
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
|
|
4
|
+
const baseUrl = 'https://lock.cmpxchg8b.com/';
|
|
5
|
+
const title = 'cmpxchg8b';
|
|
6
|
+
|
|
7
|
+
module.exports = async (ctx) => {
|
|
8
|
+
const { data: response } = await got(baseUrl);
|
|
9
|
+
|
|
10
|
+
const $ = cheerio.load(response);
|
|
11
|
+
const author = $('p.author').text().trim();
|
|
12
|
+
const list = $('section#articles section')
|
|
13
|
+
.toArray()
|
|
14
|
+
.map((item) => {
|
|
15
|
+
item = $(item);
|
|
16
|
+
return {
|
|
17
|
+
title: item.find('li').text(),
|
|
18
|
+
link: new URL(item.find('li a').attr('href'), baseUrl).toString(),
|
|
19
|
+
author,
|
|
20
|
+
};
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const items = await Promise.all(
|
|
24
|
+
list.map((item) =>
|
|
25
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
26
|
+
const { data: response } = await got(item.link);
|
|
27
|
+
const $ = cheerio.load(response);
|
|
28
|
+
|
|
29
|
+
// extract the body but removing <nav> and <footer>
|
|
30
|
+
const body = $('body');
|
|
31
|
+
body.find('nav, footer').remove();
|
|
32
|
+
item.description = body.html();
|
|
33
|
+
return item;
|
|
34
|
+
})
|
|
35
|
+
)
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
ctx.state.data = {
|
|
39
|
+
title,
|
|
40
|
+
link: new URL('#articles', baseUrl).toString(),
|
|
41
|
+
item: items,
|
|
42
|
+
};
|
|
43
|
+
};
|
package/lib/v2/cna/index.js
CHANGED
|
@@ -38,6 +38,7 @@ module.exports = async (ctx) => {
|
|
|
38
38
|
url: item.link,
|
|
39
39
|
});
|
|
40
40
|
const content = cheerio.load(detailResponse.data);
|
|
41
|
+
content('div.SubscriptionInner').remove();
|
|
41
42
|
const topImage = content('.fullPic').html();
|
|
42
43
|
|
|
43
44
|
item.description = (topImage === null ? '' : topImage) + content('.paragraph').eq(0).html();
|
package/lib/v2/cna/maintainer.js
CHANGED
package/lib/v2/cna/radar.js
CHANGED
|
@@ -8,6 +8,12 @@ module.exports = {
|
|
|
8
8
|
source: ['/list/:id', '/topic/newstopic/:id'],
|
|
9
9
|
target: (params) => `/cna/${params.id.replace('.aspx', '')}`,
|
|
10
10
|
},
|
|
11
|
+
{
|
|
12
|
+
title: '分类(网页爬虫方法)',
|
|
13
|
+
docs: 'https://docs.rsshub.app/routes/traditional-media#zhong-yang-tong-xun-she',
|
|
14
|
+
source: ['/list/:id'],
|
|
15
|
+
target: (params) => `/cna/web/${params.id.replace('.aspx', '')}`,
|
|
16
|
+
},
|
|
11
17
|
],
|
|
12
18
|
},
|
|
13
19
|
};
|
package/lib/v2/cna/router.js
CHANGED
|
@@ -0,0 +1,62 @@
|
|
|
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 id = ctx.params.id || 'aall';
|
|
8
|
+
|
|
9
|
+
let rootUrl;
|
|
10
|
+
|
|
11
|
+
if (/^\d+$/.test(id)) {
|
|
12
|
+
rootUrl = `https://www.cna.com.tw/topic/newstopic/${id}.aspx`;
|
|
13
|
+
} else {
|
|
14
|
+
rootUrl = `https://www.cna.com.tw/list/${id}.aspx`;
|
|
15
|
+
}
|
|
16
|
+
const response = await got({
|
|
17
|
+
method: 'get',
|
|
18
|
+
url: rootUrl,
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const $ = cheerio.load(response.data);
|
|
22
|
+
const list = $('*:is(.pcBox .caItem, .mainList li a div) h2')
|
|
23
|
+
.slice(0, ctx.query.limit ? parseInt(ctx.query.limit) : 10)
|
|
24
|
+
.toArray()
|
|
25
|
+
.map((item) => {
|
|
26
|
+
item = $(item);
|
|
27
|
+
return {
|
|
28
|
+
title: item.text(),
|
|
29
|
+
link: item.parents('a').attr('href'),
|
|
30
|
+
pubDate: timezone(parseDate(item.next().text()), +8),
|
|
31
|
+
};
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
const items = await Promise.all(
|
|
35
|
+
list.map((item) =>
|
|
36
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
37
|
+
const detailResponse = await got({
|
|
38
|
+
method: 'get',
|
|
39
|
+
url: item.link,
|
|
40
|
+
});
|
|
41
|
+
const content = cheerio.load(detailResponse.data);
|
|
42
|
+
const topImage = content('.fullPic').html();
|
|
43
|
+
|
|
44
|
+
item.description = (topImage === null ? '' : topImage) + content('.paragraph').eq(0).html();
|
|
45
|
+
item.category = [
|
|
46
|
+
...content("meta[property='article:tag']")
|
|
47
|
+
.get()
|
|
48
|
+
.map((e) => e.attribs.content),
|
|
49
|
+
content('.active > a').text(),
|
|
50
|
+
];
|
|
51
|
+
|
|
52
|
+
return item;
|
|
53
|
+
})
|
|
54
|
+
)
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
ctx.state.data = {
|
|
58
|
+
title: $('title').text(),
|
|
59
|
+
link: rootUrl,
|
|
60
|
+
item: items,
|
|
61
|
+
};
|
|
62
|
+
};
|
package/lib/v2/cnbeta/type.js
CHANGED
|
@@ -15,18 +15,24 @@ module.exports = async (ctx) => {
|
|
|
15
15
|
const $ = cheerio.load(response.data);
|
|
16
16
|
|
|
17
17
|
const token = encodeURI($('meta[name="csrf-token"]').attr('content'));
|
|
18
|
-
const apiUrl = `${rootUrl}/home/more?&type=${$('div[data-type]').
|
|
18
|
+
const apiUrl = `${rootUrl}/home/more?&type=${$('div[data-type]').data('type')}&page=1&_csrf=${token}&_=${Date.now()}`;
|
|
19
19
|
|
|
20
20
|
response = await got(apiUrl);
|
|
21
21
|
|
|
22
|
-
const items =
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
const items = type
|
|
23
|
+
? response.data.result.list.map((item) => ({
|
|
24
|
+
title: item.title,
|
|
25
|
+
description: item.hometext,
|
|
26
|
+
author: item.source.split('@http')[0],
|
|
27
|
+
pubDate: timezone(parseDate(item.inputtime), +8),
|
|
28
|
+
link: item.url_show.startsWith('//') ? `https:${item.url_show}` : item.url_show.replace('http:', 'https:'),
|
|
29
|
+
category: item.label.name,
|
|
30
|
+
}))
|
|
31
|
+
: response.data.result.map((item) => ({
|
|
32
|
+
title: item.title,
|
|
33
|
+
link: item.url_show.startsWith('//') ? `https:${item.url_show}` : item.url_show.replace('http:', 'https:'),
|
|
34
|
+
category: item.label.name,
|
|
35
|
+
}));
|
|
30
36
|
|
|
31
37
|
ctx.state.data = {
|
|
32
38
|
title: $('title').text(),
|
package/lib/v2/cnbeta/utils.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
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
|
const rootUrl = 'https://www.cnbeta.com.tw';
|
|
5
7
|
|
|
@@ -17,6 +19,7 @@ module.exports = {
|
|
|
17
19
|
|
|
18
20
|
item.description = content('.article-summary').html() + content('.article-content').html();
|
|
19
21
|
item.author = content('header.title div.meta span.source').text();
|
|
22
|
+
item.pubDate ??= timezone(parseDate(content('.meta span').first().text(), 'YYYY年MM月DD日 HH:mm'), +8);
|
|
20
23
|
|
|
21
24
|
return item;
|
|
22
25
|
})
|
package/lib/v2/cqwu/index.js
CHANGED
|
@@ -4,8 +4,8 @@ const { parseDate } = require('@/utils/parse-date');
|
|
|
4
4
|
|
|
5
5
|
const host = 'https://www.cqwu.edu.cn';
|
|
6
6
|
const map = {
|
|
7
|
-
notify: '/
|
|
8
|
-
academiceve: '/
|
|
7
|
+
notify: '/channel_24894.html',
|
|
8
|
+
academiceve: '/channel_24895.html',
|
|
9
9
|
};
|
|
10
10
|
const titleMap = {
|
|
11
11
|
notify: '通知',
|
|
@@ -18,22 +18,25 @@ module.exports = async (ctx) => {
|
|
|
18
18
|
const title = '重文理' + titleMap[type] + '公告';
|
|
19
19
|
const response = await got.get(link);
|
|
20
20
|
const $ = cheerio.load(response.data);
|
|
21
|
-
const list = $('
|
|
21
|
+
const list = $('div[class="list"] ul').find('li');
|
|
22
22
|
|
|
23
23
|
const items = await Promise.all(
|
|
24
|
-
list.map(async (
|
|
24
|
+
list.map(async (i, item) => {
|
|
25
25
|
const pageUrl = host + $(item).find('a').attr('href');
|
|
26
|
-
const desc = await ctx.cache.tryGet(pageUrl, async () => {
|
|
26
|
+
const { desc, pubDate } = await ctx.cache.tryGet(pageUrl, async () => {
|
|
27
27
|
const page = await got.get(pageUrl);
|
|
28
28
|
const $ = cheerio.load(page.data);
|
|
29
|
-
return
|
|
29
|
+
return {
|
|
30
|
+
desc: $('.contentAtice').html(),
|
|
31
|
+
pubDate: parseDate($('.abs span:nth-child(1)').text().replace('发布时间:', '')),
|
|
32
|
+
};
|
|
30
33
|
});
|
|
31
34
|
|
|
32
35
|
return {
|
|
33
|
-
title: $(item).find('
|
|
36
|
+
title: $(item).find('.title').text(),
|
|
34
37
|
link: pageUrl,
|
|
35
38
|
description: desc,
|
|
36
|
-
pubDate
|
|
39
|
+
pubDate,
|
|
37
40
|
};
|
|
38
41
|
})
|
|
39
42
|
);
|
package/lib/v2/cqwu/radar.js
CHANGED
|
@@ -7,7 +7,7 @@ module.exports = {
|
|
|
7
7
|
docs: 'https://docs.rsshub.app/routes/university#chong-qing-wen-li-xue-yuan',
|
|
8
8
|
source: '/:type',
|
|
9
9
|
target: (params) => {
|
|
10
|
-
if (params.type === '
|
|
10
|
+
if (params.type === 'channel_24894.html') {
|
|
11
11
|
return '/cqwu/news/notify';
|
|
12
12
|
}
|
|
13
13
|
},
|
|
@@ -17,7 +17,7 @@ module.exports = {
|
|
|
17
17
|
docs: 'https://docs.rsshub.app/routes/university#chong-qing-wen-li-xue-yuan',
|
|
18
18
|
source: '/:type',
|
|
19
19
|
target: (params) => {
|
|
20
|
-
if (params.type === '
|
|
20
|
+
if (params.type === 'channel_24895.html') {
|
|
21
21
|
return '/cqwu/news/academiceve';
|
|
22
22
|
}
|
|
23
23
|
},
|