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
|
@@ -24,7 +24,9 @@ module.exports = async (ctx) => {
|
|
|
24
24
|
(item) =>
|
|
25
25
|
item.promotions &&
|
|
26
26
|
item.promotions.promotionalOffers &&
|
|
27
|
-
item.promotions.promotionalOffers
|
|
27
|
+
item.promotions.promotionalOffers.length &&
|
|
28
|
+
item.promotions.promotionalOffers[0].promotionalOffers[0].discountSetting.discountType === 'PERCENTAGE' &&
|
|
29
|
+
item.promotions.promotionalOffers[0].promotionalOffers[0].discountSetting.discountPercentage === 0 &&
|
|
28
30
|
dayjs(item.promotions.promotionalOffers[0].promotionalOffers[0].startDate) <= now &&
|
|
29
31
|
dayjs(item.promotions.promotionalOffers[0].promotionalOffers[0].endDate) > now
|
|
30
32
|
)
|
|
@@ -32,16 +34,19 @@ module.exports = async (ctx) => {
|
|
|
32
34
|
let link = `${rootUrl}/${locale}/p/`;
|
|
33
35
|
let contentUrl = `${contentBaseUrl}/products/`;
|
|
34
36
|
let isBundles = false;
|
|
35
|
-
item.categories.some((category) => {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
37
|
+
if (item.categories.some((category) => category.path === 'bundles')) {
|
|
38
|
+
link = `${rootUrl}/${locale}/bundles/`;
|
|
39
|
+
isBundles = true;
|
|
40
|
+
contentUrl = `${contentBaseUrl}/bundles/`;
|
|
41
|
+
}
|
|
42
|
+
const linkSlug =
|
|
43
|
+
item.catalogNs.mappings && item.catalogNs.mappings.length > 0
|
|
44
|
+
? item.catalogNs.mappings[0].pageSlug
|
|
45
|
+
: item.offerMappings && item.offerMappings.length > 0
|
|
46
|
+
? item.offerMappings[0].pageSlug
|
|
47
|
+
: item.productSlug
|
|
48
|
+
? item.productSlug
|
|
49
|
+
: item.urlSlug;
|
|
45
50
|
link += linkSlug;
|
|
46
51
|
contentUrl += linkSlug;
|
|
47
52
|
let description = item.description;
|
|
@@ -61,6 +66,7 @@ module.exports = async (ctx) => {
|
|
|
61
66
|
}
|
|
62
67
|
return false;
|
|
63
68
|
});
|
|
69
|
+
const endDate = dayjs(item.promotions.promotionalOffers[0].promotionalOffers[0].endDate).toISOString();
|
|
64
70
|
return {
|
|
65
71
|
title: item.title,
|
|
66
72
|
author: item.seller.name,
|
|
@@ -68,6 +74,7 @@ module.exports = async (ctx) => {
|
|
|
68
74
|
description: art(path.join(__dirname, 'templates/description.art'), {
|
|
69
75
|
description,
|
|
70
76
|
image,
|
|
77
|
+
endDate,
|
|
71
78
|
}),
|
|
72
79
|
pubDate: parseDate(item.promotions.promotionalOffers[0].promotionalOffers[0].startDate),
|
|
73
80
|
};
|
|
@@ -0,0 +1,85 @@
|
|
|
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
|
+
const md = require('markdown-it')({
|
|
8
|
+
html: true,
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
const ids = {
|
|
12
|
+
1: 0,
|
|
13
|
+
2: 2,
|
|
14
|
+
3: 1,
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
module.exports = async (ctx) => {
|
|
18
|
+
const { type, id, locale = 'zh-CN' } = ctx.params;
|
|
19
|
+
const limit = ctx.query.limit ? parseInt(ctx.query.limit, 10) : 50;
|
|
20
|
+
|
|
21
|
+
const searchParams = {
|
|
22
|
+
locale,
|
|
23
|
+
page: 0,
|
|
24
|
+
pagesize: limit,
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
if (type === 'wiki' && id) {
|
|
28
|
+
searchParams.subCatalogId = id;
|
|
29
|
+
} else if (type && id) {
|
|
30
|
+
searchParams[type] = id;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const rootUrl = 'https://farmatters.com';
|
|
34
|
+
const apiUrl = new URL('api/v1/doc/list', rootUrl).href;
|
|
35
|
+
const currentUrl = new URL(`${locale === 'zh-CN' ? '' : 'en/'}${type ? (type === 'wiki' ? 'wiki' : `tag/${id}`) : 'news'}`, rootUrl).href;
|
|
36
|
+
|
|
37
|
+
const { data: response } = await got(apiUrl, {
|
|
38
|
+
searchParams,
|
|
39
|
+
https: {
|
|
40
|
+
rejectUnauthorized: false,
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
const items = response.data.list.slice(0, limit).map((item) => ({
|
|
45
|
+
title: item.title,
|
|
46
|
+
link: new URL(`doc/${item.id}`, rootUrl).href,
|
|
47
|
+
description: art(path.join(__dirname, 'templates/description.art'), {
|
|
48
|
+
image: item.headImageUrl
|
|
49
|
+
? {
|
|
50
|
+
src: item.headImageUrl,
|
|
51
|
+
alt: item.title,
|
|
52
|
+
}
|
|
53
|
+
: undefined,
|
|
54
|
+
description: md.render(item.content ?? item.summary),
|
|
55
|
+
}),
|
|
56
|
+
author: item.author,
|
|
57
|
+
category: [item.catalogName, item.subCatalogName ?? undefined, ...(item.tags?.map((t) => t.tagName) ?? [])].filter((c) => c),
|
|
58
|
+
guid: `farmatters-${item.id}`,
|
|
59
|
+
pubDate: timezone(parseDate(item.createdAt), +8),
|
|
60
|
+
}));
|
|
61
|
+
|
|
62
|
+
const { data: currentResponse } = await got(currentUrl, {
|
|
63
|
+
https: {
|
|
64
|
+
rejectUnauthorized: false,
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
const $ = cheerio.load(currentResponse);
|
|
69
|
+
|
|
70
|
+
const subtitle = `${$('h4').first().text()}${type === 'wiki' ? ` - ${$('div.css-6f6728 div.MuiBox-root').eq(ids[id]).text()}` : ''}`;
|
|
71
|
+
const icon = new URL('favicon.ico', rootUrl).href;
|
|
72
|
+
|
|
73
|
+
ctx.state.data = {
|
|
74
|
+
item: items,
|
|
75
|
+
title: `${$('title').text().split(/-/)[0].trim()} - ${subtitle}`,
|
|
76
|
+
link: currentUrl,
|
|
77
|
+
description: $('meta[name="description"]').prop('content'),
|
|
78
|
+
language: $('html').prop('lang'),
|
|
79
|
+
image: new URL($('img').first().prop('src'), rootUrl).href,
|
|
80
|
+
icon,
|
|
81
|
+
logo: icon,
|
|
82
|
+
subtitle,
|
|
83
|
+
allowEmpty: true,
|
|
84
|
+
};
|
|
85
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'farmatters.com': {
|
|
3
|
+
_name: 'Farmatters',
|
|
4
|
+
'.': [
|
|
5
|
+
{
|
|
6
|
+
title: 'Viewpoint',
|
|
7
|
+
docs: 'https://docs.rsshub.app/routes/new-media#farmatters-viewpoint',
|
|
8
|
+
source: ['/news'],
|
|
9
|
+
target: '/farmatters/news',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
title: 'Exclusive',
|
|
13
|
+
docs: 'https://docs.rsshub.app/routes/new-media#farmatters-exclusive',
|
|
14
|
+
source: ['/exclusive'],
|
|
15
|
+
target: '/farmatters/exclusive',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
title: 'Tag',
|
|
19
|
+
docs: 'https://docs.rsshub.app/routes/new-media#farmatters-tag',
|
|
20
|
+
source: ['/tag/:id', '/:locale/tag/:id'],
|
|
21
|
+
target: (params) => {
|
|
22
|
+
const id = params.id;
|
|
23
|
+
const locale = params.locale;
|
|
24
|
+
|
|
25
|
+
return `/farmatters/tag${id ? `/${id}${locale ? `/${locale}` : ''}` : ''}`;
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
title: 'Wiki',
|
|
30
|
+
docs: 'https://docs.rsshub.app/routes/new-media#farmatters-wiki',
|
|
31
|
+
source: ['/wiki'],
|
|
32
|
+
target: '/farmatters/wiki',
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
};
|
|
@@ -8,12 +8,13 @@ module.exports = async (ctx) => {
|
|
|
8
8
|
method: 'get',
|
|
9
9
|
url: `https://addons.mozilla.org/zh-CN/firefox/addon/${id}/versions/`,
|
|
10
10
|
});
|
|
11
|
-
const data = JSON.parse(cheerio.load(response.data)('#redux-store-state').
|
|
11
|
+
const data = JSON.parse(cheerio.load(response.data)('#redux-store-state').text());
|
|
12
12
|
const info = data.addons.byID[data.addons.bySlug[id]];
|
|
13
13
|
const versionIds = data.versions.bySlug[id].versionIds;
|
|
14
14
|
|
|
15
15
|
ctx.state.data = {
|
|
16
16
|
title: `${info.name} 附加组件更新 - Firefox`,
|
|
17
|
+
description: info.summary || info.description,
|
|
17
18
|
link: `https://addons.mozilla.org/zh-CN/firefox/addon/${id}/versions/`,
|
|
18
19
|
item:
|
|
19
20
|
versionIds &&
|
|
@@ -27,6 +28,7 @@ module.exports = async (ctx) => {
|
|
|
27
28
|
pubDate: new Date(versionInfo.file.created),
|
|
28
29
|
guid: version,
|
|
29
30
|
author: info.authors.map((author) => author.name).join(', '),
|
|
31
|
+
category: info.categories,
|
|
30
32
|
};
|
|
31
33
|
}),
|
|
32
34
|
};
|
|
@@ -0,0 +1,38 @@
|
|
|
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://monitor.firefox.com';
|
|
8
|
+
|
|
9
|
+
const response = await got(`${baseUrl}/breaches`);
|
|
10
|
+
const $ = cheerio.load(response.data);
|
|
11
|
+
|
|
12
|
+
const items = $('.breach-card')
|
|
13
|
+
.toArray()
|
|
14
|
+
.map((item) => {
|
|
15
|
+
item = $(item);
|
|
16
|
+
item.find('.breach-detail-link').remove();
|
|
17
|
+
return {
|
|
18
|
+
title: item.find('h3 span').last().text(),
|
|
19
|
+
description: item.find('.breach-main').html(),
|
|
20
|
+
link: new URL(item.attr('href'), baseUrl).href,
|
|
21
|
+
pubDate: timezone(parseDate(item.find('.breach-main div dd').first().text()), 0),
|
|
22
|
+
category: item
|
|
23
|
+
.find('.breach-main div dd')
|
|
24
|
+
.last()
|
|
25
|
+
.text()
|
|
26
|
+
.split(',')
|
|
27
|
+
.map((x) => x.trim()),
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
ctx.state.data = {
|
|
32
|
+
title: $('title').text(),
|
|
33
|
+
description: $('head meta[name=description]').attr('content').trim(),
|
|
34
|
+
link: response.url,
|
|
35
|
+
item: items,
|
|
36
|
+
image: $('head meta[property=og:image]').attr('content'),
|
|
37
|
+
};
|
|
38
|
+
};
|
package/lib/v2/firefox/radar.js
CHANGED
|
@@ -10,4 +10,21 @@ module.exports = {
|
|
|
10
10
|
},
|
|
11
11
|
],
|
|
12
12
|
},
|
|
13
|
+
'mozilla.org': {
|
|
14
|
+
_name: 'Mozilla',
|
|
15
|
+
addons: [
|
|
16
|
+
{
|
|
17
|
+
title: 'Add-ons Update',
|
|
18
|
+
docs: 'https://docs.rsshub.app/routes/program-update#firefox',
|
|
19
|
+
source: ['/:lang/firefox/addon/:id/versions', '/:lang/firefox/addon/:id'],
|
|
20
|
+
target: '/firefox/addons/:id',
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
'.': [
|
|
24
|
+
{
|
|
25
|
+
title: 'Firefox New Release',
|
|
26
|
+
docs: 'https://docs.rsshub.app/routes/program-update#firefox',
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
},
|
|
13
30
|
};
|
|
@@ -8,18 +8,18 @@ module.exports = async (ctx) => {
|
|
|
8
8
|
devicePlatform = '';
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
const link =
|
|
11
|
+
const link = ['https://www.mozilla.org/en-US/firefox', devicePlatform, 'releasenotes/'].filter((x) => x).join('/');
|
|
12
12
|
const response = await got.get(link);
|
|
13
13
|
const $ = cheerio.load(response.data);
|
|
14
14
|
const version = $('.c-release-version').text();
|
|
15
15
|
const pubDate = new Date($('.c-release-date').text()).toUTCString();
|
|
16
16
|
|
|
17
17
|
ctx.state.data = {
|
|
18
|
-
title: `Firefox ${platform} release
|
|
18
|
+
title: `Firefox ${platform} release notes`,
|
|
19
19
|
link,
|
|
20
20
|
item: [
|
|
21
21
|
{
|
|
22
|
-
title: `Firefox ${platform} ${version} release
|
|
22
|
+
title: `Firefox ${platform} ${version} release notes`,
|
|
23
23
|
link,
|
|
24
24
|
description: $('.c-release-notes').html(),
|
|
25
25
|
guid: `${platform} ${version}`,
|
package/lib/v2/firefox/router.js
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
3
|
+
|
|
4
|
+
module.exports = async (ctx) => {
|
|
5
|
+
const { data: response } = await got(`https://fuliba2023.net/wp-json/wp/v2/posts`, {
|
|
6
|
+
searchParams: {
|
|
7
|
+
per_page: ctx.query.limit ?? 100,
|
|
8
|
+
_embed: 1,
|
|
9
|
+
},
|
|
10
|
+
});
|
|
11
|
+
const items = response.map((item) => ({
|
|
12
|
+
title: item.title.rendered,
|
|
13
|
+
link: item.link,
|
|
14
|
+
guid: item.guid.rendered,
|
|
15
|
+
description: item.content.rendered,
|
|
16
|
+
pubDate: parseDate(item.date_gmt),
|
|
17
|
+
author: item._embedded.author[0].name,
|
|
18
|
+
}));
|
|
19
|
+
|
|
20
|
+
ctx.state.data = {
|
|
21
|
+
title: '福利吧',
|
|
22
|
+
link: `https://fuliba2023.net`,
|
|
23
|
+
item: items,
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -100,6 +100,7 @@ module.exports = async (ctx) => {
|
|
|
100
100
|
description: cover + content,
|
|
101
101
|
link: articleUrl,
|
|
102
102
|
guid: articleUrl,
|
|
103
|
+
pubDate: new Date(articleData.attributes['published-at']),
|
|
103
104
|
};
|
|
104
105
|
return category === 'news' ? basicItem : { ...basicItem, category: item.category };
|
|
105
106
|
});
|
package/lib/v2/gcores/radio.js
CHANGED
|
@@ -20,6 +20,7 @@ module.exports = async (ctx) => {
|
|
|
20
20
|
api.searchParams.set('page[limit]', limit);
|
|
21
21
|
api.searchParams.set('sort', '-published-at');
|
|
22
22
|
api.searchParams.set('filter[list-all]', '0');
|
|
23
|
+
api.searchParams.set('filter[is-require-privilege]', '0');
|
|
23
24
|
api.searchParams.set('fields[radios]', 'title,cover,published-at,duration,content,media');
|
|
24
25
|
const { data, included } = await get(api);
|
|
25
26
|
|
|
@@ -0,0 +1,72 @@
|
|
|
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 = '10' } = ctx.params;
|
|
7
|
+
const limit = ctx.query.limit ? parseInt(ctx.query.limit, 10) : 15;
|
|
8
|
+
|
|
9
|
+
const rootUrl = 'http://www.gdsrx.org.cn';
|
|
10
|
+
const currentUrl = new URL(`portal/list/index/id/${id}.html`, rootUrl).href;
|
|
11
|
+
|
|
12
|
+
const { data: response } = await got(currentUrl);
|
|
13
|
+
|
|
14
|
+
const $ = cheerio.load(response);
|
|
15
|
+
|
|
16
|
+
let items = $('a.xn-item, a.t-item')
|
|
17
|
+
.slice(0, limit)
|
|
18
|
+
.toArray()
|
|
19
|
+
.map((item) => {
|
|
20
|
+
item = $(item);
|
|
21
|
+
|
|
22
|
+
return {
|
|
23
|
+
title: item.find('div.xn-d, div.t-e').text(),
|
|
24
|
+
link: new URL(item.prop('href'), rootUrl).href,
|
|
25
|
+
pubDate: parseDate(item.find('div.xn-time, div.t-f').text()),
|
|
26
|
+
};
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
items = await Promise.all(
|
|
30
|
+
items.map((item) =>
|
|
31
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
32
|
+
const { data: detailResponse } = await got(item.link);
|
|
33
|
+
|
|
34
|
+
const content = cheerio.load(detailResponse);
|
|
35
|
+
|
|
36
|
+
const categories = content('a.nav-a')
|
|
37
|
+
.slice(1)
|
|
38
|
+
.toArray()
|
|
39
|
+
.map((c) => content(c).text());
|
|
40
|
+
|
|
41
|
+
item.title = categories.pop() || content('div.u-c').text();
|
|
42
|
+
item.description = content('div.u-f').html();
|
|
43
|
+
item.author = content('.author').text();
|
|
44
|
+
item.category = categories;
|
|
45
|
+
item.pubDate = parseDate(content('div.u-d').text());
|
|
46
|
+
|
|
47
|
+
return item;
|
|
48
|
+
})
|
|
49
|
+
)
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
const author = $('title').text();
|
|
53
|
+
const image = $('a.h-g img').prop('src');
|
|
54
|
+
const icon = new URL('favicon.ico', rootUrl).href;
|
|
55
|
+
const subtitle = $('a.nav-a')
|
|
56
|
+
.toArray()
|
|
57
|
+
.map((c) => $(c).text())
|
|
58
|
+
.pop();
|
|
59
|
+
|
|
60
|
+
ctx.state.data = {
|
|
61
|
+
item: items,
|
|
62
|
+
title: `${author} - ${subtitle}`,
|
|
63
|
+
link: currentUrl,
|
|
64
|
+
description: $('meta[name="description"]').prop('content'),
|
|
65
|
+
language: 'zh',
|
|
66
|
+
image,
|
|
67
|
+
icon,
|
|
68
|
+
logo: icon,
|
|
69
|
+
subtitle,
|
|
70
|
+
author,
|
|
71
|
+
};
|
|
72
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'gdsrx.org.cn': {
|
|
3
|
+
_name: '广东省食品药品审评认证技术协会',
|
|
4
|
+
'.': [
|
|
5
|
+
{
|
|
6
|
+
title: '栏目',
|
|
7
|
+
docs: 'https://docs.rsshub.app/routes/other#guang-dong-sheng-shi-pin-yao-pin-shen-ping-ren-zheng-ji-shu-xie-hui-lan-mu',
|
|
8
|
+
source: ['/portal/list/index/id'],
|
|
9
|
+
target: (_, url) => {
|
|
10
|
+
url = new URL(url);
|
|
11
|
+
|
|
12
|
+
const idMatches = url.href.match(/\/id\/(\d+)\.html/);
|
|
13
|
+
|
|
14
|
+
return `/gdsrx${idMatches ? `/${idMatches[1]}` : ''}`;
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
title: '法规文库',
|
|
19
|
+
docs: 'https://docs.rsshub.app/routes/other#guang-dong-sheng-shi-pin-yao-pin-shen-ping-ren-zheng-ji-shu-xie-hui-lan-mu',
|
|
20
|
+
source: ['/portal/list/index/id/10.html'],
|
|
21
|
+
target: '/gdsrx/10',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
title: '法规资讯',
|
|
25
|
+
docs: 'https://docs.rsshub.app/routes/other#guang-dong-sheng-shi-pin-yao-pin-shen-ping-ren-zheng-ji-shu-xie-hui-lan-mu',
|
|
26
|
+
source: ['/portal/list/index/id/12.html'],
|
|
27
|
+
target: '/gdsrx/12',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
title: '专家供稿',
|
|
31
|
+
docs: 'https://docs.rsshub.app/routes/other#guang-dong-sheng-shi-pin-yao-pin-shen-ping-ren-zheng-ji-shu-xie-hui-lan-mu',
|
|
32
|
+
source: ['/portal/list/index/id/13.html'],
|
|
33
|
+
target: '/gdsrx/13',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
title: '协会动态 会员动态',
|
|
37
|
+
docs: 'https://docs.rsshub.app/routes/other#guang-dong-sheng-shi-pin-yao-pin-shen-ping-ren-zheng-ji-shu-xie-hui-lan-mu',
|
|
38
|
+
source: ['/portal/list/index/id/20.html'],
|
|
39
|
+
target: '/gdsrx/20',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
title: '协会动态',
|
|
43
|
+
docs: 'https://docs.rsshub.app/routes/other#guang-dong-sheng-shi-pin-yao-pin-shen-ping-ren-zheng-ji-shu-xie-hui-lan-mu',
|
|
44
|
+
source: ['/portal/list/index/id/37.html'],
|
|
45
|
+
target: '/gdsrx/37',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
title: '协会通知公告',
|
|
49
|
+
docs: 'https://docs.rsshub.app/routes/other#guang-dong-sheng-shi-pin-yao-pin-shen-ping-ren-zheng-ji-shu-xie-hui-lan-mu',
|
|
50
|
+
source: ['/portal/list/index/id/38.html'],
|
|
51
|
+
target: '/gdsrx/38',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
title: '会员动态',
|
|
55
|
+
docs: 'https://docs.rsshub.app/routes/other#guang-dong-sheng-shi-pin-yao-pin-shen-ping-ren-zheng-ji-shu-xie-hui-lan-mu',
|
|
56
|
+
source: ['/portal/list/index/id/39.html'],
|
|
57
|
+
target: '/gdsrx/39',
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
},
|
|
61
|
+
};
|
|
@@ -2,53 +2,61 @@ const got = require('@/utils/got');
|
|
|
2
2
|
const cheerio = require('cheerio');
|
|
3
3
|
const { parseDate } = require('@/utils/parse-date');
|
|
4
4
|
|
|
5
|
+
const {
|
|
6
|
+
apiSlug,
|
|
7
|
+
rootUrl,
|
|
8
|
+
|
|
9
|
+
bakeFilterSearchParams,
|
|
10
|
+
bakeFiltersWithPair,
|
|
11
|
+
bakeUrl,
|
|
12
|
+
fetchData,
|
|
13
|
+
getFilterNameForTitle,
|
|
14
|
+
getFilterParamsForUrl,
|
|
15
|
+
parseFilterStr,
|
|
16
|
+
} = require('./util');
|
|
17
|
+
|
|
5
18
|
module.exports = async (ctx) => {
|
|
6
|
-
const
|
|
19
|
+
const { filter } = ctx.params;
|
|
20
|
+
const limit = ctx.query.limit ? parseInt(ctx.query.limit, 10) : 50;
|
|
7
21
|
|
|
8
|
-
const
|
|
9
|
-
const
|
|
22
|
+
const filters = parseFilterStr(filter);
|
|
23
|
+
const filtersWithPair = await bakeFiltersWithPair(filters);
|
|
10
24
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
url: currentUrl,
|
|
14
|
-
});
|
|
25
|
+
const searchParams = bakeFilterSearchParams(filters, 'name', false);
|
|
26
|
+
const apiSearchParams = bakeFilterSearchParams(filtersWithPair, 'id', true);
|
|
15
27
|
|
|
16
|
-
|
|
28
|
+
apiSearchParams.append('_embed', 'true');
|
|
29
|
+
apiSearchParams.append('per_page', limit);
|
|
17
30
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
.map((item) => {
|
|
21
|
-
item = $(item);
|
|
31
|
+
const apiUrl = bakeUrl(`${apiSlug}/posts`, rootUrl, apiSearchParams);
|
|
32
|
+
const currentUrl = bakeUrl(getFilterParamsForUrl(filtersWithPair) ?? '', rootUrl, searchParams);
|
|
22
33
|
|
|
23
|
-
|
|
24
|
-
title: item.text(),
|
|
25
|
-
link: item.attr('href'),
|
|
26
|
-
};
|
|
27
|
-
});
|
|
34
|
+
const { data: response } = await got(apiUrl);
|
|
28
35
|
|
|
29
|
-
items =
|
|
30
|
-
|
|
31
|
-
ctx.cache.tryGet(item.link, async () => {
|
|
32
|
-
const detailResponse = await got({
|
|
33
|
-
method: 'get',
|
|
34
|
-
url: item.link,
|
|
35
|
-
});
|
|
36
|
+
const items = (Array.isArray(response) ? response : JSON.parse(response.match(/(\[.*\])$/)[1])).slice(0, limit).map((item) => {
|
|
37
|
+
const terminologies = item._embedded['wp:term'];
|
|
36
38
|
|
|
37
|
-
|
|
39
|
+
const content = cheerio.load(item.content?.rendered ?? item.content);
|
|
38
40
|
|
|
39
|
-
|
|
41
|
+
content('div.mycred-sell-this-wrapper').prevUntil('hr').nextAll().remove();
|
|
40
42
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
return {
|
|
44
|
+
title: item.title?.rendered ?? item.title,
|
|
45
|
+
link: item.link,
|
|
46
|
+
description: content.html(),
|
|
47
|
+
author: item._embedded.author.map((a) => a.name).join('/'),
|
|
48
|
+
category: [...new Set([].concat(...terminologies).map((c) => c.name))],
|
|
49
|
+
guid: item.guid?.rendered ?? item.guid,
|
|
50
|
+
pubDate: parseDate(item.date_gmt),
|
|
51
|
+
updated: parseDate(item.modified_gmt),
|
|
52
|
+
};
|
|
53
|
+
});
|
|
43
54
|
|
|
44
|
-
|
|
45
|
-
})
|
|
46
|
-
)
|
|
47
|
-
);
|
|
55
|
+
const subtitle = getFilterNameForTitle(filtersWithPair);
|
|
48
56
|
|
|
49
57
|
ctx.state.data = {
|
|
50
|
-
|
|
51
|
-
link: currentUrl,
|
|
58
|
+
...(await fetchData(currentUrl)),
|
|
52
59
|
item: items,
|
|
60
|
+
title: `Getitfree${subtitle ? ` | ${subtitle}` : ''}`,
|
|
53
61
|
};
|
|
54
62
|
};
|