rsshub 1.0.0-master.d4bfda3 → 1.0.0-master.d4ff0ff
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 +13 -48
- package/lib/api/radar/rules/all.ts +3 -6
- package/lib/api/radar/rules/one.ts +3 -6
- package/lib/config.ts +32 -2
- package/lib/errors/index.test.ts +1 -1
- package/lib/errors/index.tsx +1 -1
- package/lib/index.ts +1 -1
- package/lib/middleware/anti-hotlink.test.ts +191 -6
- package/lib/middleware/anti-hotlink.ts +29 -1
- package/lib/middleware/logger.ts +2 -2
- package/lib/middleware/parameter.test.ts +22 -5
- package/lib/middleware/parameter.ts +47 -17
- package/lib/router.js +1 -9
- package/lib/routes/4ksj/forum.ts +54 -20
- package/lib/routes/500px/tribe-set.ts +3 -2
- package/lib/routes/51cto/recommend.ts +45 -7
- package/lib/routes/5eplay/utils.ts +5 -3
- package/lib/routes/a9vg/index.ts +214 -0
- package/lib/routes/a9vg/namespace.ts +1 -0
- package/lib/routes/a9vg/templates/description.art +17 -0
- package/lib/routes/abc/index.ts +2 -2
- package/lib/routes/academia/namespace.ts +1 -1
- package/lib/routes/agri/index.ts +307 -0
- package/lib/routes/agri/namespace.ts +8 -0
- package/lib/routes/agri/templates/description.art +21 -0
- package/lib/routes/anime1/anime.ts +63 -0
- package/lib/routes/anime1/namespace.ts +6 -0
- package/lib/routes/anime1/search.ts +57 -0
- package/lib/routes/apnews/api.ts +62 -0
- package/lib/routes/apnews/rss.ts +1 -1
- package/lib/routes/apnews/sitemap.ts +2 -1
- package/lib/routes/apnews/topics.ts +2 -2
- package/lib/routes/apple/podcast.ts +20 -16
- package/lib/routes/asus/bios.ts +88 -21
- package/lib/routes/asus/templates/bios.art +13 -6
- package/lib/routes/bangumi/templates/tv/subject.art +6 -0
- package/lib/routes/bangumi/tv/user/collections.ts +172 -0
- package/lib/routes/behance/user.ts +14 -3
- package/lib/routes/beijingprice/index.ts +12 -12
- package/lib/routes/bestblogs/feeds.ts +107 -0
- package/lib/routes/bestblogs/namespace.ts +6 -0
- package/lib/routes/bilibili/bangumi.ts +3 -2
- package/lib/routes/bilibili/bilibili-recommend.ts +42 -0
- package/lib/routes/bilibili/cache.ts +25 -1
- package/lib/routes/bilibili/dynamic.ts +103 -105
- package/lib/routes/bilibili/followings-dynamic.ts +3 -1
- package/lib/routes/bilibili/followings-video.ts +9 -3
- package/lib/routes/bilibili/readlist.ts +3 -2
- package/lib/routes/bilibili/utils.ts +5 -0
- package/lib/routes/bilibili/video.ts +2 -1
- package/lib/routes/binance/announcement.ts +168 -0
- package/lib/routes/binance/types.ts +26 -0
- package/lib/routes/bitget/announcement.ts +200 -0
- package/lib/routes/bitget/namespace.ts +6 -0
- package/lib/routes/bitget/type.ts +26 -0
- package/lib/routes/bjnews/cat.ts +9 -1
- package/lib/routes/bjp/apod.ts +4 -2
- package/lib/routes/bupt/jwc.ts +130 -0
- package/lib/routes/caixin/latest.ts +3 -2
- package/lib/routes/ccfa/index.ts +216 -0
- package/lib/routes/ccfa/namespace.ts +8 -0
- package/lib/routes/ccfa/templates/description.art +7 -0
- package/lib/routes/cdu/jwgg.ts +79 -0
- package/lib/routes/cdu/namespace.ts +6 -0
- package/lib/routes/ceph/blog.ts +72 -0
- package/lib/routes/ceph/namespace.ts +7 -0
- package/lib/routes/changba/user.ts +6 -5
- package/lib/routes/chikubi/category.ts +41 -0
- package/lib/routes/chikubi/index.ts +66 -0
- package/lib/routes/chikubi/namespace.ts +15 -0
- package/lib/routes/chikubi/navigation.ts +66 -0
- package/lib/routes/chikubi/nipple-video-category.ts +49 -0
- package/lib/routes/chikubi/nipple-video-maker.ts +49 -0
- package/lib/routes/chikubi/search.ts +39 -0
- package/lib/routes/chikubi/tag.ts +41 -0
- package/lib/routes/chikubi/utils.ts +135 -0
- package/lib/routes/chinanews/index.ts +1 -1
- package/lib/routes/chinaventure/index.ts +1 -1
- package/lib/routes/chlinlearn/daily-blog.ts +7 -0
- package/lib/routes/cls/subject.ts +153 -0
- package/lib/routes/cls/templates/description.art +21 -0
- package/lib/routes/dealstreetasia/home.ts +72 -0
- package/lib/routes/dealstreetasia/namespace.ts +6 -0
- package/lib/routes/dealstreetasia/section.ts +57 -0
- package/lib/routes/deepin/thread.ts +102 -0
- package/lib/routes/deeplearning/thebatch.ts +30 -18
- package/lib/routes/devolverdigital/blog.ts +1 -1
- package/lib/routes/devtrium/namespace.ts +6 -0
- package/lib/routes/devtrium/posts.ts +55 -0
- package/lib/routes/discourse/official.ts +55 -0
- package/lib/routes/dockerhub/build.ts +1 -1
- package/lib/routes/dockerhub/utils.ts +4 -3
- package/lib/routes/douban/movie/coming.ts +68 -0
- package/lib/routes/douban/templates/movie_coming.art +27 -0
- package/lib/routes/douyin/types.ts +795 -0
- package/lib/routes/douyin/user.ts +51 -23
- package/lib/routes/douyin/utils.ts +1 -87
- package/lib/routes/dykszx/namespace.ts +8 -0
- package/lib/routes/dykszx/news.ts +88 -0
- package/lib/routes/eagle/blog.ts +13 -2
- package/lib/routes/eastmoney/report/index.ts +63 -15
- package/lib/routes/eastmoney/templates/stock_description.art +36 -0
- package/lib/routes/eastmoney/utils.ts +35 -0
- package/lib/routes/easynomad/joblist.ts +56 -0
- package/lib/routes/easynomad/namespace.ts +6 -0
- package/lib/routes/economist/espresso.ts +3 -2
- package/lib/routes/economist/full.ts +3 -2
- package/lib/routes/epicgames/index.ts +1 -1
- package/lib/routes/espn/namespace.ts +6 -0
- package/lib/routes/espn/news.ts +120 -0
- package/lib/routes/espn/templates/media.art +19 -0
- package/lib/routes/fediverse/timeline.ts +1 -1
- package/lib/routes/follow/namespace.ts +6 -0
- package/lib/routes/follow/profile.ts +81 -0
- package/lib/routes/follow/types.ts +68 -0
- package/lib/routes/ftm/index.ts +60 -0
- package/lib/routes/ftm/namespace.ts +6 -0
- package/lib/routes/galxe/index.ts +94 -0
- package/lib/routes/galxe/namespace.ts +9 -0
- package/lib/routes/gamer/ani/anime.ts +10 -3
- package/lib/routes/gamer/ani/new-anime.ts +4 -3
- package/lib/routes/gamer/gnn-index.ts +31 -11
- package/lib/routes/gamer/hot.ts +4 -3
- package/lib/routes/gamersky/ent.ts +57 -0
- package/lib/routes/gamersky/namespace.ts +10 -0
- package/lib/routes/gamersky/news.ts +91 -0
- package/lib/routes/gamersky/review.ts +80 -0
- package/lib/routes/gamersky/utils.ts +94 -0
- package/lib/routes/geekpark/index.ts +219 -0
- package/lib/routes/geekpark/namespace.ts +8 -0
- package/lib/routes/geekpark/templates/description.art +21 -0
- package/lib/routes/github/activity.ts +2 -1
- package/lib/routes/github/advisor.ts +97 -0
- package/lib/routes/github/comments.ts +32 -30
- package/lib/routes/github/discussions.ts +194 -0
- package/lib/routes/github/issue.ts +1 -1
- package/lib/routes/github/pulls.ts +1 -1
- package/lib/routes/go/mhlw/pdf.ts +87 -0
- package/lib/routes/go/namespace.ts +8 -0
- package/lib/routes/go/niid/idwr-dl.ts +104 -0
- package/lib/routes/gov/cbirc/index.ts +371 -0
- package/lib/routes/gov/cn/namespace.ts +8 -0
- package/lib/routes/gov/{news → cn/news}/index.ts +11 -7
- package/lib/routes/gov/csrc/csrc.ts +541 -0
- package/lib/routes/gov/lswz/index.ts +5 -4
- package/lib/routes/gov/moa/moa.ts +3 -3
- package/lib/routes/gov/moa/szcpxx.ts +115 -0
- package/lib/routes/gov/moa/zdscxx.ts +71 -21
- package/lib/routes/gov/ndrc/fggz.ts +637 -2
- package/lib/routes/gov/ndrc/namespace.ts +8 -0
- package/lib/routes/gov/ndrc/xwdt.ts +28 -8
- package/lib/routes/gov/ndrc/zfxxgk/articles.ts +73 -0
- package/lib/routes/gq/news.ts +3 -2
- package/lib/routes/gs/developer/blog.ts +58 -0
- package/lib/routes/gs/namespace.ts +9 -0
- package/lib/routes/guancha/member.ts +1 -1
- package/lib/routes/hackernews/index.ts +16 -5
- package/lib/routes/hpoi/all.ts +17 -6
- package/lib/routes/hpoi/character.ts +18 -6
- package/lib/routes/hpoi/info.ts +11 -6
- package/lib/routes/hpoi/user.ts +16 -4
- package/lib/routes/hpoi/utils.ts +36 -3
- package/lib/routes/hpoi/work.ts +18 -6
- package/lib/routes/hust/gs.ts +281 -0
- package/lib/routes/hust/namespace.ts +1 -1
- package/lib/routes/imhcg/blog.ts +47 -0
- package/lib/routes/imhcg/namespace.ts +7 -0
- package/lib/routes/javtiful/actress.ts +37 -0
- package/lib/routes/javtiful/channel.ts +37 -0
- package/lib/routes/javtiful/namespace.ts +6 -0
- package/lib/routes/javtiful/templates/description.art +7 -0
- package/lib/routes/javtiful/utils.ts +18 -0
- package/lib/routes/jianshu/collection.ts +3 -2
- package/lib/routes/jianshu/home.ts +3 -2
- package/lib/routes/jianshu/user.ts +3 -2
- package/lib/routes/jike/topic.ts +10 -3
- package/lib/routes/jike/user.ts +3 -2
- package/lib/routes/jjwxc/book.ts +18 -14
- package/lib/routes/kakuyomu/namespace.ts +6 -0
- package/lib/routes/kakuyomu/types.ts +6 -0
- package/lib/routes/kakuyomu/works.ts +73 -0
- package/lib/routes/kisskiss/blog.ts +74 -0
- package/lib/routes/kisskiss/namespace.ts +6 -0
- package/lib/routes/konachan/namespace.ts +7 -0
- package/lib/routes/konachan/post.ts +84 -0
- package/lib/routes/lemmy/index.ts +30 -3
- package/lib/routes/lemmy/namespace.ts +1 -0
- package/lib/routes/link3/events.ts +86 -0
- package/lib/routes/link3/namespace.ts +6 -0
- package/lib/routes/link3/profile.ts +143 -0
- package/lib/routes/lofter/collection.ts +87 -0
- package/lib/routes/lofter/user.ts +1 -1
- package/lib/routes/lovelive-anime/namespace.ts +1 -1
- package/lib/routes/lovelive-anime/news.ts +56 -26
- package/lib/routes/lovelive-anime/schedules.ts +18 -6
- package/lib/routes/lovelive-anime/templates/description.art +1 -1
- package/lib/routes/lovelive-anime/templates/scheduleDesc.art +0 -1
- package/lib/routes/lovelive-anime/topics.ts +1 -1
- package/lib/routes/luma/index.ts +92 -0
- package/lib/routes/luma/namespace.ts +6 -0
- package/lib/routes/malaysiakini/index.ts +179 -0
- package/lib/routes/malaysiakini/namespace.ts +11 -0
- package/lib/routes/manhuagui/comic.ts +1 -1
- package/lib/routes/mastodon/account-id.ts +26 -3
- package/lib/routes/mastodon/acct.ts +15 -4
- package/lib/routes/mastodon/timeline-local.ts +14 -3
- package/lib/routes/mastodon/timeline-remote.ts +14 -3
- package/lib/routes/meishichina/index.ts +1997 -0
- package/lib/routes/meishichina/namespace.ts +8 -0
- package/lib/routes/mi/crowdfunding.ts +43 -22
- package/lib/routes/mi/templates/crowdfunding.art +28 -0
- package/lib/routes/mi/types.ts +40 -0
- package/lib/routes/mi/utils.ts +80 -0
- package/lib/routes/misskey/featured-notes.ts +3 -2
- package/lib/routes/misskey/user-timeline.ts +3 -2
- package/lib/routes/natgeo/dailyphoto.ts +5 -4
- package/lib/routes/natgeo/dailyselection.ts +18 -3
- package/lib/routes/ncku/csie.ts +83 -0
- package/lib/routes/ncku/namespace.ts +6 -0
- package/lib/routes/ncku/phys.ts +95 -0
- package/lib/routes/newyorker/news.ts +5 -4
- package/lib/routes/nhk/news.ts +32 -15
- package/lib/routes/nicovideo/namespace.ts +7 -0
- package/lib/routes/nicovideo/templates/video.art +7 -0
- package/lib/routes/nicovideo/types.ts +54 -0
- package/lib/routes/nicovideo/utils.ts +37 -0
- package/lib/routes/nicovideo/video.ts +47 -0
- package/lib/routes/nikkei/cn/index.ts +12 -1
- package/lib/routes/nytimes/book.ts +14 -17
- package/lib/routes/nytimes/index.ts +16 -9
- package/lib/routes/obsidian/namespace.ts +6 -0
- package/lib/routes/obsidian/publish.ts +83 -0
- package/lib/routes/obsidian/utils.ts +8 -0
- package/lib/routes/oct0pu5/namespace.ts +10 -0
- package/lib/routes/oct0pu5/rss.ts +48 -0
- package/lib/routes/pconline/focus.ts +143 -0
- package/lib/routes/pconline/namespace.ts +10 -0
- package/lib/routes/people/index.ts +6 -2
- package/lib/routes/picnob/user.ts +11 -3
- package/lib/routes/pixiv/ranking.ts +1 -0
- package/lib/routes/pixivision/index.ts +84 -0
- package/lib/routes/pixivision/namespace.ts +6 -0
- package/lib/routes/pixivision/utils.ts +86 -0
- package/lib/routes/pku/bbs/hot.ts +1 -1
- package/lib/routes/pornhub/category.ts +3 -2
- package/lib/routes/pornhub/model.ts +6 -7
- package/lib/routes/pornhub/pornstar.ts +67 -19
- package/lib/routes/pornhub/search.ts +3 -2
- package/lib/routes/pornhub/users.ts +3 -5
- package/lib/routes/qiche365/namespace.ts +5 -0
- package/lib/routes/qiche365/recall.ts +53 -0
- package/lib/routes/qidian/namespace.ts +1 -1
- package/lib/routes/questn/community.ts +76 -0
- package/lib/routes/questn/events.ts +101 -0
- package/lib/routes/questn/namespace.ts +6 -0
- package/lib/routes/questn/util.ts +16 -0
- package/lib/routes/resonac/namespace.ts +6 -0
- package/lib/routes/resonac/products.ts +85 -0
- package/lib/routes/reuters/common.ts +54 -1
- package/lib/routes/rss3/index.ts +3 -428
- package/lib/routes/samd/news.ts +1 -1
- package/lib/routes/scmp/utils.ts +2 -2
- package/lib/routes/scut/gzic/media.ts +71 -0
- package/lib/routes/scut/gzic/news.ts +65 -0
- package/lib/routes/scut/gzic/notice.ts +88 -0
- package/lib/routes/sdu/{cs.ts → cs/index.ts} +46 -12
- package/lib/routes/sdu/cs/yjsgz.ts +85 -0
- package/lib/routes/sdu/gjsw.ts +80 -0
- package/lib/routes/sdu/namespace.ts +2 -2
- package/lib/routes/sdu/qd/xszxqd.ts +98 -0
- package/lib/routes/sdu/qd/xyb.ts +82 -0
- package/lib/routes/sdu/ygb.ts +90 -0
- package/lib/routes/sis001/author.ts +52 -0
- package/lib/routes/sis001/common.ts +38 -0
- package/lib/routes/sis001/forum.ts +2 -29
- package/lib/routes/sjtu/namespace.ts +1 -1
- package/lib/routes/sjtu/seiee/index.ts +97 -0
- package/lib/routes/smzdm/product.ts +85 -0
- package/lib/routes/solidot/main.ts +28 -12
- package/lib/routes/soundon/namespace.ts +6 -0
- package/lib/routes/soundon/podcast.ts +80 -0
- package/lib/routes/soundon/types.ts +67 -0
- package/lib/routes/spankbang/namespace.ts +6 -0
- package/lib/routes/spankbang/new-videos.ts +90 -0
- package/lib/routes/spankbang/templates/video.art +7 -0
- package/lib/routes/sse/sselawsrules.ts +370 -0
- package/lib/routes/sspai/index.ts +2 -2
- package/lib/routes/sustainabilitymag/namespace.ts +1 -1
- package/lib/routes/swjtu/scai/bks.ts +76 -0
- package/lib/routes/szftedu/dongtai.ts +62 -0
- package/lib/routes/szftedu/gonggao.ts +62 -0
- package/lib/routes/szftedu/namespace.ts +6 -0
- package/lib/routes/szse/rule.ts +315 -42
- package/lib/routes/taoguba/blog.ts +1 -1
- package/lib/routes/taoguba/index.ts +1 -1
- package/lib/routes/telegram/blog.ts +3 -2
- package/lib/routes/telegram/channel.ts +34 -3
- package/lib/routes/telegram/stickerpack.ts +3 -2
- package/lib/routes/tencent/news/author.ts +2 -1
- package/lib/routes/test/index.ts +50 -43
- package/lib/routes/the/index.ts +7 -3
- package/lib/routes/theblockbeats/index.ts +10 -5
- package/lib/routes/theinitium/app.ts +137 -0
- package/lib/routes/theinitium/templates/description.art +17 -0
- package/lib/routes/threads/index.ts +26 -20
- package/lib/routes/tju/cic/index.ts +2 -2
- package/lib/routes/tju/news/index.ts +2 -2
- package/lib/routes/tju/oaa/index.ts +2 -2
- package/lib/routes/ttv/index.ts +1 -1
- package/lib/routes/twitch/live.ts +3 -2
- package/lib/routes/twitch/video.ts +15 -6
- package/lib/routes/twitter/api/index.ts +2 -0
- package/lib/routes/twitter/api/mobile-api/login.ts +1 -1
- package/lib/routes/twitter/api/web-api/api.ts +18 -0
- package/lib/routes/twitter/api/web-api/constants.ts +17 -14
- package/lib/routes/twitter/api/web-api/login.ts +75 -0
- package/lib/routes/twitter/api/web-api/utils.ts +99 -40
- package/lib/routes/twitter/home-latest.ts +60 -0
- package/lib/routes/twitter/list.ts +5 -2
- package/lib/routes/twitter/tweet.ts +1 -0
- package/lib/routes/udn/breaking-news.ts +2 -2
- package/lib/routes/uestc/bbs.ts +97 -0
- package/lib/routes/uestc/namespace.ts +1 -1
- package/lib/routes/ustc/scms.ts +97 -0
- package/lib/routes/v2ex/topics.ts +1 -0
- package/lib/routes/vimeo/category.ts +4 -3
- package/lib/routes/vimeo/usr-videos.ts +3 -2
- package/lib/routes/voronoiapp/author.ts +41 -0
- package/lib/routes/voronoiapp/common.ts +247 -0
- package/lib/routes/voronoiapp/editors-pick.ts +28 -0
- package/lib/routes/voronoiapp/home.ts +29 -0
- package/lib/routes/voronoiapp/latest.ts +28 -0
- package/lib/routes/voronoiapp/namespace.ts +6 -0
- package/lib/routes/voronoiapp/popular.ts +49 -0
- package/lib/routes/voronoiapp/search.ts +33 -0
- package/lib/routes/voronoiapp/types.d.ts +78 -0
- package/lib/routes/wchscu/namespace.ts +6 -0
- package/lib/routes/wchscu/recruit.ts +73 -0
- package/lib/routes/weibo/namespace.ts +1 -0
- package/lib/routes/weibo/oasis/user.ts +1 -1
- package/lib/routes/weibo/super-index.ts +23 -11
- package/lib/routes/weibo/user.ts +13 -2
- package/lib/routes/weibo/utils.ts +0 -4
- package/lib/routes/whu/cs.ts +11 -3
- package/lib/routes/whu/gs/index.ts +2 -1
- package/lib/routes/whu/news.ts +27 -2
- package/lib/routes/withgoogle/explorables.ts +54 -0
- package/lib/routes/withgoogle/namespace.ts +6 -0
- package/lib/routes/xbookcn/blog.ts +66 -0
- package/lib/routes/xbookcn/namespace.ts +6 -0
- package/lib/routes/xiaohongshu/user.ts +7 -4
- package/lib/routes/xiaohongshu/util.ts +3 -1
- package/lib/routes/xidian/cs.ts +143 -0
- package/lib/routes/xidian/gr.ts +289 -0
- package/lib/routes/xidian/jwc.ts +1 -0
- package/lib/routes/xidian/namespace.ts +1 -1
- package/lib/routes/xueqiu/cookies.ts +14 -1
- package/lib/routes/xueqiu/favorite.ts +16 -2
- package/lib/routes/xueqiu/stock-info.ts +6 -12
- package/lib/routes/yamap/articles.ts +62 -0
- package/lib/routes/yamap/namespace.ts +6 -0
- package/lib/routes/yande/namespace.ts +1 -1
- package/lib/routes/yande/post.ts +7 -7
- package/lib/routes/yilinzazhi/index.ts +58 -0
- package/lib/routes/yilinzazhi/latest.ts +103 -0
- package/lib/routes/yilinzazhi/namespace.ts +8 -0
- package/lib/routes/youtube/playlist.ts +3 -2
- package/lib/routes/yystv/docs.ts +28 -19
- package/lib/routes/zaobao/util.ts +1 -1
- package/lib/routes/zhihu/timeline.ts +6 -1
- package/lib/routes/zhihu/utils.ts +6 -2
- package/lib/routes/zhihu/zhuanlan.ts +8 -7
- package/lib/routes/zsxq/types.ts +9 -0
- package/lib/routes/zsxq/utils.ts +4 -3
- package/lib/setup.test.ts +1 -1
- package/lib/types.ts +6 -0
- package/lib/utils/common-utils.ts +1 -0
- package/lib/utils/otel/metric.ts +3 -2
- package/lib/utils/request-rewriter/fetch.ts +1 -1
- package/lib/views/index.tsx +3 -6
- package/lib/views/json.ts +1 -1
- package/lib/views/rss.tsx +7 -0
- package/package.json +45 -46
- package/lib/routes/a9vg/a9vg.ts +0 -45
- package/lib/routes/sse/lawandrules.ts +0 -68
- package/lib/routes-deprecated/anime1/anime.js +0 -25
- package/lib/routes-deprecated/anime1/search.js +0 -25
- package/lib/routes-deprecated/dykszx/news.js +0 -60
- package/lib/routes-deprecated/gamersky/ent.js +0 -89
- package/lib/routes-deprecated/gamersky/news.js +0 -34
- package/lib/routes-deprecated/geekpark/breakingnews.js +0 -25
- package/lib/routes-deprecated/konachan/post-popular-recent.js +0 -67
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rsshub",
|
|
3
|
-
"version": "1.0.0-master.
|
|
3
|
+
"version": "1.0.0-master.d4ff0ff",
|
|
4
4
|
"description": "Make RSS Great Again!",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"RSS"
|
|
@@ -32,26 +32,26 @@
|
|
|
32
32
|
"*.yml": "eslint --cache --fix"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@hono/node-server": "1.
|
|
36
|
-
"@hono/zod-openapi": "0.
|
|
35
|
+
"@hono/node-server": "1.13.1",
|
|
36
|
+
"@hono/zod-openapi": "0.16.3",
|
|
37
37
|
"@notionhq/client": "2.2.15",
|
|
38
38
|
"@opentelemetry/api": "1.9.0",
|
|
39
|
-
"@opentelemetry/exporter-prometheus": "0.
|
|
40
|
-
"@opentelemetry/exporter-trace-otlp-http": "0.
|
|
41
|
-
"@opentelemetry/resources": "1.
|
|
42
|
-
"@opentelemetry/sdk-metrics": "1.
|
|
43
|
-
"@opentelemetry/sdk-trace-base": "1.
|
|
44
|
-
"@opentelemetry/semantic-conventions": "1.
|
|
39
|
+
"@opentelemetry/exporter-prometheus": "0.53.0",
|
|
40
|
+
"@opentelemetry/exporter-trace-otlp-http": "0.53.0",
|
|
41
|
+
"@opentelemetry/resources": "1.26.0",
|
|
42
|
+
"@opentelemetry/sdk-metrics": "1.26.0",
|
|
43
|
+
"@opentelemetry/sdk-trace-base": "1.26.0",
|
|
44
|
+
"@opentelemetry/semantic-conventions": "1.27.0",
|
|
45
45
|
"@postlight/parser": "2.2.3",
|
|
46
|
-
"@rss3/sdk": "0.0.
|
|
47
|
-
"@scalar/hono-api-reference": "0.5.
|
|
48
|
-
"@sentry/node": "7.
|
|
49
|
-
"@tonyrl/rand-user-agent": "2.0.
|
|
46
|
+
"@rss3/sdk": "0.0.19",
|
|
47
|
+
"@scalar/hono-api-reference": "0.5.150",
|
|
48
|
+
"@sentry/node": "7.119.1",
|
|
49
|
+
"@tonyrl/rand-user-agent": "2.0.80",
|
|
50
50
|
"aes-js": "3.1.2",
|
|
51
51
|
"art-template": "4.13.2",
|
|
52
52
|
"bbcodejs": "0.0.4",
|
|
53
53
|
"cheerio": "1.0.0",
|
|
54
|
-
"chrono-node": "2.7.
|
|
54
|
+
"chrono-node": "2.7.7",
|
|
55
55
|
"city-timezones": "1.3.0",
|
|
56
56
|
"cross-env": "7.0.3",
|
|
57
57
|
"crypto-js": "4.2.0",
|
|
@@ -64,30 +64,30 @@
|
|
|
64
64
|
"etag": "1.8.1",
|
|
65
65
|
"fanfou-sdk": "5.0.0",
|
|
66
66
|
"form-data": "4.0.0",
|
|
67
|
-
"googleapis": "
|
|
68
|
-
"hono": "4.
|
|
67
|
+
"googleapis": "144.0.0",
|
|
68
|
+
"hono": "4.6.3",
|
|
69
69
|
"html-to-text": "9.0.5",
|
|
70
|
-
"http-cookie-agent": "6.0.
|
|
70
|
+
"http-cookie-agent": "6.0.6",
|
|
71
71
|
"https-proxy-agent": "7.0.5",
|
|
72
72
|
"iconv-lite": "0.6.3",
|
|
73
73
|
"imapflow": "1.0.164",
|
|
74
74
|
"instagram-private-api": "1.46.1",
|
|
75
75
|
"ioredis": "5.4.1",
|
|
76
76
|
"ip-regex": "5.0.0",
|
|
77
|
-
"jsdom": "
|
|
77
|
+
"jsdom": "25.0.1",
|
|
78
78
|
"json-bigint": "1.0.0",
|
|
79
79
|
"jsrsasign": "10.9.0",
|
|
80
|
-
"lru-cache": "11.0.
|
|
80
|
+
"lru-cache": "11.0.1",
|
|
81
81
|
"lz-string": "1.5.0",
|
|
82
82
|
"mailparser": "3.7.1",
|
|
83
83
|
"markdown-it": "14.1.0",
|
|
84
84
|
"module-alias": "2.2.3",
|
|
85
85
|
"notion-to-md": "3.1.1",
|
|
86
86
|
"oauth-1.0a": "2.2.6",
|
|
87
|
-
"ofetch": "1.
|
|
87
|
+
"ofetch": "1.4.0",
|
|
88
88
|
"otplib": "12.0.1",
|
|
89
89
|
"pac-proxy-agent": "7.0.2",
|
|
90
|
-
"proxy-chain": "2.5.
|
|
90
|
+
"proxy-chain": "2.5.3",
|
|
91
91
|
"puppeteer": "22.6.2",
|
|
92
92
|
"puppeteer-extra": "3.3.6",
|
|
93
93
|
"puppeteer-extra-plugin-stealth": "2.11.2",
|
|
@@ -95,20 +95,20 @@
|
|
|
95
95
|
"puppeteer-extra-plugin-user-preferences": "2.4.1",
|
|
96
96
|
"query-string": "9.1.0",
|
|
97
97
|
"rate-limiter-flexible": "5.0.3",
|
|
98
|
-
"re2js": "0.4.
|
|
98
|
+
"re2js": "0.4.2",
|
|
99
99
|
"rfc4648": "1.5.3",
|
|
100
100
|
"rss-parser": "3.13.0",
|
|
101
|
-
"sanitize-html": "2.13.
|
|
101
|
+
"sanitize-html": "2.13.1",
|
|
102
102
|
"simplecc-wasm": "1.0.0",
|
|
103
103
|
"socks-proxy-agent": "8.0.4",
|
|
104
104
|
"source-map": "0.7.4",
|
|
105
|
-
"telegram": "2.
|
|
105
|
+
"telegram": "2.25.11",
|
|
106
106
|
"tiny-async-pool": "2.1.0",
|
|
107
107
|
"title": "3.5.3",
|
|
108
|
-
"tldts": "6.1.
|
|
108
|
+
"tldts": "6.1.50",
|
|
109
109
|
"tosource": "2.0.0-alpha.3",
|
|
110
|
-
"tough-cookie": "
|
|
111
|
-
"tsx": "4.
|
|
110
|
+
"tough-cookie": "5.0.0",
|
|
111
|
+
"tsx": "4.19.1",
|
|
112
112
|
"twitter-api-v2": "1.17.2",
|
|
113
113
|
"undici": "6.19.8",
|
|
114
114
|
"uuid": "10.0.0",
|
|
@@ -117,16 +117,16 @@
|
|
|
117
117
|
"zod": "3.23.8"
|
|
118
118
|
},
|
|
119
119
|
"devDependencies": {
|
|
120
|
-
"@babel/preset-env": "7.25.
|
|
121
|
-
"@babel/preset-typescript": "7.
|
|
120
|
+
"@babel/preset-env": "7.25.7",
|
|
121
|
+
"@babel/preset-typescript": "7.25.7",
|
|
122
122
|
"@eslint/eslintrc": "3.1.0",
|
|
123
|
-
"@eslint/js": "9.
|
|
123
|
+
"@eslint/js": "9.11.1",
|
|
124
124
|
"@microsoft/eslint-formatter-sarif": "3.1.0",
|
|
125
|
-
"@stylistic/eslint-plugin": "2.
|
|
125
|
+
"@stylistic/eslint-plugin": "2.8.0",
|
|
126
126
|
"@types/aes-js": "3.1.4",
|
|
127
127
|
"@types/babel__preset-env": "7.9.7",
|
|
128
128
|
"@types/crypto-js": "4.2.2",
|
|
129
|
-
"@types/eslint": "9.6.
|
|
129
|
+
"@types/eslint": "9.6.1",
|
|
130
130
|
"@types/etag": "1.8.3",
|
|
131
131
|
"@types/fs-extra": "11.0.4",
|
|
132
132
|
"@types/html-to-text": "9.0.4",
|
|
@@ -139,37 +139,36 @@
|
|
|
139
139
|
"@types/mailparser": "3.4.4",
|
|
140
140
|
"@types/markdown-it": "14.1.2",
|
|
141
141
|
"@types/module-alias": "2.0.4",
|
|
142
|
-
"@types/node": "22.4
|
|
142
|
+
"@types/node": "22.7.4",
|
|
143
143
|
"@types/sanitize-html": "2.13.0",
|
|
144
144
|
"@types/supertest": "6.0.2",
|
|
145
145
|
"@types/tiny-async-pool": "2.0.3",
|
|
146
146
|
"@types/title": "3.4.3",
|
|
147
|
-
"@types/tough-cookie": "4.0.5",
|
|
148
147
|
"@types/uuid": "10.0.0",
|
|
149
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
150
|
-
"@typescript-eslint/parser": "8.
|
|
151
|
-
"@vercel/nft": "0.27.
|
|
148
|
+
"@typescript-eslint/eslint-plugin": "8.8.0",
|
|
149
|
+
"@typescript-eslint/parser": "8.8.0",
|
|
150
|
+
"@vercel/nft": "0.27.4",
|
|
152
151
|
"@vitest/coverage-v8": "2.0.5",
|
|
153
|
-
"discord-api-types": "0.37.
|
|
154
|
-
"eslint": "9.
|
|
152
|
+
"discord-api-types": "0.37.101",
|
|
153
|
+
"eslint": "9.11.1",
|
|
155
154
|
"eslint-config-prettier": "9.1.0",
|
|
156
155
|
"eslint-nibble": "8.1.0",
|
|
157
|
-
"eslint-plugin-n": "17.10.
|
|
156
|
+
"eslint-plugin-n": "17.10.3",
|
|
158
157
|
"eslint-plugin-prettier": "5.2.1",
|
|
159
|
-
"eslint-plugin-unicorn": "
|
|
158
|
+
"eslint-plugin-unicorn": "56.0.0",
|
|
160
159
|
"eslint-plugin-yml": "1.14.0",
|
|
161
160
|
"fs-extra": "11.2.0",
|
|
162
|
-
"globals": "15.
|
|
161
|
+
"globals": "15.10.0",
|
|
163
162
|
"got": "14.4.2",
|
|
164
|
-
"husky": "9.1.
|
|
163
|
+
"husky": "9.1.6",
|
|
165
164
|
"js-beautify": "1.15.1",
|
|
166
|
-
"lint-staged": "15.2.
|
|
165
|
+
"lint-staged": "15.2.10",
|
|
167
166
|
"mockdate": "3.0.5",
|
|
168
|
-
"msw": "2.3
|
|
167
|
+
"msw": "2.4.3",
|
|
169
168
|
"prettier": "3.3.3",
|
|
170
169
|
"remark-parse": "11.0.0",
|
|
171
170
|
"supertest": "7.0.0",
|
|
172
|
-
"typescript": "5.
|
|
171
|
+
"typescript": "5.6.2",
|
|
173
172
|
"unified": "11.0.5",
|
|
174
173
|
"vite-tsconfig-paths": "5.0.1",
|
|
175
174
|
"vitest": "2.0.5",
|
package/lib/routes/a9vg/a9vg.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { Route } from '@/types';
|
|
2
|
-
import got from '@/utils/got';
|
|
3
|
-
import * as cheerio from 'cheerio';
|
|
4
|
-
import { parseDate } from '@/utils/parse-date';
|
|
5
|
-
import timezone from '@/utils/timezone';
|
|
6
|
-
|
|
7
|
-
export const route: Route = {
|
|
8
|
-
path: '/',
|
|
9
|
-
radar: [
|
|
10
|
-
{
|
|
11
|
-
source: ['a9vg.com/list/news', 'a9vg.com/'],
|
|
12
|
-
target: '',
|
|
13
|
-
},
|
|
14
|
-
],
|
|
15
|
-
name: 'Unknown',
|
|
16
|
-
maintainers: ['monnerHenster'],
|
|
17
|
-
handler,
|
|
18
|
-
url: 'a9vg.com/list/news',
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
async function handler() {
|
|
22
|
-
const baseUrl = 'http://www.a9vg.com';
|
|
23
|
-
const link = `${baseUrl}/list/news`;
|
|
24
|
-
const { data } = await got(link);
|
|
25
|
-
|
|
26
|
-
const $ = cheerio.load(data);
|
|
27
|
-
const list = $('.a9-rich-card-list li')
|
|
28
|
-
.toArray()
|
|
29
|
-
.map((elem) => {
|
|
30
|
-
const item = $(elem);
|
|
31
|
-
return {
|
|
32
|
-
title: item.find('.a9-rich-card-list_label').text(),
|
|
33
|
-
description: `<img src="${item.find('img').attr('src')}"><br>${item.find('.a9-rich-card-list_summary').text().trim()}`,
|
|
34
|
-
pubDate: timezone(parseDate(item.find('.a9-rich-card-list_infos').text().trim(), 'YYYY-MM-DD HH:mm:ss'), 8),
|
|
35
|
-
link: `${baseUrl}${item.find('.a9-rich-card-list_item').attr('href')}`,
|
|
36
|
-
};
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
return {
|
|
40
|
-
title: 'A9VG 电玩部落',
|
|
41
|
-
link,
|
|
42
|
-
description: $('meta[name="description"]').attr('content'),
|
|
43
|
-
item: list,
|
|
44
|
-
};
|
|
45
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { Route } from '@/types';
|
|
2
|
-
import cache from '@/utils/cache';
|
|
3
|
-
import got from '@/utils/got';
|
|
4
|
-
import { load } from 'cheerio';
|
|
5
|
-
import { parseDate } from '@/utils/parse-date';
|
|
6
|
-
|
|
7
|
-
export const route: Route = {
|
|
8
|
-
path: '/lawandrules/:slug?',
|
|
9
|
-
categories: ['finance'],
|
|
10
|
-
example: '/sse/lawandrules',
|
|
11
|
-
parameters: { slug: '见下文,默认为 `latest`' },
|
|
12
|
-
features: {
|
|
13
|
-
requireConfig: false,
|
|
14
|
-
requirePuppeteer: false,
|
|
15
|
-
antiCrawler: false,
|
|
16
|
-
supportBT: false,
|
|
17
|
-
supportPodcast: false,
|
|
18
|
-
supportScihub: false,
|
|
19
|
-
},
|
|
20
|
-
name: '本所业务指南与流程',
|
|
21
|
-
maintainers: ['nczitzk'],
|
|
22
|
-
handler,
|
|
23
|
-
description: `将目标栏目的网址拆解为 \`https://www.sse.com.cn/lawandrules/guide/\` 和后面的字段,把后面的字段中的 \`/\` 替换为 \`-\`,即为该路由的 slug
|
|
24
|
-
|
|
25
|
-
如:(最新指南与流程)\`https://www.sse.com.cn/lawandrules/guide/latest\` 的网址在 \`https://www.sse.com.cn/lawandrules/guide/\` 后的字段是 \`latest\`,则对应的 slug 为 \`latest\`,对应的路由即为 \`/sse/lawandrules/latest\`
|
|
26
|
-
|
|
27
|
-
又如:(主板业务指南与流程 - 发行承销业务指南)\`https://www.sse.com.cn/lawandrules/guide/zbywznylc/fxcxywzn\` 的网址在 \`https://www.sse.com.cn/lawandrules/guide/\` 后的字段是 \`zbywznylc/fxcxywzn\`,则对应的 slug 为 \`zbywznylc-fxcxywzn\`,对应的路由即为 \`/sse/lawandrules/zbywznylc-fxcxywzn\``,
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
async function handler(ctx) {
|
|
31
|
-
const slug = ctx.req.param('slug') ?? 'latest';
|
|
32
|
-
|
|
33
|
-
const rootUrl = 'https://www.sse.com.cn';
|
|
34
|
-
const currentUrl = `${rootUrl}/lawandrules/guide/${slug.replaceAll('-', '/')}`;
|
|
35
|
-
const response = await got(currentUrl);
|
|
36
|
-
|
|
37
|
-
const $ = load(response.data);
|
|
38
|
-
|
|
39
|
-
const list = $('.sse_list_1 dl dd')
|
|
40
|
-
.toArray()
|
|
41
|
-
.map((item) => {
|
|
42
|
-
item = $(item);
|
|
43
|
-
return {
|
|
44
|
-
title: item.find('a').attr('title'),
|
|
45
|
-
link: `${rootUrl}${item.find('a').attr('href')}`,
|
|
46
|
-
pubDate: parseDate(item.find('span').text().trim()),
|
|
47
|
-
};
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
const items = await Promise.all(
|
|
51
|
-
list.map((item) =>
|
|
52
|
-
cache.tryGet(item.link, async () => {
|
|
53
|
-
const detailResponse = await got(item.link);
|
|
54
|
-
const content = load(detailResponse.data);
|
|
55
|
-
|
|
56
|
-
item.description = content('.allZoom').html();
|
|
57
|
-
|
|
58
|
-
return item;
|
|
59
|
-
})
|
|
60
|
-
)
|
|
61
|
-
);
|
|
62
|
-
|
|
63
|
-
return {
|
|
64
|
-
title: $('title').text(),
|
|
65
|
-
link: currentUrl,
|
|
66
|
-
item: items,
|
|
67
|
-
};
|
|
68
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
const got = require('@/utils/got');
|
|
2
|
-
const cheerio = require('cheerio');
|
|
3
|
-
|
|
4
|
-
module.exports = async (ctx) => {
|
|
5
|
-
const { time, name } = ctx.params;
|
|
6
|
-
const $ = await got.get(`https://anime1.me/category/${encodeURIComponent(time)}/${encodeURIComponent(name)}`).then((r) => cheerio.load(r.data));
|
|
7
|
-
const title = $('.page-title').text().trim();
|
|
8
|
-
ctx.state.data = {
|
|
9
|
-
title,
|
|
10
|
-
link: `https://anime1.me/category/${time}/${name}`,
|
|
11
|
-
description: title,
|
|
12
|
-
item: $('article')
|
|
13
|
-
.toArray()
|
|
14
|
-
.map((art) => {
|
|
15
|
-
const $el = $(art);
|
|
16
|
-
const title = $el.find('.entry-title a').text();
|
|
17
|
-
return {
|
|
18
|
-
title: $el.find('.entry-title a').text(),
|
|
19
|
-
link: $el.find('.entry-title a').attr('href'),
|
|
20
|
-
description: title,
|
|
21
|
-
pubDate: new Date($el.find('time').attr('datetime')).toUTCString(),
|
|
22
|
-
};
|
|
23
|
-
}),
|
|
24
|
-
};
|
|
25
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
const got = require('@/utils/got');
|
|
2
|
-
const cheerio = require('cheerio');
|
|
3
|
-
|
|
4
|
-
module.exports = async (ctx) => {
|
|
5
|
-
const { keyword } = ctx.params;
|
|
6
|
-
const $ = await got.get(`https://anime1.me/?s=${encodeURIComponent(keyword)}`).then((r) => cheerio.load(r.data));
|
|
7
|
-
const title = $('.page-title').text().trim();
|
|
8
|
-
ctx.state.data = {
|
|
9
|
-
title,
|
|
10
|
-
link: `https://anime1.me/?s=${keyword}`,
|
|
11
|
-
description: title,
|
|
12
|
-
item: $('article:has(.cat-links)')
|
|
13
|
-
.toArray()
|
|
14
|
-
.map((art) => {
|
|
15
|
-
const $el = $(art);
|
|
16
|
-
const title = $el.find('.entry-title a').text();
|
|
17
|
-
return {
|
|
18
|
-
title: $el.find('.entry-title a').text(),
|
|
19
|
-
link: $el.find('.entry-title a').attr('href'),
|
|
20
|
-
description: title,
|
|
21
|
-
pubDate: new Date($el.find('time').attr('datetime')).toUTCString(),
|
|
22
|
-
};
|
|
23
|
-
}),
|
|
24
|
-
};
|
|
25
|
-
};
|
|
@@ -1,60 +0,0 @@
|
|
|
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
|
-
const host = 'https://www.dykszx.com';
|
|
6
|
-
|
|
7
|
-
// disable ssl check
|
|
8
|
-
const options = { https: { rejectUnauthorized: false } };
|
|
9
|
-
|
|
10
|
-
const getContent = (href, caches) => {
|
|
11
|
-
const newsPage = `${host}${href}`;
|
|
12
|
-
return caches.tryGet(newsPage, async () => {
|
|
13
|
-
const response = await got.get(newsPage, options);
|
|
14
|
-
const data = response.data;
|
|
15
|
-
const $ = cheerio.load(data);
|
|
16
|
-
const newsTime = $('body > div:nth-child(3) > div.page.w > div.shuxing.w')
|
|
17
|
-
.text()
|
|
18
|
-
.trim()
|
|
19
|
-
.match(/时间:(.*?)点击/g)[0];
|
|
20
|
-
// 移除二维码
|
|
21
|
-
$('.sjlook').remove();
|
|
22
|
-
const content = $('#show-body').html();
|
|
23
|
-
return { newsTime, content, newsPage };
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
const newsTypeObj = {
|
|
28
|
-
all: { selector: '#nrs > li > b', name: '新闻中心' },
|
|
29
|
-
gwy: { selector: 'body > div:nth-child(3) > div:nth-child(8) > ul > li', name: '公务员考试' },
|
|
30
|
-
sydw: { selector: 'body > div:nth-child(3) > div:nth-child(9) > ul > li', name: '事业单位考试' },
|
|
31
|
-
zyzc: { selector: 'body > div:nth-child(3) > div:nth-child(10) > ul > li', name: '执(职)业资格、职称考试' },
|
|
32
|
-
other: { selector: 'body > div:nth-child(3) > div:nth-child(11) > ul > li', name: '其他考试' },
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
module.exports = async (ctx) => {
|
|
36
|
-
const newsType = ctx.params.type || 'all';
|
|
37
|
-
const response = await got(host, options);
|
|
38
|
-
const data = response.data;
|
|
39
|
-
const $ = cheerio.load(data);
|
|
40
|
-
const newsList = $(newsTypeObj[newsType].selector).toArray();
|
|
41
|
-
|
|
42
|
-
const newsDetail = await Promise.all(
|
|
43
|
-
newsList.map(async (item) => {
|
|
44
|
-
const href = item.children[0].attribs.href;
|
|
45
|
-
const newsContent = await getContent(href, ctx.cache);
|
|
46
|
-
return {
|
|
47
|
-
title: item.children[0].children[0].data,
|
|
48
|
-
description: newsContent.content,
|
|
49
|
-
link: newsContent.newsPage,
|
|
50
|
-
pubDate: timezone(parseDate(newsContent.newsTime, '时间:YYYY-MM-DD HH:mm:ss'), +8),
|
|
51
|
-
};
|
|
52
|
-
})
|
|
53
|
-
);
|
|
54
|
-
ctx.state.data = {
|
|
55
|
-
title: `德阳人事考试网 - ${newsTypeObj[newsType].name}`,
|
|
56
|
-
link: host,
|
|
57
|
-
description: '德阳人事考试网 考试新闻发布',
|
|
58
|
-
item: newsDetail,
|
|
59
|
-
};
|
|
60
|
-
};
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
const got = require('@/utils/got');
|
|
2
|
-
const cheerio = require('cheerio');
|
|
3
|
-
|
|
4
|
-
const map = new Map([
|
|
5
|
-
['qysj', { title: '趣囧时间', suffix: 'ent/qw' }],
|
|
6
|
-
['ymyy', { title: '游民影院', suffix: 'wenku/movie' }],
|
|
7
|
-
['ygtx', { title: '游观天下', suffix: 'ent/discovery' }],
|
|
8
|
-
['bztk', { title: '壁纸图库', suffix: 'ent/wp' }],
|
|
9
|
-
['ympd', { title: '游民盘点', suffix: 'wenku' }],
|
|
10
|
-
['ymfl', { title: '游民福利', suffix: 'ent/xz/' }],
|
|
11
|
-
]);
|
|
12
|
-
|
|
13
|
-
module.exports = async (ctx) => {
|
|
14
|
-
const category = ctx.params.category;
|
|
15
|
-
const suffix = map.get(category).suffix;
|
|
16
|
-
const title = map.get(category).title;
|
|
17
|
-
|
|
18
|
-
const url = `https://www.gamersky.com/${suffix}`;
|
|
19
|
-
const response = await got({
|
|
20
|
-
method: 'get',
|
|
21
|
-
url,
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
const data = response.data;
|
|
25
|
-
const $ = cheerio.load(data);
|
|
26
|
-
|
|
27
|
-
const list = $('ul.pictxt.contentpaging li')
|
|
28
|
-
.slice(0, 10)
|
|
29
|
-
.map(function () {
|
|
30
|
-
const info = {
|
|
31
|
-
title: $(this).find('div.tit a').text(),
|
|
32
|
-
link: $(this).find('div.tit a').attr('href'),
|
|
33
|
-
pubDate: new Date($(this).find('.time').text()).toUTCString(),
|
|
34
|
-
};
|
|
35
|
-
return info;
|
|
36
|
-
})
|
|
37
|
-
.get();
|
|
38
|
-
|
|
39
|
-
const out = await Promise.all(
|
|
40
|
-
list.map(async (info) => {
|
|
41
|
-
const title = info.title;
|
|
42
|
-
const itemUrl = info.link.startsWith('https://') ? info.link : `https://www.gamersky.com/${info.link}`;
|
|
43
|
-
const pubDate = info.pubDate;
|
|
44
|
-
|
|
45
|
-
const cache = await ctx.cache.get(itemUrl);
|
|
46
|
-
if (cache) {
|
|
47
|
-
return JSON.parse(cache);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const response = await got.get(itemUrl);
|
|
51
|
-
const $ = cheerio.load(response.data);
|
|
52
|
-
|
|
53
|
-
let next_pages = $('div.page_css a')
|
|
54
|
-
.map(function () {
|
|
55
|
-
return $(this).attr('href');
|
|
56
|
-
})
|
|
57
|
-
.get();
|
|
58
|
-
|
|
59
|
-
next_pages = next_pages.slice(0, -1);
|
|
60
|
-
|
|
61
|
-
const des = await Promise.all(
|
|
62
|
-
next_pages.map(async (next_page) => {
|
|
63
|
-
const response = await got.get(next_page);
|
|
64
|
-
const $ = cheerio.load(response.data);
|
|
65
|
-
$('div.page_css').remove();
|
|
66
|
-
|
|
67
|
-
return $('.Mid2L_con').html().trim();
|
|
68
|
-
})
|
|
69
|
-
);
|
|
70
|
-
|
|
71
|
-
const description = des.join('');
|
|
72
|
-
|
|
73
|
-
const single = {
|
|
74
|
-
title,
|
|
75
|
-
link: itemUrl,
|
|
76
|
-
description,
|
|
77
|
-
pubDate,
|
|
78
|
-
};
|
|
79
|
-
ctx.cache.set(itemUrl, JSON.stringify(single));
|
|
80
|
-
return single;
|
|
81
|
-
})
|
|
82
|
-
);
|
|
83
|
-
|
|
84
|
-
ctx.state.data = {
|
|
85
|
-
title: `游民娱乐-${title}`,
|
|
86
|
-
link: url,
|
|
87
|
-
item: out,
|
|
88
|
-
};
|
|
89
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
const got = require('@/utils/got');
|
|
2
|
-
const cheerio = require('cheerio');
|
|
3
|
-
|
|
4
|
-
module.exports = async (ctx) => {
|
|
5
|
-
const response = await got({
|
|
6
|
-
method: 'get',
|
|
7
|
-
url: 'https://www.gamersky.com/news/',
|
|
8
|
-
headers: {
|
|
9
|
-
Referer: 'https://www.gamersky.com/news/',
|
|
10
|
-
},
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
const data = response.data;
|
|
14
|
-
const $ = cheerio.load(data);
|
|
15
|
-
|
|
16
|
-
const out = $('.Mid2L_con li')
|
|
17
|
-
.slice(0, 10)
|
|
18
|
-
.map(function () {
|
|
19
|
-
const info = {
|
|
20
|
-
title: $(this).find('.tt').text(),
|
|
21
|
-
link: $(this).find('.tt').attr('href'),
|
|
22
|
-
pubDate: new Date($(this).find('.time').text()).toUTCString(),
|
|
23
|
-
description: $(this).find('.txt').text(),
|
|
24
|
-
};
|
|
25
|
-
return info;
|
|
26
|
-
})
|
|
27
|
-
.get();
|
|
28
|
-
|
|
29
|
-
ctx.state.data = {
|
|
30
|
-
title: '游民星空-今日推荐',
|
|
31
|
-
link: 'https://www.gamersky.com/news/',
|
|
32
|
-
item: out,
|
|
33
|
-
};
|
|
34
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
const got = require('@/utils/got');
|
|
2
|
-
|
|
3
|
-
module.exports = async (ctx) => {
|
|
4
|
-
const url = 'https://mainssl.geekpark.net/api/v1/posts';
|
|
5
|
-
const link = 'https://www.geekpark.net';
|
|
6
|
-
|
|
7
|
-
const response = await got({
|
|
8
|
-
method: 'get',
|
|
9
|
-
url,
|
|
10
|
-
});
|
|
11
|
-
const data = response.data.posts;
|
|
12
|
-
|
|
13
|
-
ctx.state.data = {
|
|
14
|
-
title: '极客公园 - 资讯',
|
|
15
|
-
description:
|
|
16
|
-
'极客公园聚焦互联网领域,跟踪最新的科技新闻动态,关注极具创新精神的科技产品。目前涵盖前沿科技、游戏、手机评测、硬件测评、出行方式、共享经济、人工智能等全方位的科技生活内容。现有前沿社、挖App、深度报道、极客养成指南等多个内容栏目。',
|
|
17
|
-
link,
|
|
18
|
-
item: data.map(({ title, content, published_at, id }) => ({
|
|
19
|
-
title,
|
|
20
|
-
link: `https://www.geekpark.net/news/${id}`,
|
|
21
|
-
description: content,
|
|
22
|
-
pubDate: new Date(published_at).toUTCString(),
|
|
23
|
-
})),
|
|
24
|
-
};
|
|
25
|
-
};
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
const got = require('@/utils/got');
|
|
2
|
-
const queryString = require('query-string');
|
|
3
|
-
|
|
4
|
-
module.exports = async (ctx) => {
|
|
5
|
-
const { period = '1d' } = ctx.params;
|
|
6
|
-
|
|
7
|
-
const baseUrl = ctx.path.startsWith('/konachan.net') ? 'https://konachan.net' : 'https://konachan.com';
|
|
8
|
-
const safemode = ctx.path.startsWith('/konachan.net');
|
|
9
|
-
|
|
10
|
-
const response = await got({
|
|
11
|
-
method: 'get',
|
|
12
|
-
url: `${baseUrl}/post/popular_recent.json`,
|
|
13
|
-
searchParams: queryString.stringify({
|
|
14
|
-
period,
|
|
15
|
-
}),
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
const posts = response.data;
|
|
19
|
-
|
|
20
|
-
const titles = {
|
|
21
|
-
'1d': 'Exploring last 24 hours ',
|
|
22
|
-
'1w': 'Exploring last week',
|
|
23
|
-
'1m': 'Exploring last month',
|
|
24
|
-
'1y': 'Exploring last year',
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
const title = titles[period] || titles['1d'];
|
|
28
|
-
|
|
29
|
-
ctx.state.data = {
|
|
30
|
-
title: `${title} - Konachan Anime Wallpapers`,
|
|
31
|
-
link: `${baseUrl}/post/popular_recent`,
|
|
32
|
-
item: posts
|
|
33
|
-
.filter((post) => !(safemode && post.rating !== 's'))
|
|
34
|
-
.map((post) => {
|
|
35
|
-
const content = (url) => {
|
|
36
|
-
if (url.startsWith('//')) {
|
|
37
|
-
url = 'https:' + url;
|
|
38
|
-
}
|
|
39
|
-
let result = `<img src="${url}" />`;
|
|
40
|
-
if (post.source) {
|
|
41
|
-
result += `<a href="${post.source}">source</a>`;
|
|
42
|
-
}
|
|
43
|
-
if (post.parent_id) {
|
|
44
|
-
result += `<a href="${baseUrl}/post/show/${post.parent_id}">parent</a>`;
|
|
45
|
-
}
|
|
46
|
-
return result;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
const created_at = post.created_at * 1e3;
|
|
50
|
-
|
|
51
|
-
return {
|
|
52
|
-
title: post.tags,
|
|
53
|
-
id: `${ctx.path}#${post.id}`,
|
|
54
|
-
guid: `${ctx.path}#${post.id}`,
|
|
55
|
-
link: `${baseUrl}/post/show/${post.id}`,
|
|
56
|
-
author: post.author,
|
|
57
|
-
published: new Date(created_at).toISOString(),
|
|
58
|
-
pubDate: new Date(created_at).toUTCString(),
|
|
59
|
-
description: content(post.sample_url),
|
|
60
|
-
summary: content(post.sample_url),
|
|
61
|
-
content: { html: content(post.file_url) },
|
|
62
|
-
image: post.file_url,
|
|
63
|
-
category: post.tags.split(/\s+/),
|
|
64
|
-
};
|
|
65
|
-
}),
|
|
66
|
-
};
|
|
67
|
-
};
|