rsshub 1.0.0-master.f7add90 → 1.0.0-master.f7bfacc
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 +0 -8
- package/lib/app.js +2 -0
- package/lib/config.js +17 -1
- package/lib/middleware/cache/memory.js +2 -2
- package/lib/middleware/template.js +14 -1
- package/lib/radar-rules.js +0 -76
- package/lib/radar.js +22 -3
- package/lib/router.js +27 -30
- package/lib/routes/axis-studios/work.js +0 -0
- package/lib/routes/blow-studio/work.js +0 -0
- package/lib/routes/blur-studio/index.js +0 -0
- package/lib/routes/digic-pictures/index.js +0 -0
- package/lib/routes/gov/hunan/notice.js +1 -1
- package/lib/routes/method-studios/index.js +0 -0
- package/lib/routes/ps/product.js +0 -0
- package/lib/routes/unit-image/films.js +0 -0
- package/lib/static/logo.png +0 -0
- package/lib/utils/puppeteer.js +2 -2
- package/lib/utils/request-wrapper.js +2 -2
- package/lib/v2/141jav/index.js +71 -0
- package/lib/v2/141jav/maintainer.js +3 -0
- package/lib/v2/141jav/radar.js +40 -0
- package/lib/v2/141jav/router.js +3 -0
- package/lib/v2/141jav/templates/description.art +47 -0
- package/lib/v2/141ppv/index.js +71 -0
- package/lib/v2/141ppv/maintainer.js +3 -0
- package/lib/v2/141ppv/radar.js +40 -0
- package/lib/v2/141ppv/router.js +3 -0
- package/lib/v2/141ppv/templates/description.art +47 -0
- package/lib/v2/3dmgame/game.js +39 -0
- package/lib/v2/3dmgame/maintainer.js +4 -0
- package/lib/v2/3dmgame/news_center.js +42 -0
- package/lib/v2/3dmgame/radar.js +19 -0
- package/lib/v2/3dmgame/router.js +4 -0
- package/lib/v2/3dmgame/utils.js +30 -0
- package/lib/v2/4ksj/forum.js +128 -0
- package/lib/v2/4ksj/maintainer.js +3 -0
- package/lib/v2/4ksj/radar.js +13 -0
- package/lib/v2/4ksj/router.js +3 -0
- package/lib/v2/4ksj/templates/description.art +56 -0
- package/lib/v2/5eplay/index.js +100 -0
- package/lib/v2/5eplay/maintainer.js +3 -0
- package/lib/v2/5eplay/radar.js +13 -0
- package/lib/v2/5eplay/router.js +3 -0
- package/lib/v2/5eplay/utils.js +35 -0
- package/lib/v2/aeon/category.js +27 -0
- package/lib/v2/aeon/maintainer.js +4 -0
- package/lib/v2/aeon/radar.js +19 -0
- package/lib/v2/aeon/router.js +4 -0
- package/lib/v2/aeon/templates/essay.art +3 -0
- package/lib/v2/aeon/templates/video.art +10 -0
- package/lib/v2/aeon/type.js +29 -0
- package/lib/v2/aeon/utils.js +50 -0
- package/lib/v2/aisixiang/column.js +36 -0
- package/lib/v2/aisixiang/maintainer.js +6 -0
- package/lib/v2/aisixiang/radar.js +29 -0
- package/lib/v2/aisixiang/router.js +6 -0
- package/lib/v2/aisixiang/thinktank.js +49 -0
- package/lib/v2/aisixiang/toplist.js +37 -0
- package/lib/v2/aisixiang/utils.js +37 -0
- package/lib/v2/aliresearch/information.js +57 -0
- package/lib/v2/aliresearch/maintainer.js +3 -0
- package/lib/v2/aliresearch/radar.js +13 -0
- package/lib/v2/aliresearch/router.js +3 -0
- package/lib/v2/amazon/kindle-software-updates.js +1 -0
- package/lib/v2/atcoder/radar.js +1 -1
- package/lib/v2/bad/index.js +58 -0
- package/lib/v2/bad/maintainer.js +3 -0
- package/lib/v2/bad/radar.js +13 -0
- package/lib/v2/bad/router.js +3 -0
- package/lib/v2/baozimh/index.js +1 -1
- package/lib/v2/bilibili/cache.js +17 -5
- package/lib/v2/bilibili/hotSearch.js +5 -1
- package/lib/v2/bilibili/userChannel.js +2 -1
- package/lib/v2/bilibili/userCollection.js +3 -1
- package/lib/v2/bilibili/utils.js +3 -3
- package/lib/v2/bilibili/video-all.js +7 -2
- package/lib/v2/bilibili/video.js +1 -1
- package/lib/v2/bilibili/vsearch.js +1 -1
- package/lib/v2/bjsk/keti.js +54 -0
- package/lib/v2/bjsk/maintainer.js +1 -0
- package/lib/v2/bjsk/radar.js +8 -0
- package/lib/v2/bjsk/router.js +1 -0
- package/lib/v2/bmkg/earthquake.js +29 -0
- package/lib/v2/bmkg/maintainer.js +4 -0
- package/lib/v2/bmkg/news.js +42 -0
- package/lib/v2/bmkg/radar.js +19 -0
- package/lib/v2/bmkg/router.js +4 -0
- package/lib/v2/chinathinktanks/radar.js +1 -1
- package/lib/v2/cls/depth.js +34 -32
- package/lib/v2/cls/hot.js +38 -29
- package/lib/v2/cls/maintainer.js +1 -1
- package/lib/v2/cls/radar.js +1 -1
- package/lib/v2/cls/telegraph.js +25 -23
- package/lib/v2/cls/templates/depth.art +3 -3
- package/lib/v2/cls/templates/telegraph.art +5 -5
- package/lib/v2/cls/utils.js +12 -6
- package/lib/v2/cneb/maintainer.js +4 -0
- package/lib/v2/cneb/radar.js +19 -0
- package/lib/v2/cneb/router.js +5 -0
- package/lib/v2/cneb/yjxw.js +72 -0
- package/lib/v2/cneb/yjxx.js +50 -0
- package/lib/v2/cnki/author.js +38 -26
- package/lib/v2/cnki/maintainer.js +1 -1
- package/lib/v2/comicat/maintainer.js +3 -0
- package/lib/v2/comicat/radar.js +11 -0
- package/lib/v2/comicat/router.js +3 -0
- package/lib/v2/comicat/search.js +42 -0
- package/lib/v2/coomer/utils.js +3 -1
- package/lib/v2/cqgas/maintainer.js +3 -0
- package/lib/v2/cqgas/radar.js +13 -0
- package/lib/v2/cqgas/router.js +3 -0
- package/lib/v2/cqgas/tqtz.js +36 -0
- package/lib/v2/cssn/iolaw.js +38 -0
- package/lib/v2/cssn/maintainer.js +3 -0
- package/lib/v2/cssn/radar.js +11 -0
- package/lib/v2/cssn/router.js +3 -0
- package/lib/v2/daily/discussed.js +73 -0
- package/lib/v2/daily/index.js +83 -0
- package/lib/v2/daily/maintainer.js +5 -0
- package/lib/v2/daily/radar.js +25 -0
- package/lib/v2/daily/router.js +5 -0
- package/lib/v2/daily/upvoted.js +77 -0
- package/lib/v2/daily/utils.js +39 -0
- package/lib/v2/dblp/maintainer.js +3 -0
- package/lib/v2/dblp/publication.js +70 -0
- package/lib/v2/dblp/radar.js +13 -0
- package/lib/v2/dblp/router.js +3 -0
- package/lib/v2/deadline/maintainer.js +4 -0
- package/lib/v2/deadline/posts.js +53 -0
- package/lib/v2/deadline/radar.js +13 -0
- package/lib/v2/deadline/router.js +3 -0
- package/lib/v2/deadline/templates/desc.art +10 -0
- package/lib/v2/devolverdigital/blog.js +50 -0
- package/lib/v2/devolverdigital/maintainer.js +3 -0
- package/lib/v2/devolverdigital/radar.js +13 -0
- package/lib/v2/devolverdigital/router.js +3 -0
- package/lib/v2/dhu/maintainer.js +1 -0
- package/lib/v2/dhu/radar.js +6 -0
- package/lib/v2/dhu/router.js +1 -0
- package/lib/v2/dhu/yjs/zs.js +46 -0
- package/lib/v2/discord/channel.js +8 -8
- package/lib/v2/discord/maintainer.js +1 -1
- package/lib/v2/discord/radar.js +2 -2
- package/lib/v2/discord/router.js +1 -1
- package/lib/v2/domp4/detail.js +26 -0
- package/lib/v2/dorohedoro/maintainer.js +3 -0
- package/lib/v2/dorohedoro/news.js +69 -0
- package/lib/v2/dorohedoro/radar.js +13 -0
- package/lib/v2/dorohedoro/router.js +3 -0
- package/lib/v2/duozhuayu/maintainer.js +3 -0
- package/lib/v2/duozhuayu/radar.js +13 -0
- package/lib/v2/duozhuayu/router.js +3 -0
- package/lib/{routes → v2}/duozhuayu/search.js +23 -32
- package/lib/v2/duozhuayu/templates/book.art +10 -0
- package/lib/v2/dxy/maintainer.js +4 -0
- package/lib/v2/dxy/profile/thread.js +82 -0
- package/lib/v2/dxy/radar.js +21 -0
- package/lib/v2/dxy/router.js +4 -0
- package/lib/v2/dxy/special.js +79 -0
- package/lib/v2/dxy/utils.js +72 -0
- package/lib/v2/eastmoney/maintainer.js +1 -0
- package/lib/v2/eastmoney/radar.js +8 -0
- package/lib/v2/eastmoney/report/index.js +41 -0
- package/lib/v2/eastmoney/router.js +2 -1
- package/lib/v2/embassy/radar.js +1 -1
- package/lib/v2/embassy/supportedList.js +4 -4
- package/lib/v2/firecore/index.js +37 -0
- package/lib/v2/firecore/maintainer.js +3 -0
- package/lib/v2/firecore/radar.js +13 -0
- package/lib/v2/firecore/router.js +3 -0
- package/lib/v2/flyert/creditcard.js +3 -0
- package/lib/v2/flyert/utils.js +14 -8
- package/lib/v2/followin/index.js +35 -0
- package/lib/v2/followin/kol.js +25 -0
- package/lib/v2/followin/maintainer.js +7 -0
- package/lib/v2/followin/news.js +21 -0
- package/lib/v2/followin/radar.js +37 -0
- package/lib/v2/followin/router.js +7 -0
- package/lib/v2/followin/tag.js +44 -0
- package/lib/v2/followin/templates/thread.art +15 -0
- package/lib/v2/followin/topic.js +25 -0
- package/lib/v2/followin/utils.js +84 -0
- package/lib/v2/freebuf/index.js +41 -0
- package/lib/v2/freebuf/maintainer.js +3 -0
- package/lib/v2/freebuf/radar.js +13 -0
- package/lib/v2/freebuf/router.js +3 -0
- package/lib/v2/freecomputerbooks/index.js +41 -13
- package/lib/v2/freecomputerbooks/templates/desc.art +3 -0
- package/lib/v2/futunn/main.js +67 -0
- package/lib/v2/futunn/maintainer.js +3 -0
- package/lib/v2/futunn/radar.js +13 -0
- package/lib/v2/futunn/router.js +5 -0
- package/lib/v2/futunn/templates/description.art +6 -0
- package/lib/v2/fzmtr/announcements.js +38 -0
- package/lib/v2/fzmtr/maintainer.js +3 -0
- package/lib/v2/fzmtr/radar.js +11 -0
- package/lib/v2/fzmtr/router.js +3 -0
- package/lib/v2/github/gist.js +35 -0
- package/lib/v2/github/maintainer.js +1 -0
- package/lib/v2/github/radar.js +8 -0
- package/lib/v2/github/router.js +1 -0
- package/lib/v2/gov/cac/index.js +64 -0
- package/lib/v2/gov/ccdi/index.js +1 -1
- package/lib/v2/gov/ccdi/utils.js +1 -1
- package/lib/v2/gov/chongqing/rsks.js +38 -0
- package/lib/v2/gov/maintainer.js +2 -0
- package/lib/v2/gov/news/index.js +10 -5
- package/lib/v2/gov/radar.js +23 -1
- package/lib/v2/gov/router.js +2 -0
- package/lib/v2/gq/tw/index.js +1 -1
- package/lib/v2/guangzhoumetro/maintainer.js +3 -0
- package/lib/v2/guangzhoumetro/news.js +37 -0
- package/lib/v2/guangzhoumetro/radar.js +11 -0
- package/lib/v2/guangzhoumetro/router.js +3 -0
- package/lib/v2/hnu/careers.js +33 -0
- package/lib/v2/hnu/maintainer.js +3 -0
- package/lib/v2/hnu/radar.js +12 -0
- package/lib/v2/hnu/router.js +3 -0
- package/lib/v2/hust/aia/news.js +0 -0
- package/lib/v2/hust/aia/notice.js +0 -0
- package/lib/v2/i-cable/category.js +74 -0
- package/lib/v2/i-cable/maintainer.js +3 -0
- package/lib/v2/i-cable/radar.js +13 -0
- package/lib/v2/i-cable/router.js +3 -0
- package/lib/v2/i-cable/templates/desc.art +8 -0
- package/lib/v2/ibc/maintainer.js +4 -0
- package/lib/{routes/maitta/index.js → v2/ibc/maitta.js} +11 -8
- package/lib/v2/ibc/radar.js +19 -0
- package/lib/v2/ibc/radio.js +73 -0
- package/lib/v2/ibc/router.js +4 -0
- package/lib/v2/ibc/templates/description.art +6 -0
- package/lib/v2/instructables/projects.js +1 -1
- package/lib/v2/ithome/radar.js +3 -3
- package/lib/v2/iwara/index.js +36 -24
- package/lib/v2/iwara/radar.js +1 -1
- package/lib/v2/iwara/subscriptions.js +131 -32
- package/lib/v2/iwara/templates/subscriptions.art +1 -1
- package/lib/v2/line/publisher.js +1 -1
- package/lib/v2/mdpi/maintainer.js +0 -0
- package/lib/v2/mdpi/radar.js +0 -0
- package/lib/v2/mdpi/router.js +0 -0
- package/lib/v2/mdpi/templates/description.art +0 -0
- package/lib/v2/medium/following.js +31 -0
- package/lib/v2/medium/for-you.js +31 -0
- package/lib/v2/medium/graphql.js +190 -0
- package/lib/v2/medium/list.js +32 -0
- package/lib/v2/medium/maintainer.js +6 -0
- package/lib/v2/medium/parse-article.js +60 -0
- package/lib/v2/medium/radar.js +23 -0
- package/lib/v2/medium/router.js +6 -0
- package/lib/v2/medium/tag.js +32 -0
- package/lib/v2/mihoyo/maintainer.js +1 -0
- package/lib/v2/mihoyo/radar.js +16 -0
- package/lib/v2/mihoyo/router.js +1 -0
- package/lib/v2/mihoyo/sr/news.js +71 -0
- package/lib/v2/mihoyo/templates/ys.art +4 -0
- package/lib/v2/mihoyo/ys/news.js +132 -52
- package/lib/v2/nationalgeographic/latest-stories.js +56 -0
- package/lib/v2/nationalgeographic/maintainer.js +3 -0
- package/lib/v2/nationalgeographic/radar.js +13 -0
- package/lib/v2/nationalgeographic/router.js +3 -0
- package/lib/v2/nationalgeographic/templates/stories.art +44 -0
- package/lib/v2/nenu/maintainer.js +4 -0
- package/lib/v2/nenu/radar.js +21 -0
- package/lib/v2/nenu/router.js +4 -0
- package/lib/v2/nenu/sohac.js +60 -0
- package/lib/v2/nenu/yjsy.js +64 -0
- package/lib/v2/newzmz/index.js +55 -44
- package/lib/v2/newzmz/maintainer.js +1 -1
- package/lib/v2/newzmz/radar.js +1 -1
- package/lib/v2/newzmz/router.js +2 -1
- package/lib/v2/newzmz/templates/description.art +7 -0
- package/lib/v2/newzmz/view.js +32 -17
- package/lib/v2/nhentai/util.js +2 -1
- package/lib/v2/nikkei/cn/index.js +2 -2
- package/lib/v2/nju/zcc.js +7 -13
- package/lib/v2/notateslaapp/maintainer.js +3 -0
- package/lib/v2/notateslaapp/radar.js +13 -0
- package/lib/v2/notateslaapp/router.js +3 -0
- package/lib/{routes/tesla → v2/notateslaapp}/update.js +6 -12
- package/lib/v2/notefolio/maintainer.js +3 -0
- package/lib/v2/notefolio/radar.js +13 -0
- package/lib/v2/notefolio/router.js +3 -0
- package/lib/v2/notefolio/search.js +145 -0
- package/lib/v2/notefolio/templates/search.art +9 -0
- package/lib/v2/notion/database.js +161 -0
- package/lib/v2/notion/maintainer.js +3 -0
- package/lib/v2/notion/radar.js +13 -0
- package/lib/v2/notion/router.js +3 -0
- package/lib/v2/nytimes/author.js +1 -1
- package/lib/v2/oeeee/app/channel.js +36 -0
- package/lib/v2/oeeee/app/reporter.js +30 -0
- package/lib/v2/oeeee/maintainer.js +5 -0
- package/lib/v2/oeeee/radar.js +12 -0
- package/lib/v2/oeeee/router.js +5 -0
- package/lib/v2/oeeee/templates/description.art +7 -0
- package/lib/v2/oeeee/utils.js +41 -0
- package/lib/v2/oeeee/web.js +36 -0
- package/lib/v2/openai/blog.js +3 -56
- package/lib/v2/openai/common.js +72 -0
- package/lib/v2/openai/maintainer.js +1 -0
- package/lib/v2/openai/radar.js +8 -0
- package/lib/v2/openai/research.js +32 -0
- package/lib/v2/openai/router.js +1 -0
- package/lib/v2/pumc/maintainer.js +3 -0
- package/lib/v2/pumc/mdadmission.js +62 -0
- package/lib/v2/pumc/radar.js +13 -0
- package/lib/v2/pumc/router.js +3 -0
- package/lib/v2/rattibha/maintainer.js +3 -0
- package/lib/v2/rattibha/radar.js +13 -0
- package/lib/v2/rattibha/router.js +3 -0
- package/lib/v2/rattibha/user.js +45 -0
- package/lib/v2/readhub/index.js +1 -1
- package/lib/{routes → v2}/right/forum.js +21 -23
- package/lib/v2/right/maintainer.js +3 -0
- package/lib/v2/right/radar.js +13 -0
- package/lib/v2/right/router.js +3 -0
- package/lib/v2/rsshub/radar.js +2 -2
- package/lib/v2/sdust/maintainer.js +3 -0
- package/lib/v2/sdust/radar.js +13 -0
- package/lib/v2/sdust/router.js +3 -0
- package/lib/v2/sdust/yjsy/zhaosheng.js +52 -0
- package/lib/v2/sehuatang/maintainer.js +1 -0
- package/lib/v2/sehuatang/router.js +1 -0
- package/lib/v2/sehuatang/user.js +113 -0
- package/lib/v2/shiep/config.js +64 -0
- package/lib/v2/shiep/index.js +13 -34
- package/lib/v2/shiep/radar.js +303 -15
- package/lib/v2/shuiguopai/index.js +1 -1
- package/lib/v2/sina/chuangshiji.js +17 -0
- package/lib/v2/sina/discovery.js +32 -0
- package/lib/v2/sina/finance/china.js +25 -0
- package/lib/v2/sina/finance/stock/usstock.js +37 -0
- package/lib/v2/sina/maintainer.js +8 -0
- package/lib/v2/sina/radar.js +49 -0
- package/lib/v2/sina/rollnews.js +31 -0
- package/lib/v2/sina/router.js +8 -0
- package/lib/v2/sina/sports.js +43 -0
- package/lib/v2/sina/templates/slide.art +3 -0
- package/lib/v2/sina/templates/video.art +5 -0
- package/lib/v2/sina/utils.js +104 -0
- package/lib/v2/sony/downloads.js +1 -0
- package/lib/v2/springer/maintainer.js +0 -0
- package/lib/v2/springer/radar.js +0 -0
- package/lib/v2/springer/router.js +0 -0
- package/lib/v2/springer/templates/description.art +0 -0
- package/lib/v2/sspai/radar.js +1 -1
- package/lib/v2/stbu/jsjxy.js +51 -0
- package/lib/v2/stbu/maintainer.js +4 -0
- package/lib/v2/stbu/radar.js +21 -0
- package/lib/v2/stbu/router.js +4 -0
- package/lib/v2/stbu/xyxw.js +52 -0
- package/lib/v2/storyfm/episodes.js +63 -0
- package/lib/v2/storyfm/maintainer.js +4 -0
- package/lib/v2/storyfm/radar.js +19 -0
- package/lib/v2/storyfm/router.js +4 -0
- package/lib/v2/storyfm/templates/description.art +6 -0
- package/lib/v2/sysu/maintainer.js +1 -0
- package/lib/v2/sysu/radar.js +8 -0
- package/lib/v2/sysu/router.js +1 -0
- package/lib/v2/sysu/ygafz.js +69 -0
- package/lib/v2/techpowerup/index.js +69 -0
- package/lib/v2/techpowerup/maintainer.js +5 -0
- package/lib/v2/techpowerup/radar.js +19 -0
- package/lib/v2/techpowerup/review.js +69 -0
- package/lib/v2/techpowerup/router.js +4 -0
- package/lib/v2/techpowerup/utils.js +84 -0
- package/lib/v2/telecompaper/maintainer.js +4 -0
- package/lib/{routes → v2}/telecompaper/news.js +1 -0
- package/lib/v2/telecompaper/radar.js +15 -0
- package/lib/v2/telecompaper/router.js +4 -0
- package/lib/v2/tencent/news/author.js +12 -8
- package/lib/v2/tiktok/user.js +5 -5
- package/lib/v2/tingshuitz/maintainer.js +1 -0
- package/lib/v2/tingshuitz/radar.js +11 -0
- package/lib/v2/tingshuitz/router.js +1 -0
- package/lib/v2/tingshuitz/shenzhen.js +29 -0
- package/lib/v2/tingshuitz/templates/shenzhen.art +8 -0
- package/lib/v2/tingtingfm/maintainer.js +3 -0
- package/lib/v2/tingtingfm/program.js +104 -0
- package/lib/v2/tingtingfm/radar.js +13 -0
- package/lib/v2/tingtingfm/router.js +3 -0
- package/lib/v2/tingtingfm/templates/audio.art +5 -0
- package/lib/v2/tingtingfm/utils.js +32 -0
- package/lib/v2/twitter/maintainer.js +1 -0
- package/lib/v2/twitter/radar.js +10 -0
- package/lib/v2/twitter/router.js +1 -0
- package/lib/v2/twitter/tweet.js +5 -0
- package/lib/v2/twitter/web-api/tweet.js +25 -0
- package/lib/v2/twitter/web-api/twitter-api.js +41 -2
- package/lib/v2/ustb/maintainer.js +2 -22
- package/lib/v2/ustb/radar.js +8 -0
- package/lib/v2/ustb/router.js +1 -0
- package/lib/{routes/universities → v2}/ustb/tj/news.js +11 -12
- package/lib/v2/utgd/category.js +68 -0
- package/lib/v2/utgd/maintainer.js +5 -0
- package/lib/v2/utgd/radar.js +25 -0
- package/lib/v2/utgd/router.js +5 -0
- package/lib/v2/utgd/templates/description.art +7 -0
- package/lib/v2/utgd/timeline.js +54 -0
- package/lib/v2/utgd/topic.js +70 -0
- package/lib/v2/v1tx/index.js +41 -22
- package/lib/v2/wechat/feeddd.js +12 -3
- package/lib/v2/wechat/mp.js +0 -0
- package/lib/v2/wechat/radar.js +2 -2
- package/lib/v2/weibo/group.js +93 -0
- package/lib/v2/weibo/keyword.js +1 -10
- package/lib/v2/weibo/maintainer.js +4 -3
- package/lib/v2/weibo/router.js +1 -0
- package/lib/v2/weibo/super_index.js +1 -10
- package/lib/v2/weibo/timeline.js +5 -5
- package/lib/v2/weibo/user.js +2 -8
- package/lib/v2/weibo/utils.js +15 -3
- package/lib/v2/winstall/maintainer.js +3 -0
- package/lib/v2/winstall/radar.js +13 -0
- package/lib/v2/winstall/router.js +3 -0
- package/lib/v2/winstall/templates/desc.art +5 -0
- package/lib/v2/winstall/update.js +43 -0
- package/lib/v2/wnacg/index.js +1 -1
- package/lib/v2/wnacg/templates/manga.art +4 -4
- package/lib/v2/wtu/index.js +37 -0
- package/lib/v2/wtu/job.js +80 -0
- package/lib/v2/wtu/maintainer.js +4 -0
- package/lib/v2/wtu/radar.js +22 -0
- package/lib/v2/wtu/router.js +4 -0
- package/lib/v2/xiaohongshu/maintainer.js +1 -1
- package/lib/v2/xiaohongshu/notes.js +16 -0
- package/lib/v2/xiaohongshu/router.js +1 -0
- package/lib/v2/xiaohongshu/util.js +122 -0
- package/lib/v2/yomiuri/maintainer.js +1 -1
- package/lib/v2/yomiuri/news.js +50 -100
- package/lib/v2/yomiuri/radar.js +3 -3
- package/lib/v2/youtube/user.js +1 -1
- package/lib/v2/zcool/radar.js +6 -6
- package/lib/v2/zhihu/answers.js +13 -9
- package/lib/v2/zhihu/radar.js +2 -2
- package/lib/v2/zhubai/maintainer.js +1 -0
- package/lib/v2/zhubai/radar.js +7 -0
- package/lib/v2/zhubai/router.js +1 -0
- package/lib/v2/zhubai/templates/description.art +31 -0
- package/lib/v2/zhubai/top20.js +57 -0
- package/lib/v2/zju/radar.js +1 -1
- package/lib/v2/zyw/hot.js +63 -0
- package/lib/v2/zyw/maintainer.js +3 -0
- package/lib/v2/zyw/radar.js +16 -0
- package/lib/v2/zyw/router.js +3 -0
- package/lib/views/error.art +7 -3
- package/lib/views/rss.art +1 -1
- package/lib/views/welcome.art +2 -2
- package/package.json +115 -124
- package/lib/routes/141jav/141jav.js +0 -37
- package/lib/routes/141ppv/141ppv.js +0 -37
- package/lib/routes/3dm/game.js +0 -42
- package/lib/routes/3dm/news_center.js +0 -54
- package/lib/routes/aeon/category.js +0 -70
- package/lib/routes/aisixiang/column.js +0 -37
- package/lib/routes/aisixiang/ranking.js +0 -37
- package/lib/routes/aisixiang/thinktank.js +0 -40
- package/lib/routes/aisixiang/utils.js +0 -39
- package/lib/routes/cneb/guoneinews.js +0 -27
- package/lib/routes/cneb/yjxx.js +0 -36
- package/lib/routes/futunn/highlights.js +0 -58
- package/lib/routes/icable/category.js +0 -64
- package/lib/routes/notefolio/index.js +0 -67
- package/lib/routes/rss3/blog.js +0 -46
- package/lib/routes/sina/chuangshiji.js +0 -38
- package/lib/routes/sina/discovery.js +0 -52
- package/lib/routes/sina/finance.js +0 -37
- package/lib/routes/sina/rollnews.js +0 -41
- package/lib/routes/sina/sports.js +0 -54
- package/lib/routes/universities/wtu/index.js +0 -34
- /package/lib/{routes → v2}/storyfm/index.js +0 -0
- /package/lib/{routes → v2}/telecompaper/search.js +0 -0
package/lib/v2/flyert/utils.js
CHANGED
|
@@ -16,19 +16,25 @@ async function load(link) {
|
|
|
16
16
|
$('script, style').remove();
|
|
17
17
|
$('#loginDialog').remove();
|
|
18
18
|
|
|
19
|
+
// 获取第一个帖子对象
|
|
20
|
+
const firstpost = $('.firstpost');
|
|
21
|
+
|
|
19
22
|
// 修改图片中的链接
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
firstpost.find('ignore_js_op img').each(function () {
|
|
24
|
+
$(this).attr('src', $(this).attr('file'));
|
|
25
|
+
// remove useless atrributes
|
|
26
|
+
for (const attr of ['id', 'aid', 'zoomfile', 'file', 'zoomfile', 'class', 'onclick', 'title', 'inpost', 'alt', 'onmouseover']) {
|
|
27
|
+
$(this).removeAttr(attr);
|
|
28
|
+
}
|
|
23
29
|
});
|
|
24
30
|
|
|
25
31
|
// 去除全文中图片的多余标签
|
|
26
|
-
const images =
|
|
27
|
-
|
|
28
|
-
|
|
32
|
+
const images = firstpost.find('ignore_js_op img');
|
|
33
|
+
firstpost.find('ignore_js_op').remove();
|
|
34
|
+
firstpost.append(images);
|
|
29
35
|
|
|
30
|
-
// 提取内容
|
|
31
|
-
const description =
|
|
36
|
+
// // 提取内容
|
|
37
|
+
const description = firstpost.html();
|
|
32
38
|
|
|
33
39
|
return { description };
|
|
34
40
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const { apiUrl, favicon, getBParam, getBuildId, getGToken, parseList, parseItem } = require('./utils');
|
|
3
|
+
|
|
4
|
+
module.exports = async (ctx) => {
|
|
5
|
+
const { categoryId = '1', lang = 'en' } = ctx.params;
|
|
6
|
+
const { limit = 20 } = ctx.query;
|
|
7
|
+
const gToken = await getGToken(ctx.cache.tryGet);
|
|
8
|
+
const bParam = getBParam(lang);
|
|
9
|
+
|
|
10
|
+
const { data: response } = await got.post(`${apiUrl}/feed/list/recommended`, {
|
|
11
|
+
headers: {
|
|
12
|
+
'x-bparam': JSON.stringify(bParam),
|
|
13
|
+
'x-gtoken': gToken,
|
|
14
|
+
},
|
|
15
|
+
json: {
|
|
16
|
+
category_id: parseInt(categoryId),
|
|
17
|
+
count: parseInt(limit),
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
if (response.code !== 2000) {
|
|
21
|
+
throw Error(response.msg);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const buildId = await getBuildId(ctx.cache.tryGet);
|
|
25
|
+
|
|
26
|
+
const list = parseList(response.data.list, lang, buildId);
|
|
27
|
+
const items = await Promise.all(list.map((item) => parseItem(item, ctx.cache.tryGet)));
|
|
28
|
+
|
|
29
|
+
ctx.state.data = {
|
|
30
|
+
title: 'Followin',
|
|
31
|
+
link: 'https://followin.io',
|
|
32
|
+
image: favicon,
|
|
33
|
+
item: items,
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const { baseUrl, getBuildId, parseList, parseItem } = require('./utils');
|
|
3
|
+
|
|
4
|
+
module.exports = async (ctx) => {
|
|
5
|
+
const { kolId, lang = 'en' } = ctx.params;
|
|
6
|
+
const { limit = 10 } = ctx.query;
|
|
7
|
+
|
|
8
|
+
const buildId = await getBuildId(ctx.cache.tryGet);
|
|
9
|
+
const { data: response } = await got(`${baseUrl}/_next/data/${buildId}/${lang}/kol/${kolId}.json`);
|
|
10
|
+
|
|
11
|
+
const { queries } = response.pageProps.dehydratedState;
|
|
12
|
+
const { data: profile } = queries.find((q) => q.queryKey[0] === '/user/get_profile').state;
|
|
13
|
+
|
|
14
|
+
const list = parseList(queries.find((q) => q.queryKey[0] === '/feed/list/user').state.data.pages[0].list.slice(0, limit), lang, buildId);
|
|
15
|
+
const items = await Promise.all(list.map((item) => parseItem(item, ctx.cache.tryGet)));
|
|
16
|
+
|
|
17
|
+
ctx.state.data = {
|
|
18
|
+
title: `${profile.nickname} - Followin`,
|
|
19
|
+
description: profile.bio,
|
|
20
|
+
link: `${baseUrl}/${lang}/kol/${kolId}`,
|
|
21
|
+
image: profile.avatar,
|
|
22
|
+
language: lang,
|
|
23
|
+
item: items,
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const { baseUrl, favicon, getBuildId, parseList, parseItem } = require('./utils');
|
|
3
|
+
|
|
4
|
+
module.exports = async (ctx) => {
|
|
5
|
+
const { lang = 'en' } = ctx.params;
|
|
6
|
+
const { limit = 20 } = ctx.query;
|
|
7
|
+
|
|
8
|
+
const buildId = await getBuildId(ctx.cache.tryGet);
|
|
9
|
+
const { data: response } = await got(`${baseUrl}/_next/data/${buildId}/${lang}/news.json`);
|
|
10
|
+
|
|
11
|
+
const list = parseList(response.pageProps.dehydratedState.queries.find((q) => q.queryKey[0] === '/feed/list/recommended/news').state.data.pages[0].list.slice(0, limit), lang, buildId);
|
|
12
|
+
const items = await Promise.all(list.map((item) => parseItem(item, ctx.cache.tryGet)));
|
|
13
|
+
|
|
14
|
+
ctx.state.data = {
|
|
15
|
+
title: `${lang === 'en' ? 'News' : lang === 'vi' ? 'Bản tin' : '快讯'} - Followin`,
|
|
16
|
+
link: `${baseUrl}/${lang}/news`,
|
|
17
|
+
image: favicon,
|
|
18
|
+
language: lang,
|
|
19
|
+
item: items,
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'followin.io': {
|
|
3
|
+
_name: 'Followin',
|
|
4
|
+
'.': [
|
|
5
|
+
{
|
|
6
|
+
title: '首页',
|
|
7
|
+
docs: 'https://docs.rsshub.app/finance.html#followin',
|
|
8
|
+
source: ['/:lang'],
|
|
9
|
+
target: (params) => (params.lang !== 'news' ? '/followin/1/:lang' : ''),
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
title: '快讯',
|
|
13
|
+
docs: 'https://docs.rsshub.app/finance.html#followin',
|
|
14
|
+
source: ['/:lang?/news', '/news'],
|
|
15
|
+
target: '/followin/news/:lang?',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
title: 'KOL',
|
|
19
|
+
docs: 'https://docs.rsshub.app/finance.html#followin',
|
|
20
|
+
source: ['/:lang/kol/:kolId', '/kol/:kolId'],
|
|
21
|
+
target: '/followin/kol/:kolId/:lang?',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
title: '话题',
|
|
25
|
+
docs: 'https://docs.rsshub.app/finance.html#followin',
|
|
26
|
+
source: ['/:lang/topic/:topicId', '/topic/:topicId'],
|
|
27
|
+
target: '/followin/topic/:topicId/:lang?',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
title: '标签',
|
|
31
|
+
docs: 'https://docs.rsshub.app/finance.html#followin',
|
|
32
|
+
source: ['/:lang/tag/:tagId', '/tag/:tagId'],
|
|
33
|
+
target: '/followin/tag/:tagId/:lang?',
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
module.exports = (router) => {
|
|
2
|
+
router.get('/kol/:kolId/:lang?', require('./kol'));
|
|
3
|
+
router.get('/news/:lang?', require('./news'));
|
|
4
|
+
router.get('/tag/:tagId/:lang?', require('./tag'));
|
|
5
|
+
router.get('/topic/:topicId/:lang?', require('./topic'));
|
|
6
|
+
router.get('/:categoryId?/:lang?', require('./index'));
|
|
7
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const { apiUrl, baseUrl, getBParam, getBuildId, getGToken, parseList, parseItem } = require('./utils');
|
|
3
|
+
|
|
4
|
+
module.exports = async (ctx) => {
|
|
5
|
+
const { tagId, lang = 'en' } = ctx.params;
|
|
6
|
+
const { limit = 20 } = ctx.query;
|
|
7
|
+
|
|
8
|
+
const buildId = await getBuildId(ctx.cache.tryGet);
|
|
9
|
+
const tagInfo = await ctx.cache.tryGet(`followin:tag:${tagId}:${lang}`, async () => {
|
|
10
|
+
const { data: response } = await got(`${baseUrl}/_next/data/${buildId}/${lang}/tag/${tagId}.json`);
|
|
11
|
+
const { queries } = response.pageProps.dehydratedState;
|
|
12
|
+
const { base_info: tagInfo } = queries.find((q) => q.queryKey[0] === '/tag/info/v2').state.data;
|
|
13
|
+
return tagInfo;
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const gToken = await getGToken(ctx.cache.tryGet);
|
|
17
|
+
const bParam = getBParam(lang);
|
|
18
|
+
const { data: tagResponse } = await got.post(`${apiUrl}/feed/list/tag`, {
|
|
19
|
+
headers: {
|
|
20
|
+
'x-bparam': JSON.stringify(bParam),
|
|
21
|
+
'x-gtoken': gToken,
|
|
22
|
+
},
|
|
23
|
+
json: {
|
|
24
|
+
count: limit,
|
|
25
|
+
id: parseInt(tagId),
|
|
26
|
+
type: 'tag_discussion_feed',
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
if (tagResponse.code !== 2000) {
|
|
30
|
+
throw Error(tagResponse.msg);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const list = parseList(tagResponse.data.list.slice(0, limit), lang, buildId);
|
|
34
|
+
const items = await Promise.all(list.map((item) => parseItem(item, ctx.cache.tryGet)));
|
|
35
|
+
|
|
36
|
+
ctx.state.data = {
|
|
37
|
+
title: `${tagInfo.name} - Followin`,
|
|
38
|
+
description: tagInfo.description,
|
|
39
|
+
link: `${baseUrl}/${lang}/tag/${tagId}`,
|
|
40
|
+
image: tagInfo.logo,
|
|
41
|
+
language: lang,
|
|
42
|
+
item: items,
|
|
43
|
+
};
|
|
44
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{{ each list l }}
|
|
2
|
+
{{@ l.translated_content.replaceAll('\n', '<br>') || l.content.replaceAll('\n', '<br>') }}
|
|
3
|
+
<br>
|
|
4
|
+
{{ if l.images.length }}
|
|
5
|
+
{{ each l.images img }}
|
|
6
|
+
<img src="{{ img }}">
|
|
7
|
+
{{ /each }}
|
|
8
|
+
{{ /if }}
|
|
9
|
+
{{ if l.link_previews.length }}
|
|
10
|
+
{{ each l.link_previews a }}
|
|
11
|
+
<a href="{{ a.link }}">{{ a.title }}<br>{{ a.content }}</a>
|
|
12
|
+
{{ /each }}
|
|
13
|
+
{{ /if }}
|
|
14
|
+
<br>
|
|
15
|
+
{{ /each }}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const { baseUrl, getBuildId, parseList, parseItem } = require('./utils');
|
|
3
|
+
|
|
4
|
+
module.exports = async (ctx) => {
|
|
5
|
+
const { topicId, lang = 'en' } = ctx.params;
|
|
6
|
+
const { limit = 20 } = ctx.query;
|
|
7
|
+
|
|
8
|
+
const buildId = await getBuildId(ctx.cache.tryGet);
|
|
9
|
+
const { data: response } = await got(`${baseUrl}/_next/data/${buildId}/${lang}/topic/${topicId}.json`);
|
|
10
|
+
|
|
11
|
+
const { queries } = response.pageProps.dehydratedState;
|
|
12
|
+
const { data: topicInfo } = queries.find((q) => q.queryKey[0] === '/topic/info').state;
|
|
13
|
+
|
|
14
|
+
const list = parseList(queries.find((q) => q.queryKey[0] === '/feed/list/topic').state.data.pages[0].list.slice(0, limit), lang, buildId);
|
|
15
|
+
const items = await Promise.all(list.map((item) => parseItem(item, ctx.cache.tryGet)));
|
|
16
|
+
|
|
17
|
+
ctx.state.data = {
|
|
18
|
+
title: `${topicInfo.title} - Followin`,
|
|
19
|
+
description: topicInfo.desc,
|
|
20
|
+
link: `${baseUrl}/${lang}/topic/${topicId}`,
|
|
21
|
+
image: topicInfo.logo,
|
|
22
|
+
language: lang,
|
|
23
|
+
item: items,
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
4
|
+
const config = require('@/config').value;
|
|
5
|
+
const { art } = require('@/utils/render');
|
|
6
|
+
const { join } = require('path');
|
|
7
|
+
|
|
8
|
+
const apiUrl = 'https://api.followin.io';
|
|
9
|
+
const baseUrl = 'https://followin.io';
|
|
10
|
+
const favicon = `${baseUrl}/favicon.ico`;
|
|
11
|
+
|
|
12
|
+
const getBParam = (lang) => ({
|
|
13
|
+
a: 'web',
|
|
14
|
+
b: '',
|
|
15
|
+
c: lang,
|
|
16
|
+
d: 0,
|
|
17
|
+
e: '',
|
|
18
|
+
f: '',
|
|
19
|
+
g: '',
|
|
20
|
+
h: '0.1.0',
|
|
21
|
+
i: 'official',
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
const getBuildId = (tryGet) =>
|
|
25
|
+
tryGet(
|
|
26
|
+
'followin:buildId',
|
|
27
|
+
async () => {
|
|
28
|
+
const { data: pageResponse } = await got(baseUrl);
|
|
29
|
+
const $ = cheerio.load(pageResponse);
|
|
30
|
+
const { buildId } = JSON.parse($('script#__NEXT_DATA__').text());
|
|
31
|
+
return buildId;
|
|
32
|
+
},
|
|
33
|
+
config.cache.routeExpire,
|
|
34
|
+
false
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
const getGToken = (tryGet) =>
|
|
38
|
+
tryGet('followin:gtoken', async () => {
|
|
39
|
+
const { data } = await got.post(`${apiUrl}/user/gtoken`);
|
|
40
|
+
return data.data.gtoken;
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
const parseList = (list, lang, buildId) =>
|
|
44
|
+
list.map((item) => ({
|
|
45
|
+
title: item.translated_title || item.title,
|
|
46
|
+
description: item.translated_content || item.content,
|
|
47
|
+
link: `${baseUrl}/${lang === 'en' ? '' : `${lang}/`}feed/${item.id}`,
|
|
48
|
+
pubDate: parseDate(item.publish_time, 'x'),
|
|
49
|
+
category: item.tags.map((tag) => tag.name),
|
|
50
|
+
author: item.nickname,
|
|
51
|
+
nextData: `${baseUrl}/_next/data/${buildId}/${lang}/feed/${item.id}.json`,
|
|
52
|
+
}));
|
|
53
|
+
|
|
54
|
+
const parseItem = (item, tryGet) =>
|
|
55
|
+
tryGet(item.link, async () => {
|
|
56
|
+
const { data } = await got(item.nextData);
|
|
57
|
+
|
|
58
|
+
const { queries } = data.pageProps.dehydratedState;
|
|
59
|
+
const info = queries.find((q) => q.queryKey[0] === '/feed/info').state;
|
|
60
|
+
const thread = queries.find((q) => q.queryKey[0] === '/feed/thread');
|
|
61
|
+
if (thread) {
|
|
62
|
+
item.description = art(join(__dirname, 'templates/thread.art'), {
|
|
63
|
+
list: thread.state.data.list,
|
|
64
|
+
});
|
|
65
|
+
} else {
|
|
66
|
+
item.description = info.data.translated_full_content || info.data.full_content;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
item.updated = parseDate(info.dataUpdatedAt, 'x');
|
|
70
|
+
item.category = [...new Set([...item.category, ...info.data.tags.map((tag) => tag.name)])];
|
|
71
|
+
|
|
72
|
+
return item;
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
module.exports = {
|
|
76
|
+
apiUrl,
|
|
77
|
+
baseUrl,
|
|
78
|
+
favicon,
|
|
79
|
+
getBParam,
|
|
80
|
+
getBuildId,
|
|
81
|
+
getGToken,
|
|
82
|
+
parseList,
|
|
83
|
+
parseItem,
|
|
84
|
+
};
|
|
@@ -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 { type = 'web' } = ctx.params;
|
|
6
|
+
|
|
7
|
+
const fapi = 'https://www.freebuf.com/fapi/frontend/category/list';
|
|
8
|
+
const baseUrl = 'https://www.freebuf.com';
|
|
9
|
+
const rssLink = `${baseUrl}/articles/${type}`;
|
|
10
|
+
|
|
11
|
+
const options = {
|
|
12
|
+
headers: {
|
|
13
|
+
referer: 'https://www.freebuf.com',
|
|
14
|
+
accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
|
|
15
|
+
},
|
|
16
|
+
searchParams: {
|
|
17
|
+
name: type,
|
|
18
|
+
page: 1,
|
|
19
|
+
limit: 20,
|
|
20
|
+
select: 0,
|
|
21
|
+
order: 0,
|
|
22
|
+
type: 'category',
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const response = await got.get(fapi, options).json();
|
|
27
|
+
|
|
28
|
+
const items = response.data.data_list.map((item) => ({
|
|
29
|
+
title: item.post_title,
|
|
30
|
+
link: `${baseUrl}${item.url}`,
|
|
31
|
+
description: item.content,
|
|
32
|
+
pubDate: parseDate(item.post_date),
|
|
33
|
+
author: item.nickname,
|
|
34
|
+
}));
|
|
35
|
+
|
|
36
|
+
ctx.state.data = {
|
|
37
|
+
title: `Freebuf ${type}`,
|
|
38
|
+
link: rssLink,
|
|
39
|
+
item: items,
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'freebuf.com': {
|
|
3
|
+
_name: 'Freebuf',
|
|
4
|
+
'.': [
|
|
5
|
+
{
|
|
6
|
+
title: '文章',
|
|
7
|
+
docs: 'https://docs.rsshub.app/blog.html#freebuf',
|
|
8
|
+
source: ['/articles/:type/*.html', '/articles/:type'],
|
|
9
|
+
target: '/freebuf/articles/:type',
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
|
+
},
|
|
13
|
+
};
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
const cheerio = require('cheerio');
|
|
2
|
+
const path = require('path');
|
|
2
3
|
|
|
3
4
|
const got = require('@/utils/got');
|
|
5
|
+
const { art } = require('@/utils/render');
|
|
4
6
|
const { parseDate } = require('@/utils/parse-date');
|
|
5
7
|
|
|
6
8
|
const baseURL = 'https://freecomputerbooks.com/';
|
|
7
9
|
|
|
10
|
+
async function cheerioLoad(url) {
|
|
11
|
+
return cheerio.load((await got(url)).data);
|
|
12
|
+
}
|
|
13
|
+
|
|
8
14
|
module.exports = async (ctx) => {
|
|
9
15
|
const categoryId = ctx.params.category?.trim();
|
|
10
16
|
const requestURL = categoryId ? new URL(`${categoryId}.html`, baseURL).href : baseURL;
|
|
11
|
-
|
|
12
|
-
const response = await got({ method: 'get', url: requestURL });
|
|
13
|
-
const $ = cheerio.load(response.data);
|
|
17
|
+
const $ = await cheerioLoad(requestURL);
|
|
14
18
|
|
|
15
19
|
// As observation has shown that each page only has one element of the
|
|
16
20
|
// class, thus to simplify the processing the text is directly extracted.
|
|
@@ -24,23 +28,22 @@ module.exports = async (ctx) => {
|
|
|
24
28
|
|
|
25
29
|
// For a "Selected New Books" page, the <ul> element's id. is
|
|
26
30
|
// `newBooksG`; for an ordinary category page, it's `newBooksL`.
|
|
27
|
-
item:
|
|
28
|
-
|
|
29
|
-
|
|
31
|
+
item: await Promise.all(
|
|
32
|
+
$('ul[id^=newBooks] > li')
|
|
33
|
+
.toArray()
|
|
34
|
+
.map((elem) => buildPostItem($(elem), categoryTitle, ctx.cache))
|
|
35
|
+
),
|
|
30
36
|
};
|
|
31
37
|
};
|
|
32
38
|
|
|
33
|
-
function buildPostItem(listItem, categoryTitle,
|
|
34
|
-
//
|
|
35
|
-
const image = listItem.find('img');
|
|
36
|
-
image.attr('src', image.attr('src').replace(/_\d+x\d+/, ''));
|
|
39
|
+
function buildPostItem(listItem, categoryTitle, cache) {
|
|
40
|
+
const $ = cheerio.load(''); // the only use below doesn't care about the content
|
|
37
41
|
|
|
38
42
|
const postLink = listItem.find('a:first');
|
|
39
43
|
const postInfo = listItem.find('p:contains("Post under")');
|
|
40
44
|
const postItem = {
|
|
41
45
|
title: postLink.text(),
|
|
42
|
-
link: postLink.attr('href'),
|
|
43
|
-
description: listItem.html(),
|
|
46
|
+
link: new URL(postLink.attr('href'), baseURL).href,
|
|
44
47
|
|
|
45
48
|
// Only a "Selected New Books" page has exclicit categorization info.
|
|
46
49
|
// for posts; an ordinary category page hasn't, then in which case the
|
|
@@ -62,5 +65,30 @@ function buildPostItem(listItem, categoryTitle, $) {
|
|
|
62
65
|
postItem.pubDate = parseDate(pubDateText);
|
|
63
66
|
}
|
|
64
67
|
|
|
65
|
-
return postItem;
|
|
68
|
+
return cache.tryGet(postItem.link, () => insertDescriptionInto(postItem));
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
async function insertDescriptionInto(item) {
|
|
72
|
+
const $ = await cheerioLoad(item.link);
|
|
73
|
+
|
|
74
|
+
// Eliminate all comment nodes to avoid their being selected and rendered in
|
|
75
|
+
// the final output (I know this is actually unnecessary, but please forgive
|
|
76
|
+
// my mysophobia).
|
|
77
|
+
$.root()
|
|
78
|
+
.find('*')
|
|
79
|
+
.contents()
|
|
80
|
+
.filter((_, node) => node.type === 'comment')
|
|
81
|
+
.remove();
|
|
82
|
+
|
|
83
|
+
const imageURL = $('#bookdesc img[title]').attr('src');
|
|
84
|
+
const metadata = $('#booktitle ul').removeAttr('style');
|
|
85
|
+
const content = $('#bookdesccontent').removeAttr('id');
|
|
86
|
+
|
|
87
|
+
metadata.find('li:contains(Share This)').remove();
|
|
88
|
+
content.find('img[src$="/hot.gif"]').remove();
|
|
89
|
+
content.find(':contains(Similar Books)').nextAll().addBack().remove();
|
|
90
|
+
|
|
91
|
+
item.description = art(path.join(__dirname, 'templates/desc.art'), { imageURL, metadata, content });
|
|
92
|
+
|
|
93
|
+
return item;
|
|
66
94
|
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
4
|
+
const { art } = require('@/utils/render');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
|
|
7
|
+
module.exports = async (ctx) => {
|
|
8
|
+
const limit = ctx.query.limit ? parseInt(ctx.query.limit) : 50;
|
|
9
|
+
|
|
10
|
+
const rootUrl = 'https://news.futunn.com';
|
|
11
|
+
const currentUrl = `${rootUrl}/main`;
|
|
12
|
+
const apiUrl = `${rootUrl}/news-site-api/main/get-market-list?size=${limit}`;
|
|
13
|
+
|
|
14
|
+
const response = await got({
|
|
15
|
+
method: 'get',
|
|
16
|
+
url: apiUrl,
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
let items = response.data.data.list.map((item) => ({
|
|
20
|
+
title: item.title,
|
|
21
|
+
link: item.url.split('?')[0],
|
|
22
|
+
author: item.source,
|
|
23
|
+
pubDate: parseDate(item.timestamp * 1000),
|
|
24
|
+
description: art(path.join(__dirname, 'templates/description.art'), {
|
|
25
|
+
abs: item.abs,
|
|
26
|
+
pic: item.pic,
|
|
27
|
+
}),
|
|
28
|
+
}));
|
|
29
|
+
|
|
30
|
+
items = await Promise.all(
|
|
31
|
+
items.map((item) =>
|
|
32
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
33
|
+
if (/news\.futunn\.com/.test(item.link)) {
|
|
34
|
+
const detailResponse = await got({
|
|
35
|
+
method: 'get',
|
|
36
|
+
url: item.link,
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
const content = cheerio.load(detailResponse.data);
|
|
40
|
+
|
|
41
|
+
content('.futu-news-time-stamp').remove();
|
|
42
|
+
content('.nnstock').each(function () {
|
|
43
|
+
content(this).replaceWith(`<a href="${content(this).attr('href')}">${content(this).text().replace(/\$/g, '')}</a>`);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
item.description = content('.origin_content').html();
|
|
47
|
+
item.category = [
|
|
48
|
+
...content('.news__from-topic__title')
|
|
49
|
+
.toArray()
|
|
50
|
+
.map((a) => content(a).text()),
|
|
51
|
+
...content('#relatedStockWeb .stock-name')
|
|
52
|
+
.toArray()
|
|
53
|
+
.map((s) => content(s).text().trim()),
|
|
54
|
+
];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return item;
|
|
58
|
+
})
|
|
59
|
+
)
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
ctx.state.data = {
|
|
63
|
+
title: 'Futubull - Headlines',
|
|
64
|
+
link: currentUrl,
|
|
65
|
+
item: items,
|
|
66
|
+
};
|
|
67
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
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 domain = 'www.fzmtr.com';
|
|
7
|
+
const announcementsUrl = `http://${domain}/html/fzdt/tzgg/index.html`;
|
|
8
|
+
const response = await got(announcementsUrl);
|
|
9
|
+
const data = response.data;
|
|
10
|
+
|
|
11
|
+
const $ = cheerio.load(data);
|
|
12
|
+
const list = $('span#resources li')
|
|
13
|
+
.map((_, item) => {
|
|
14
|
+
item = $(item);
|
|
15
|
+
const url = `http://${domain}` + item.find('a').attr('href');
|
|
16
|
+
const title = item.find('a').text();
|
|
17
|
+
const publishTime = parseDate(item.find('span').text());
|
|
18
|
+
return {
|
|
19
|
+
title,
|
|
20
|
+
link: url,
|
|
21
|
+
author: '福州地铁',
|
|
22
|
+
pubtime: publishTime,
|
|
23
|
+
};
|
|
24
|
+
})
|
|
25
|
+
.get();
|
|
26
|
+
|
|
27
|
+
ctx.state.data = {
|
|
28
|
+
title: '福州地铁通知公告',
|
|
29
|
+
url: announcementsUrl,
|
|
30
|
+
description: '福州地铁通知公告',
|
|
31
|
+
item: list.map((item) => ({
|
|
32
|
+
title: item.title,
|
|
33
|
+
pubDate: item.pubtime,
|
|
34
|
+
link: item.link,
|
|
35
|
+
author: item.author,
|
|
36
|
+
})),
|
|
37
|
+
};
|
|
38
|
+
};
|