rsshub 1.0.0-master.d455801 → 1.0.0-master.d465975
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 +4 -3
- package/lib/api_router.js +1 -1
- package/lib/config.js +3 -0
- package/lib/maintainer.js +25 -0
- package/lib/radar-rules.js +0 -187
- package/lib/radar.js +56 -0
- package/lib/router.js +17 -17
- package/lib/v2/1point3acres/blog.js +67 -0
- package/lib/v2/1point3acres/category.js +17 -0
- package/lib/v2/1point3acres/maintainer.js +9 -0
- package/lib/v2/1point3acres/offer.js +69 -0
- package/lib/v2/1point3acres/radar.js +53 -0
- package/lib/v2/1point3acres/router.js +10 -0
- package/lib/v2/1point3acres/section.js +28 -0
- package/lib/v2/1point3acres/templates/image.art +1 -0
- package/lib/v2/1point3acres/templates/offer.art +11 -0
- package/lib/v2/1point3acres/thread.js +15 -0
- package/lib/v2/1point3acres/utils.js +79 -0
- package/lib/v2/2048/radar.js +13 -0
- package/lib/v2/591/maintainer.js +3 -0
- package/lib/{routes → v2}/6park/index.js +20 -12
- package/lib/v2/6park/maintainer.js +8 -0
- package/lib/v2/6park/news.js +76 -0
- package/lib/v2/6park/radar.js +65 -0
- package/lib/v2/6park/router.js +4 -0
- package/lib/v2/6v123/utils.js +4 -2
- package/lib/v2/acfun/radar.js +1 -1
- package/lib/v2/apache/apisix/blog.js +32 -0
- package/lib/v2/apache/maintainer.js +3 -0
- package/lib/v2/apache/radar.js +13 -0
- package/lib/v2/apache/router.js +3 -0
- package/lib/v2/apiseven/blog.js +46 -0
- package/lib/v2/apiseven/maintainer.js +3 -0
- package/lib/v2/apiseven/radar.js +13 -0
- package/lib/v2/apiseven/router.js +3 -0
- package/lib/v2/arcteryx/maintainer.js +1 -0
- package/lib/v2/arcteryx/new-arrivals.js +4 -15
- package/lib/v2/arcteryx/outlet.js +40 -0
- package/lib/v2/arcteryx/radar.js +8 -0
- package/lib/v2/arcteryx/router.js +1 -0
- package/lib/v2/arcteryx/templates/product-description.art +9 -3
- package/lib/v2/arcteryx/utils.js +23 -0
- package/lib/v2/bast/index.js +74 -0
- package/lib/v2/bast/maintainer.js +3 -0
- package/lib/v2/bast/radar.js +13 -0
- package/lib/v2/bast/router.js +3 -0
- package/lib/v2/bgmlist/maintainer.js +3 -0
- package/lib/v2/bgmlist/onair.js +32 -0
- package/lib/v2/bgmlist/radar.js +13 -0
- package/lib/v2/bgmlist/router.js +3 -0
- package/lib/v2/bgmlist/templates/description.art +4 -0
- package/lib/v2/bilibili/utils.js +4 -3
- package/lib/v2/biquge/radar.js +1 -1
- package/lib/v2/camchina/index.js +52 -0
- package/lib/v2/camchina/maintainer.js +3 -0
- package/lib/v2/camchina/radar.js +13 -0
- package/lib/v2/camchina/router.js +3 -0
- package/lib/v2/cankaoxiaoxi/index.js +44 -57
- package/lib/v2/cankaoxiaoxi/maintainer.js +2 -1
- package/lib/v2/cankaoxiaoxi/radar.js +7 -52
- package/lib/v2/cankaoxiaoxi/router.js +2 -1
- package/lib/v2/cankaoxiaoxi/templates/description.art +5 -0
- package/lib/v2/chsi/kyzx.js +51 -0
- package/lib/v2/chsi/maintainer.js +1 -0
- package/lib/v2/chsi/radar.js +9 -3
- package/lib/v2/chsi/router.js +1 -0
- package/lib/v2/civitai/discussions.js +42 -0
- package/lib/v2/civitai/maintainer.js +4 -0
- package/lib/v2/civitai/models.js +26 -0
- package/lib/v2/civitai/radar.js +19 -0
- package/lib/v2/civitai/router.js +4 -0
- package/lib/v2/cloudnative/blog.js +34 -0
- package/lib/v2/cloudnative/maintainer.js +3 -0
- package/lib/v2/cloudnative/radar.js +13 -0
- package/lib/v2/cloudnative/router.js +3 -0
- package/lib/v2/cls/radar.js +3 -3
- package/lib/v2/cpuid/maintainer.js +3 -0
- package/lib/v2/cste/index.js +56 -0
- package/lib/v2/cste/maintainer.js +3 -0
- package/lib/v2/cste/radar.js +13 -0
- package/lib/v2/cste/router.js +3 -0
- package/lib/v2/ddosi/radar.js +2 -2
- package/lib/v2/disinformationindex/maintainer.js +1 -1
- package/lib/v2/disinformationindex/radar.js +1 -1
- package/lib/v2/dlsite/ci-en/article.js +64 -0
- package/lib/v2/dlsite/maintainer.js +1 -0
- package/lib/v2/dlsite/radar.js +8 -0
- package/lib/v2/dlsite/router.js +1 -0
- package/lib/v2/domp4/detail.js +1 -3
- package/lib/v2/domp4/latest.js +3 -2
- package/lib/v2/domp4/utils.js +3 -0
- package/lib/v2/earthquake/radar.js +2 -2
- package/lib/v2/eastmoney/maintainer.js +4 -0
- package/lib/v2/eastmoney/radar.js +8 -0
- package/lib/v2/eastmoney/router.js +1 -0
- package/lib/v2/eastmoney/search/index.js +55 -0
- package/lib/v2/epicgames/radar.js +13 -0
- package/lib/v2/feng/maintainer.js +3 -0
- package/lib/v2/ff14/radar.js +30 -0
- package/lib/v2/fortnite/maintainer.js +3 -0
- package/lib/v2/fortnite/news.js +58 -0
- package/lib/v2/fortnite/radar.js +16 -0
- package/lib/v2/fortnite/router.js +3 -0
- package/lib/v2/freecomputerbooks/index.js +66 -0
- package/lib/v2/freecomputerbooks/maintainer.js +4 -0
- package/lib/v2/freecomputerbooks/radar.js +31 -0
- package/lib/v2/freecomputerbooks/router.js +3 -0
- package/lib/v2/geocaching/blogs.js +30 -0
- package/lib/v2/geocaching/maintainer.js +3 -0
- package/lib/v2/geocaching/radar.js +13 -0
- package/lib/v2/geocaching/router.js +3 -0
- package/lib/v2/geocaching/templates/blogs.art +6 -0
- package/lib/v2/gitee/radar.js +4 -4
- package/lib/v2/github/maintainer.js +2 -1
- package/lib/v2/github/notifications.js +47 -0
- package/lib/v2/github/radar.js +6 -0
- package/lib/v2/github/router.js +1 -0
- package/lib/v2/github/trending.js +8 -10
- package/lib/v2/gov/jinan/healthcommission/medical_exam_notice.js +49 -0
- package/lib/v2/gov/maintainer.js +5 -2
- package/lib/v2/gov/news/index.js +114 -0
- package/lib/v2/gov/radar.js +60 -3
- package/lib/v2/gov/router.js +4 -1
- package/lib/v2/gov/sichuan/deyang/govpublicinfo.js +92 -0
- package/lib/v2/gov/sichuan/deyang/mztoday.js +134 -0
- package/lib/v2/gov/sichuan/deyang/templates/govPublicInfo.art +42 -37
- package/lib/v2/gov/sichuan/deyang/templates/mztoday.art +6 -0
- package/lib/v2/gov/stats/index.js +101 -8
- package/lib/v2/gov/stats/templates/description.art +12 -0
- package/lib/v2/gxmzu/ai.js +18 -0
- package/lib/v2/gxmzu/maintainer.js +4 -0
- package/lib/v2/gxmzu/radar.js +21 -0
- package/lib/v2/gxmzu/router.js +4 -0
- package/lib/v2/gxmzu/utils/index.js +55 -0
- package/lib/v2/gxmzu/yjs.js +18 -0
- package/lib/v2/gz-cmc/index.js +137 -0
- package/lib/v2/gz-cmc/maintainer.js +3 -0
- package/lib/v2/gz-cmc/radar.js +12 -0
- package/lib/v2/gz-cmc/router.js +3 -0
- package/lib/v2/gz-cmc/templates/description.art +3 -0
- package/lib/v2/gzdaily/app.js +53 -0
- package/lib/v2/gzdaily/maintainer.js +3 -0
- package/lib/v2/gzdaily/radar.js +12 -0
- package/lib/v2/gzdaily/router.js +3 -0
- package/lib/v2/gzdaily/templates/description.art +3 -0
- package/lib/v2/hackmd/radar.js +1 -1
- package/lib/v2/hk01/channel.js +2 -2
- package/lib/v2/hk01/latest.js +20 -0
- package/lib/v2/hk01/maintainer.js +1 -0
- package/lib/v2/hk01/radar.js +11 -5
- package/lib/v2/hk01/router.js +1 -0
- package/lib/v2/icac/radar.js +2 -2
- package/lib/v2/ieee/earlyaccess.js +77 -0
- package/lib/v2/ieee/maintainer.js +1 -0
- package/lib/v2/ieee/radar.js +6 -0
- package/lib/v2/ieee/router.js +2 -1
- package/lib/v2/ifi-audio/radar.js +11 -0
- package/lib/v2/inoreader/maintainer.js +1 -0
- package/lib/v2/inoreader/radar.js +6 -0
- package/lib/v2/inoreader/router.js +1 -0
- package/lib/v2/inoreader/rss.js +47 -0
- package/lib/v2/instructables/maintainer.js +3 -0
- package/lib/v2/instructables/projects.js +56 -0
- package/lib/v2/instructables/radar.js +19 -0
- package/lib/v2/instructables/router.js +3 -0
- package/lib/{routes/3k8 → v2/iqnew}/latest.js +19 -12
- package/lib/v2/iqnew/maintainer.js +3 -0
- package/lib/v2/iqnew/radar.js +13 -0
- package/lib/v2/iqnew/router.js +3 -0
- package/lib/v2/iwara/radar.js +2 -2
- package/lib/v2/jou/home.js +18 -0
- package/lib/v2/jou/maintainer.js +4 -0
- package/lib/v2/jou/radar.js +21 -0
- package/lib/v2/jou/router.js +6 -0
- package/lib/v2/jou/utils/index.js +60 -0
- package/lib/v2/jou/yz.js +18 -0
- package/lib/v2/kunchengblog/essay.js +50 -0
- package/lib/v2/kunchengblog/maintainer.js +3 -0
- package/lib/v2/kunchengblog/radar.js +13 -0
- package/lib/v2/kunchengblog/router.js +3 -0
- package/lib/v2/layer3/maintainer.js +3 -0
- package/lib/v2/layer3/quests.js +37 -0
- package/lib/v2/layer3/radar.js +13 -0
- package/lib/v2/layer3/router.js +3 -0
- package/lib/v2/layer3/templates/description.art +24 -0
- package/lib/v2/line/maintainer.js +1 -0
- package/lib/v2/line/publisher.js +53 -0
- package/lib/v2/line/radar.js +8 -2
- package/lib/v2/line/router.js +1 -0
- package/lib/v2/line/today.js +5 -41
- package/lib/v2/line/utils.js +43 -0
- package/lib/v2/macmenubar/maintainer.js +3 -0
- package/lib/v2/macmenubar/radar.js +13 -0
- package/lib/v2/macmenubar/recently.js +47 -0
- package/lib/v2/macmenubar/router.js +3 -0
- package/lib/v2/mckinsey/maintainer.js +3 -0
- package/lib/v2/modelscope/community.js +55 -0
- package/lib/v2/modelscope/datasets.js +55 -0
- package/lib/v2/modelscope/maintainer.js +6 -0
- package/lib/v2/modelscope/models.js +45 -0
- package/lib/v2/modelscope/radar.js +33 -0
- package/lib/v2/modelscope/router.js +6 -0
- package/lib/v2/modelscope/studios.js +57 -0
- package/lib/v2/modelscope/templates/community.art +11 -0
- package/lib/v2/modelscope/templates/desc.art +9 -0
- package/lib/v2/mrdx/radar.js +1 -1
- package/lib/v2/natgeo/radar.js +1 -1
- package/lib/v2/ncepu/radar.js +1 -1
- package/lib/{routes → v2}/newrank/douyin.js +4 -1
- package/lib/v2/newrank/maintainer.js +4 -0
- package/lib/v2/newrank/radar.js +15 -0
- package/lib/v2/newrank/router.js +4 -0
- package/lib/v2/newrank/wechat.js +65 -0
- package/lib/v2/nhentai/maintainer.js +4 -0
- package/lib/v2/nhentai/other.js +30 -0
- package/lib/v2/nhentai/radar.js +19 -0
- package/lib/v2/nhentai/router.js +4 -0
- package/lib/v2/nhentai/search.js +23 -0
- package/lib/v2/nhentai/templates/desc.art +4 -0
- package/lib/v2/nhentai/util.js +146 -0
- package/lib/v2/nhk/maintainer.js +4 -0
- package/lib/v2/nikkei/cn/index.js +3 -2
- package/lib/v2/njglyy/maintainer.js +3 -0
- package/lib/v2/njglyy/radar.js +13 -0
- package/lib/v2/njglyy/router.js +3 -0
- package/lib/v2/njglyy/utils/index.js +50 -0
- package/lib/v2/njglyy/ygbjypx.js +18 -0
- package/lib/v2/njucm/grabs.js +18 -0
- package/lib/v2/njucm/maintainer.js +3 -0
- package/lib/v2/njucm/radar.js +13 -0
- package/lib/v2/njucm/router.js +3 -0
- package/lib/v2/njucm/utils/index.js +47 -0
- package/lib/v2/njxzc/home.js +13 -53
- package/lib/v2/njxzc/lib.js +26 -0
- package/lib/v2/njxzc/maintainer.js +1 -0
- package/lib/v2/njxzc/radar.js +9 -1
- package/lib/v2/njxzc/router.js +3 -1
- package/lib/v2/njxzc/utils/index.js +48 -0
- package/lib/v2/openai/chatgpt.js +98 -0
- package/lib/v2/openai/radar.js +8 -0
- package/lib/v2/openai/router.js +1 -0
- package/lib/v2/oshwhub/explore.js +1 -1
- package/lib/v2/pingwest/maintainer.js +5 -0
- package/lib/v2/pingwest/radar.js +25 -0
- package/lib/v2/pingwest/router.js +5 -0
- package/lib/{routes → v2}/pingwest/status.js +12 -5
- package/lib/{routes → v2}/pingwest/tag.js +13 -20
- package/lib/{routes → v2}/pingwest/user.js +8 -4
- package/lib/v2/pingwest/utils.js +92 -0
- package/lib/v2/qdu/jwc.js +58 -0
- package/lib/v2/qdu/maintainer.js +3 -0
- package/lib/v2/qdu/radar.js +13 -0
- package/lib/v2/qdu/router.js +3 -0
- package/lib/v2/qweather/3days.js +1 -1
- package/lib/v2/qweather/maintainer.js +2 -2
- package/lib/v2/qweather/now.js +1 -1
- package/lib/v2/qweather/radar.js +15 -0
- package/lib/v2/readhub/maintainer.js +1 -1
- package/lib/v2/sass/gs/index.js +55 -0
- package/lib/v2/sass/maintainer.js +3 -0
- package/lib/v2/sass/radar.js +13 -0
- package/lib/v2/sass/router.js +3 -0
- package/lib/v2/segmentfault/channel.js +2 -2
- package/lib/v2/setn/index.js +100 -0
- package/lib/v2/setn/maintainer.js +3 -0
- package/lib/v2/setn/radar.js +53 -0
- package/lib/v2/setn/router.js +3 -0
- package/lib/v2/slowmist/maintainer.js +3 -0
- package/lib/v2/southcn/maintainer.js +4 -0
- package/lib/v2/southcn/nfapp/column.js +45 -0
- package/lib/v2/southcn/nfapp/reporter.js +33 -0
- package/lib/v2/southcn/nfapp/utils.js +23 -0
- package/lib/v2/southcn/radar.js +12 -0
- package/lib/v2/southcn/router.js +4 -0
- package/lib/v2/southcn/templates/description.art +6 -0
- package/lib/v2/stdaily/digitalpaper.js +125 -0
- package/lib/v2/stdaily/maintainer.js +3 -0
- package/lib/v2/stdaily/radar.js +11 -0
- package/lib/v2/stdaily/router.js +3 -0
- package/lib/v2/stdaily/templates/description.art +16 -0
- package/lib/v2/studygolang/go.js +5 -0
- package/lib/v2/studygolang/jobs.js +3 -33
- package/lib/v2/studygolang/maintainer.js +3 -1
- package/lib/v2/studygolang/radar.js +14 -2
- package/lib/v2/studygolang/router.js +2 -0
- package/lib/v2/studygolang/utils.js +74 -0
- package/lib/v2/studygolang/weekly.js +7 -0
- package/lib/v2/taiwannews/radar.js +1 -1
- package/lib/v2/techcrunch/maintainer.js +3 -0
- package/lib/v2/techcrunch/news.js +38 -0
- package/lib/v2/techcrunch/radar.js +13 -0
- package/lib/v2/techcrunch/router.js +3 -0
- package/lib/v2/themoviedb/api-key.js +23 -0
- package/lib/v2/themoviedb/collection.js +21 -0
- package/lib/v2/themoviedb/episodes.js +27 -0
- package/lib/v2/themoviedb/maintainer.js +7 -0
- package/lib/v2/themoviedb/radar.js +73 -0
- package/lib/v2/themoviedb/router.js +7 -0
- package/lib/v2/themoviedb/seasons.js +31 -0
- package/lib/v2/themoviedb/sheet.js +45 -0
- package/lib/v2/themoviedb/templates/description.art +6 -0
- package/lib/v2/themoviedb/trending.js +24 -0
- package/lib/v2/themoviedb/utils.js +34 -0
- package/lib/v2/ucas/radar.js +33 -0
- package/lib/v2/uraaka-joshi/radar.js +2 -2
- package/lib/v2/ustb/maintainer.js +1 -0
- package/lib/v2/ustb/radar.js +8 -0
- package/lib/v2/ustb/router.js +1 -0
- package/lib/v2/ustb/yzxc/tzgg.js +49 -0
- package/lib/v2/vimeo/maintainer.js +5 -0
- package/lib/v2/wanqu/maintainer.js +3 -0
- package/lib/v2/wanqu/news.js +27 -0
- package/lib/v2/wanqu/radar.js +13 -0
- package/lib/v2/wanqu/router.js +3 -0
- package/lib/v2/wechat/maintainer.js +1 -0
- package/lib/v2/wechat/radar.js +17 -0
- package/lib/v2/wechat/router.js +1 -0
- package/lib/v2/wechat/sogou.js +58 -0
- package/lib/v2/wfdf/maintainer.js +3 -0
- package/lib/v2/wfdf/news.js +29 -0
- package/lib/v2/wfdf/radar.js +13 -0
- package/lib/v2/wfdf/router.js +3 -0
- package/lib/v2/wise/radar.js +1 -1
- package/lib/v2/xkb/index.js +3 -3
- package/lib/v2/xmanhua/maintainer.js +3 -0
- package/lib/v2/zuvio/maintainer.js +4 -0
- package/package.json +19 -16
- package/lib/routes/1point3acres/blog.js +0 -52
- package/lib/routes/1point3acres/offer.js +0 -211
- package/lib/routes/1point3acres/post.js +0 -50
- package/lib/routes/go-weekly/index.js +0 -29
- package/lib/routes/gov/news/index.js +0 -115
- package/lib/routes/newrank/wechat.js +0 -37
- package/lib/routes/nhentai/other.js +0 -25
- package/lib/routes/nhentai/search.js +0 -16
- package/lib/routes/nhentai/util.js +0 -133
- package/lib/routes/pingwest/utils.js +0 -76
- package/lib/v2/gov/sichuan/deyang/govpulicinfo.js +0 -95
- package/lib/v2/gov/stats/templates/attachments.art +0 -5
- package/lib/v2/gov/stats/utils.js +0 -75
- /package/lib/{routes/1point3acres/posts.js → v2/1point3acres/user/post.js} +0 -0
- /package/lib/{routes/1point3acres/threads.js → v2/1point3acres/user/thread.js} +0 -0
- /package/lib/{routes → v2}/newrank/utils.js +0 -0
- /package/lib/v2/qdaily/{templates/radar.js → radar.js} +0 -0
- /package/lib/v2/qweather/{util → templates}/3days.art +0 -0
- /package/lib/v2/qweather/{util → templates}/now.art +0 -0
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="https://
|
|
2
|
+
<img src="https://docs.rsshub.app/logo.png" alt="RSSHub" width="100">
|
|
3
3
|
</p>
|
|
4
4
|
<h1 align="center">RSSHub</h1>
|
|
5
5
|
|
|
@@ -87,6 +87,7 @@ You can support RSSHub via donations.
|
|
|
87
87
|
Recurring donors will be rewarded via express issue response, or even have your name displayed on our GitHub page and website.
|
|
88
88
|
|
|
89
89
|
- Become a Sponser on [GitHub](https://github.com/sponsors/DIYgod)
|
|
90
|
+
- Become a Sponser on [Open Collective](https://opencollective.com/RSSHub)
|
|
90
91
|
- Become a Sponser on [Patreon](https://www.patreon.com/DIYgod)
|
|
91
92
|
- Become a Sponser on [爱发电](https://afdian.net/@diygod)
|
|
92
93
|
- Contact us directly: i@diygod.me
|
|
@@ -95,8 +96,8 @@ Recurring donors will be rewarded via express issue response, or even have your
|
|
|
95
96
|
|
|
96
97
|
We accept donations via the following ways:
|
|
97
98
|
|
|
98
|
-
- [WeChat Pay](https://diygod.me/images/wx.jpg)
|
|
99
|
-
- [Alipay](https://diygod.me/images/zfb.jpg)
|
|
99
|
+
- [WeChat Pay](https://archive.diygod.me/images/wx.jpg)
|
|
100
|
+
- [Alipay](https://archive.diygod.me/images/zfb.jpg)
|
|
100
101
|
- [Paypal](https://www.paypal.me/DIYgod)
|
|
101
102
|
|
|
102
103
|
## Author
|
package/lib/api_router.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
const Router = require('@koa/router');
|
|
2
2
|
const router = new Router();
|
|
3
|
-
const maintainer = require('./maintainer');
|
|
4
3
|
|
|
5
4
|
router.get('/routes/:name?', (ctx) => {
|
|
6
5
|
const result = {};
|
|
7
6
|
let counter = 0;
|
|
8
7
|
|
|
8
|
+
const maintainer = require('./maintainer');
|
|
9
9
|
Object.keys(maintainer).forEach((i) => {
|
|
10
10
|
const path = i;
|
|
11
11
|
const top = path.split('/')[1];
|
package/lib/config.js
CHANGED
package/lib/maintainer.js
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
const dirname = __dirname + '/v2';
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
const { join } = require('path');
|
|
4
|
+
|
|
5
|
+
// Presence Check
|
|
6
|
+
for (const dir of fs.readdirSync(dirname)) {
|
|
7
|
+
const dirPath = join(dirname, dir);
|
|
8
|
+
if (!fs.existsSync(join(dirPath, 'maintainer.js'))) {
|
|
9
|
+
throw Error(`No maintainer.js in "${dirPath}".`);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
2
12
|
|
|
3
13
|
// 遍历整个 routes 文件夹,收集模块 maintainer.js
|
|
4
14
|
const maintainerPath = require('require-all')({
|
|
@@ -11,6 +21,21 @@ const maintainers = {};
|
|
|
11
21
|
// 将收集到的自定义模块进行合并
|
|
12
22
|
for (const dir in maintainerPath) {
|
|
13
23
|
const routes = maintainerPath[dir]['maintainer.js']; // Do not merge other file
|
|
24
|
+
|
|
25
|
+
// typo check e.g., ✘ module.export, ✔ module.exports
|
|
26
|
+
if (!Object.keys(routes).length) {
|
|
27
|
+
throw Error(`No maintainer in "${dir}".`);
|
|
28
|
+
}
|
|
29
|
+
for (const author of Object.values(routes)) {
|
|
30
|
+
if (!Array.isArray(author)) {
|
|
31
|
+
throw Error(`Maintainers' name should be an array in "${dir}".`);
|
|
32
|
+
}
|
|
33
|
+
// check for [], [''] or ['Someone', '']
|
|
34
|
+
if (author.length < 1 || author.includes('')) {
|
|
35
|
+
throw Error(`Empty maintainer in "${dir}".`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
14
39
|
for (const key in routes) {
|
|
15
40
|
maintainers['/' + dir + key] = routes[key];
|
|
16
41
|
}
|
package/lib/radar-rules.js
CHANGED
|
@@ -125,17 +125,6 @@ module.exports = {
|
|
|
125
125
|
},
|
|
126
126
|
],
|
|
127
127
|
},
|
|
128
|
-
'epicgames.com': {
|
|
129
|
-
_name: 'Epic Games',
|
|
130
|
-
www: [
|
|
131
|
-
{
|
|
132
|
-
title: '每周免费游戏',
|
|
133
|
-
docs: 'https://docs.rsshub.app/game.html#epicgames-freegame',
|
|
134
|
-
source: '/store/zh-CN/free-games',
|
|
135
|
-
target: '/epicgames/freegames',
|
|
136
|
-
},
|
|
137
|
-
],
|
|
138
|
-
},
|
|
139
128
|
'playstation.com': {
|
|
140
129
|
_name: 'PlayStation',
|
|
141
130
|
store: [
|
|
@@ -349,17 +338,6 @@ module.exports = {
|
|
|
349
338
|
},
|
|
350
339
|
],
|
|
351
340
|
},
|
|
352
|
-
// 'baijingapp.com': {
|
|
353
|
-
// _name: '白鲸出海',
|
|
354
|
-
// www: [
|
|
355
|
-
// {
|
|
356
|
-
// title: '文章',
|
|
357
|
-
// docs: 'https://docs.rsshub.app/new-media.html#bai-jing-chu-hai',
|
|
358
|
-
// source: '',
|
|
359
|
-
// target: '/baijing',
|
|
360
|
-
// },
|
|
361
|
-
// ],
|
|
362
|
-
// },
|
|
363
341
|
'xiaomi.cn': {
|
|
364
342
|
_name: '小米社区',
|
|
365
343
|
www: [
|
|
@@ -467,36 +445,6 @@ module.exports = {
|
|
|
467
445
|
},
|
|
468
446
|
],
|
|
469
447
|
},
|
|
470
|
-
'google.com': {
|
|
471
|
-
_name: '谷歌',
|
|
472
|
-
chrome: [
|
|
473
|
-
{
|
|
474
|
-
title: '插件更新',
|
|
475
|
-
source: '/webstore/detail/:name/:id',
|
|
476
|
-
docs: 'https://docs.rsshub.app/program-update.html#chrome-wang-shang-ying-yong-dian',
|
|
477
|
-
target: '/chrome/webstore/extensions/:id',
|
|
478
|
-
},
|
|
479
|
-
],
|
|
480
|
-
photos: [
|
|
481
|
-
{
|
|
482
|
-
title: '相册',
|
|
483
|
-
docs: 'https://docs.rsshub.app/picture.html#google-xiang-ce',
|
|
484
|
-
source: '/share/*',
|
|
485
|
-
target: (params, url, document) => {
|
|
486
|
-
const id = document && document.querySelector('html').innerHTML.match(/photos.app.goo.gl\/(.*?)"/)[1];
|
|
487
|
-
return id ? `/google/album/${id}` : '';
|
|
488
|
-
},
|
|
489
|
-
},
|
|
490
|
-
],
|
|
491
|
-
sites: [
|
|
492
|
-
{
|
|
493
|
-
title: 'Sites',
|
|
494
|
-
docs: 'https://docs.rsshub.app/blog.html#google-sites',
|
|
495
|
-
source: ['/site/:id/*', '/site/:id'],
|
|
496
|
-
target: '/google/sites/:id',
|
|
497
|
-
},
|
|
498
|
-
],
|
|
499
|
-
},
|
|
500
448
|
'hackerone.com': {
|
|
501
449
|
_name: 'HackerOne',
|
|
502
450
|
'.': [
|
|
@@ -632,35 +580,6 @@ module.exports = {
|
|
|
632
580
|
},
|
|
633
581
|
],
|
|
634
582
|
},
|
|
635
|
-
// 'nsfc.gov.cn': {
|
|
636
|
-
// _name: '国家自然科学基金委员会',
|
|
637
|
-
// www: [
|
|
638
|
-
// {
|
|
639
|
-
// title: '基金要闻',
|
|
640
|
-
// docs: 'https://docs.rsshub.app/other.html#guo-jia-zi-ran-ke-xue-ji-jin-wei-yuan-hui',
|
|
641
|
-
// source: '/*',
|
|
642
|
-
// target: '/nsfc/news/jjyw',
|
|
643
|
-
// },
|
|
644
|
-
// {
|
|
645
|
-
// title: '通知公告',
|
|
646
|
-
// docs: 'https://docs.rsshub.app/other.html#guo-jia-zi-ran-ke-xue-ji-jin-wei-yuan-hui',
|
|
647
|
-
// source: '/*',
|
|
648
|
-
// target: '/nsfc/news/tzgg',
|
|
649
|
-
// },
|
|
650
|
-
// {
|
|
651
|
-
// title: '资助成果',
|
|
652
|
-
// docs: 'https://docs.rsshub.app/other.html#guo-jia-zi-ran-ke-xue-ji-jin-wei-yuan-hui',
|
|
653
|
-
// source: '/*',
|
|
654
|
-
// target: '/nsfc/news/zzcg',
|
|
655
|
-
// },
|
|
656
|
-
// {
|
|
657
|
-
// title: '科普快讯',
|
|
658
|
-
// docs: 'https://docs.rsshub.app/other.html#guo-jia-zi-ran-ke-xue-ji-jin-wei-yuan-hui',
|
|
659
|
-
// source: '/*',
|
|
660
|
-
// target: '/nsfc/news/kpkx',
|
|
661
|
-
// },
|
|
662
|
-
// ],
|
|
663
|
-
// },
|
|
664
583
|
'japanpost.jp': {
|
|
665
584
|
_name: '日本郵便',
|
|
666
585
|
'trackings.post': [
|
|
@@ -810,59 +729,6 @@ module.exports = {
|
|
|
810
729
|
},
|
|
811
730
|
],
|
|
812
731
|
},
|
|
813
|
-
// 'zcool.com.cn': {
|
|
814
|
-
// _name: '站酷',
|
|
815
|
-
// www: [
|
|
816
|
-
// {
|
|
817
|
-
// title: '发现',
|
|
818
|
-
// docs: 'https://docs.rsshub.app/design.html#zhan-ku',
|
|
819
|
-
// source: '',
|
|
820
|
-
// target: '/zcool/discover',
|
|
821
|
-
// },
|
|
822
|
-
// {
|
|
823
|
-
// title: '发现 - 精选 - 全部推荐',
|
|
824
|
-
// docs: 'https://docs.rsshub.app/design.html#zhan-ku',
|
|
825
|
-
// source: '',
|
|
826
|
-
// target: '/zcool/discover/all',
|
|
827
|
-
// },
|
|
828
|
-
// {
|
|
829
|
-
// title: '发现 - 精选 - 首页推荐',
|
|
830
|
-
// docs: 'https://docs.rsshub.app/design.html#zhan-ku',
|
|
831
|
-
// source: '',
|
|
832
|
-
// target: '/zcool/discover/home',
|
|
833
|
-
// },
|
|
834
|
-
// {
|
|
835
|
-
// title: '发现 - 精选 - 编辑精选',
|
|
836
|
-
// docs: 'https://docs.rsshub.app/design.html#zhan-ku',
|
|
837
|
-
// source: '',
|
|
838
|
-
// target: '/zcool/discover/home',
|
|
839
|
-
// },
|
|
840
|
-
// {
|
|
841
|
-
// title: '发现 - 精选 - 文章 - 编辑精选',
|
|
842
|
-
// docs: 'https://docs.rsshub.app/design.html#zhan-ku',
|
|
843
|
-
// source: '',
|
|
844
|
-
// target: '/zcool/discover/article',
|
|
845
|
-
// },
|
|
846
|
-
// {
|
|
847
|
-
// title: '作品榜单',
|
|
848
|
-
// docs: 'https://docs.rsshub.app/design.html#zhan-ku',
|
|
849
|
-
// source: '',
|
|
850
|
-
// target: '/zcool/top/design',
|
|
851
|
-
// },
|
|
852
|
-
// {
|
|
853
|
-
// title: '文章榜单',
|
|
854
|
-
// docs: 'https://docs.rsshub.app/design.html#zhan-ku',
|
|
855
|
-
// source: '',
|
|
856
|
-
// target: '/zcool/top/article',
|
|
857
|
-
// },
|
|
858
|
-
// {
|
|
859
|
-
// title: '用户作品',
|
|
860
|
-
// docs: 'https://docs.rsshub.app/design.html#zhan-ku',
|
|
861
|
-
// source: ['/u/:id'],
|
|
862
|
-
// target: `/zcool/user/:id`,
|
|
863
|
-
// },
|
|
864
|
-
// ],
|
|
865
|
-
// },
|
|
866
732
|
'zhuixinfan.com': {
|
|
867
733
|
_name: '追新番日剧站',
|
|
868
734
|
'.': [
|
|
@@ -1410,59 +1276,6 @@ module.exports = {
|
|
|
1410
1276
|
},
|
|
1411
1277
|
],
|
|
1412
1278
|
},
|
|
1413
|
-
'e-hentai.org/': {
|
|
1414
|
-
_name: 'E-Hentai',
|
|
1415
|
-
'.': [
|
|
1416
|
-
{
|
|
1417
|
-
title: '收藏',
|
|
1418
|
-
docs: 'https://docs.rsshub.app/picture.html#ehentai',
|
|
1419
|
-
source: '/favorites.php',
|
|
1420
|
-
target: '/ehentai/favorites',
|
|
1421
|
-
},
|
|
1422
|
-
{
|
|
1423
|
-
title: '标签',
|
|
1424
|
-
docs: 'https://docs.rsshub.app/picture.html#ehentai',
|
|
1425
|
-
source: '/tag/:tag',
|
|
1426
|
-
target: '/ehentai/tag/:tag',
|
|
1427
|
-
},
|
|
1428
|
-
{
|
|
1429
|
-
title: '搜索',
|
|
1430
|
-
docs: 'https://docs.rsshub.app/picture.html#ehentai',
|
|
1431
|
-
source: '/',
|
|
1432
|
-
target: (params, url) => {
|
|
1433
|
-
const keyword = new URL(url).searchParams.toString();
|
|
1434
|
-
if (keyword) {
|
|
1435
|
-
return `/ehentai/search/${keyword}`;
|
|
1436
|
-
}
|
|
1437
|
-
},
|
|
1438
|
-
},
|
|
1439
|
-
],
|
|
1440
|
-
},
|
|
1441
|
-
'iyingdi.com': {
|
|
1442
|
-
_name: '旅法师营地',
|
|
1443
|
-
www: [
|
|
1444
|
-
{
|
|
1445
|
-
title: '分区',
|
|
1446
|
-
docs: 'https://docs.rsshub.app/game.html#lv-fa-shi-ying-di',
|
|
1447
|
-
source: '/tz/tag/:tag',
|
|
1448
|
-
target: '/lfsyd/tag/:tag',
|
|
1449
|
-
},
|
|
1450
|
-
{
|
|
1451
|
-
title: '用户发帖',
|
|
1452
|
-
docs: 'https://docs.rsshub.app/game.html#lv-fa-shi-ying-di',
|
|
1453
|
-
source: ['/tz/people/:id', '/tz/people/:id/*'],
|
|
1454
|
-
target: '/lfsyd/user/:id',
|
|
1455
|
-
},
|
|
1456
|
-
],
|
|
1457
|
-
mob: [
|
|
1458
|
-
{
|
|
1459
|
-
title: '分区',
|
|
1460
|
-
docs: 'https://docs.rsshub.app/game.html#lv-fa-shi-ying-di',
|
|
1461
|
-
source: '/fine/:tag',
|
|
1462
|
-
target: '/lfsyd/tag/:tag',
|
|
1463
|
-
},
|
|
1464
|
-
],
|
|
1465
|
-
},
|
|
1466
1279
|
'macwk.com': {
|
|
1467
1280
|
_name: 'MacWk',
|
|
1468
1281
|
'.': [
|
package/lib/radar.js
CHANGED
|
@@ -1,5 +1,58 @@
|
|
|
1
1
|
const dirname = __dirname + '/v2';
|
|
2
|
+
const fs = require('fs');
|
|
2
3
|
const toSource = require('tosource');
|
|
4
|
+
const { join } = require('path');
|
|
5
|
+
|
|
6
|
+
const allowNamespace = ['ehentai', 'test'];
|
|
7
|
+
// Check if a radar.js file is exist under each folder of dirname
|
|
8
|
+
for (const dir of fs.readdirSync(dirname)) {
|
|
9
|
+
const dirPath = join(dirname, dir);
|
|
10
|
+
if (!fs.existsSync(join(dirPath, 'radar.js')) && !allowNamespace.includes(dir)) {
|
|
11
|
+
throw Error(`No radar.js in "${dirPath}".`);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const validateRadarRules = (rule, dir) => {
|
|
16
|
+
const allowDomains = ['www.gov.cn'];
|
|
17
|
+
const blockWords = ['/', 'http', 'www'];
|
|
18
|
+
const domain = Object.keys(rule);
|
|
19
|
+
if (!domain.length && !allowNamespace.includes(dir)) {
|
|
20
|
+
// typo check e.g., ✘ module.export, ✔ module.exports
|
|
21
|
+
throw Error(`No Radar rule in "${dir}".`);
|
|
22
|
+
}
|
|
23
|
+
for (const [d, r] of Object.entries(rule)) {
|
|
24
|
+
if (blockWords.some((word) => d.startsWith(word)) && !allowDomains.includes(d)) {
|
|
25
|
+
throw Error(`Domain name "${d}" should not contain any of ${blockWords.join(', ')}.`);
|
|
26
|
+
}
|
|
27
|
+
if (!r.hasOwnProperty('_name')) {
|
|
28
|
+
throw Error(`No _name in "${dir}".`);
|
|
29
|
+
}
|
|
30
|
+
// property check
|
|
31
|
+
for (const [host, items] of Object.entries(r)) {
|
|
32
|
+
if (host !== '_name') {
|
|
33
|
+
if (!Array.isArray(items)) {
|
|
34
|
+
throw Error(`Radar rules for domain "${host}" in "${dir}" should be placed in an array.`);
|
|
35
|
+
}
|
|
36
|
+
for (const item of items) {
|
|
37
|
+
if (!item.hasOwnProperty('title') || !item.hasOwnProperty('docs')) {
|
|
38
|
+
throw Error(`Radar rules for "${host}" in "${dir}" should have at least "title" and "docs".`);
|
|
39
|
+
}
|
|
40
|
+
if (!item.title || !item.docs) {
|
|
41
|
+
throw Error(`Radar rules for "${host}" in "${dir}" should not be empty.`);
|
|
42
|
+
}
|
|
43
|
+
if (!item.docs.startsWith('https://docs.rsshub.app/')) {
|
|
44
|
+
throw Error(`Radar rules for "${host}" in "${dir}" should start with 'https://docs.rsshub.app/'.`);
|
|
45
|
+
}
|
|
46
|
+
for (const key in item) {
|
|
47
|
+
if (key !== 'title' && key !== 'docs' && key !== 'source' && key !== 'target') {
|
|
48
|
+
throw Error(`Radar rules for "${host}" in "${dir}" should not have property "${key}".`);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
};
|
|
3
56
|
|
|
4
57
|
const radarRules = require('require-all')({
|
|
5
58
|
dirname,
|
|
@@ -10,6 +63,9 @@ let rules = {};
|
|
|
10
63
|
|
|
11
64
|
for (const dir in radarRules) {
|
|
12
65
|
const rule = radarRules[dir]['radar.js']; // Do not merge other file
|
|
66
|
+
|
|
67
|
+
validateRadarRules(rule, dir);
|
|
68
|
+
|
|
13
69
|
rules = { ...rules, ...rule };
|
|
14
70
|
}
|
|
15
71
|
|
package/lib/router.js
CHANGED
|
@@ -929,8 +929,8 @@ router.get('/chouti/:subject?', lazyloadRouteHandler('./routes/chouti'));
|
|
|
929
929
|
router.get('/westore/new', lazyloadRouteHandler('./routes/westore/new'));
|
|
930
930
|
|
|
931
931
|
// nHentai
|
|
932
|
-
router.get('/nhentai/search/:keyword/:mode?', lazyloadRouteHandler('./routes/nhentai/search'));
|
|
933
|
-
router.get('/nhentai/:key/:keyword/:mode?', lazyloadRouteHandler('./routes/nhentai/other'));
|
|
932
|
+
// router.get('/nhentai/search/:keyword/:mode?', lazyloadRouteHandler('./routes/nhentai/search'));
|
|
933
|
+
// router.get('/nhentai/:key/:keyword/:mode?', lazyloadRouteHandler('./routes/nhentai/other'));
|
|
934
934
|
|
|
935
935
|
// 龙腾网
|
|
936
936
|
router.get('/ltaaa/:category?', lazyloadRouteHandler('./routes/ltaaa/index'));
|
|
@@ -1177,7 +1177,7 @@ router.get('/cyzone/label/:name', lazyloadRouteHandler('./routes/cyzone/label'))
|
|
|
1177
1177
|
router.get('/gov/province/:name/:category', lazyloadRouteHandler('./routes/gov/province'));
|
|
1178
1178
|
router.get('/gov/city/:name/:category', lazyloadRouteHandler('./routes/gov/city'));
|
|
1179
1179
|
router.get('/gov/statecouncil/briefing', lazyloadRouteHandler('./routes/gov/statecouncil/briefing'));
|
|
1180
|
-
router.get('/gov/news/:uid', lazyloadRouteHandler('./routes/gov/news'));
|
|
1180
|
+
// router.get('/gov/news/:uid', lazyloadRouteHandler('./routes/gov/news'));
|
|
1181
1181
|
router.get('/gov/shuju/:caty/:item', lazyloadRouteHandler('./routes/gov/shuju'));
|
|
1182
1182
|
router.get('/gov/xinwen/tujie/:caty', lazyloadRouteHandler('./routes/gov/xinwen/tujie'));
|
|
1183
1183
|
|
|
@@ -1506,11 +1506,11 @@ router.get('/bupt/funbox', lazyloadRouteHandler('./routes/universities/bupt/funb
|
|
|
1506
1506
|
// router.get('/vocus/user/:id', lazyloadRouteHandler('./routes/vocus/user'));
|
|
1507
1507
|
|
|
1508
1508
|
// 一亩三分地 1point3acres
|
|
1509
|
-
router.get('/1point3acres/blog/:category?', lazyloadRouteHandler('./routes/1point3acres/blog'));
|
|
1510
|
-
router.get('/1point3acres/user/:id/threads', lazyloadRouteHandler('./routes/1point3acres/threads'));
|
|
1511
|
-
router.get('/1point3acres/user/:id/posts', lazyloadRouteHandler('./routes/1point3acres/posts'));
|
|
1512
|
-
router.get('/1point3acres/offer/:year?/:major?/:school?', lazyloadRouteHandler('./routes/1point3acres/offer'));
|
|
1513
|
-
router.get('/1point3acres/post/:category', lazyloadRouteHandler('./routes/1point3acres/post'));
|
|
1509
|
+
// router.get('/1point3acres/blog/:category?', lazyloadRouteHandler('./routes/1point3acres/blog'));
|
|
1510
|
+
// router.get('/1point3acres/user/:id/threads', lazyloadRouteHandler('./routes/1point3acres/threads'));
|
|
1511
|
+
// router.get('/1point3acres/user/:id/posts', lazyloadRouteHandler('./routes/1point3acres/posts'));
|
|
1512
|
+
// router.get('/1point3acres/offer/:year?/:major?/:school?', lazyloadRouteHandler('./routes/1point3acres/offer'));
|
|
1513
|
+
// router.get('/1point3acres/post/:category', lazyloadRouteHandler('./routes/1point3acres/post'));
|
|
1514
1514
|
|
|
1515
1515
|
// 广东海洋大学
|
|
1516
1516
|
router.get('/gdoujwc', lazyloadRouteHandler('./routes/universities/gdou/jwc/jwtz'));
|
|
@@ -1943,9 +1943,9 @@ router.get('/japanpost/track/:reqCode/:locale?', lazyloadRouteHandler('./routes/
|
|
|
1943
1943
|
// router.get('/mofcom/article/:suffix', lazyloadRouteHandler('./routes/mofcom/article'));
|
|
1944
1944
|
|
|
1945
1945
|
// 品玩
|
|
1946
|
-
router.get('/pingwest/status', lazyloadRouteHandler('./routes/pingwest/status'));
|
|
1947
|
-
router.get('/pingwest/tag/:tag/:type', lazyloadRouteHandler('./routes/pingwest/tag'));
|
|
1948
|
-
router.get('/pingwest/user/:uid/:type?', lazyloadRouteHandler('./routes/pingwest/user'));
|
|
1946
|
+
// router.get('/pingwest/status', lazyloadRouteHandler('./routes/pingwest/status'));
|
|
1947
|
+
// router.get('/pingwest/tag/:tag/:type/:option?', lazyloadRouteHandler('./routes/pingwest/tag'));
|
|
1948
|
+
// router.get('/pingwest/user/:uid/:type?/:option?', lazyloadRouteHandler('./routes/pingwest/user'));
|
|
1949
1949
|
|
|
1950
1950
|
// Hanime
|
|
1951
1951
|
router.get('/hanime/video', lazyloadRouteHandler('./routes/hanime/video'));
|
|
@@ -2938,7 +2938,7 @@ router.get('/missevan/drama/latest', lazyloadRouteHandler('./routes/missevan/lat
|
|
|
2938
2938
|
router.get('/missevan/drama/:id', lazyloadRouteHandler('./routes/missevan/drama'));
|
|
2939
2939
|
|
|
2940
2940
|
// Go语言爱好者周刊
|
|
2941
|
-
router.get('/go-weekly', lazyloadRouteHandler('./routes/go-weekly'));
|
|
2941
|
+
// router.get('/go-weekly', lazyloadRouteHandler('./routes/go-weekly'));
|
|
2942
2942
|
|
|
2943
2943
|
// popiask提问箱
|
|
2944
2944
|
router.get('/popiask/:sharecode/:pagesize?', lazyloadRouteHandler('./routes/popiask/questions'));
|
|
@@ -3005,8 +3005,8 @@ router.get('/liequtv/room/:id', lazyloadRouteHandler('./routes/liequtv/room'));
|
|
|
3005
3005
|
router.get('/bwu/news', lazyloadRouteHandler('./routes/universities/bwu/news'));
|
|
3006
3006
|
|
|
3007
3007
|
// 新榜
|
|
3008
|
-
router.get('/newrank/wechat/:wxid', lazyloadRouteHandler('./routes/newrank/wechat'));
|
|
3009
|
-
router.get('/newrank/douyin/:dyid', lazyloadRouteHandler('./routes/newrank/douyin'));
|
|
3008
|
+
// router.get('/newrank/wechat/:wxid', lazyloadRouteHandler('./routes/newrank/wechat'));
|
|
3009
|
+
// router.get('/newrank/douyin/:dyid', lazyloadRouteHandler('./routes/newrank/douyin'));
|
|
3010
3010
|
|
|
3011
3011
|
// 漫小肆
|
|
3012
3012
|
router.get('/manxiaosi/book/:id', lazyloadRouteHandler('./routes/manxiaosi/book'));
|
|
@@ -3083,8 +3083,8 @@ router.get('/nasa/apod-ncku', lazyloadRouteHandler('./routes/nasa/apod-ncku'));
|
|
|
3083
3083
|
router.get('/nasa/apod-cn', lazyloadRouteHandler('./routes/nasa/apod-cn'));
|
|
3084
3084
|
|
|
3085
3085
|
// 爱Q生活网
|
|
3086
|
-
router.get('/iqshw/latest', lazyloadRouteHandler('./routes/3k8/latest'));
|
|
3087
|
-
router.get('/3k8/latest', lazyloadRouteHandler('./routes/3k8/latest'));
|
|
3086
|
+
// router.get('/iqshw/latest', lazyloadRouteHandler('./routes/3k8/latest'));
|
|
3087
|
+
// router.get('/3k8/latest', lazyloadRouteHandler('./routes/3k8/latest'));
|
|
3088
3088
|
|
|
3089
3089
|
// JustRun
|
|
3090
3090
|
router.get('/justrun', lazyloadRouteHandler('./routes/justrun/index'));
|
|
@@ -3636,7 +3636,7 @@ router.get('/voa/day-photos', lazyloadRouteHandler('./routes/voa/day-photos'));
|
|
|
3636
3636
|
router.get('/voa/:language/:channel?', lazyloadRouteHandler('./routes/voa/index'));
|
|
3637
3637
|
|
|
3638
3638
|
// 留园网
|
|
3639
|
-
router.get('/6park/:id?/:type?/:keyword?', lazyloadRouteHandler('./routes/6park/index'));
|
|
3639
|
+
// router.get('/6park/:id?/:type?/:keyword?', lazyloadRouteHandler('./routes/6park/index'));
|
|
3640
3640
|
|
|
3641
3641
|
// 哔嘀影视
|
|
3642
3642
|
// router.get('/mp4er/:type?/:caty?/:area?/:year?/:order?', lazyloadRouteHandler('./routes/mp4er/index'));
|
|
@@ -0,0 +1,67 @@
|
|
|
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 categoryMap = {
|
|
7
|
+
studyinusa: {
|
|
8
|
+
title: '留学申请',
|
|
9
|
+
id: 18,
|
|
10
|
+
},
|
|
11
|
+
career: {
|
|
12
|
+
title: '找工求职',
|
|
13
|
+
id: 200,
|
|
14
|
+
},
|
|
15
|
+
lifestyle: {
|
|
16
|
+
title: '生活攻略',
|
|
17
|
+
id: 370,
|
|
18
|
+
},
|
|
19
|
+
invest: {
|
|
20
|
+
title: '投资理财',
|
|
21
|
+
id: 371,
|
|
22
|
+
},
|
|
23
|
+
visa: {
|
|
24
|
+
title: '签证移民',
|
|
25
|
+
id: 194,
|
|
26
|
+
},
|
|
27
|
+
news: {
|
|
28
|
+
title: '时政要闻',
|
|
29
|
+
id: 366,
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const { category } = ctx.params;
|
|
34
|
+
|
|
35
|
+
const rootUrl = 'https://blog.1point3acres.com';
|
|
36
|
+
const currentUrl = `${rootUrl}/${category}/`;
|
|
37
|
+
const { data } = await got(`${rootUrl}/wp-json/wp/v2/posts`, {
|
|
38
|
+
searchParams: {
|
|
39
|
+
categories: category ? categoryMap[category].id : undefined,
|
|
40
|
+
per_page: ctx.query.limit ? parseInt(ctx.query.limit) : 100,
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
const items = data.map((item) => {
|
|
45
|
+
const $ = cheerio.load(item.content.rendered, null, false);
|
|
46
|
+
$('h2').nextAll().remove();
|
|
47
|
+
$('[powered-by="1p3a"], h2').remove();
|
|
48
|
+
$('img').each((_, img) => {
|
|
49
|
+
if (img.attribs.src.match(/wp-content\/uploads/)) {
|
|
50
|
+
img.attribs.src = img.attribs.src.replace(/(-\d+x\d+)/, '');
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
return {
|
|
55
|
+
title: item.title.rendered,
|
|
56
|
+
description: $.html(),
|
|
57
|
+
link: item.link,
|
|
58
|
+
pubDate: parseDate(item.date_gmt),
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
ctx.state.data = {
|
|
63
|
+
title: `${category ? `${categoryMap[category].title} | ` : ''}美国留学就业生活攻略`,
|
|
64
|
+
link: currentUrl,
|
|
65
|
+
item: items,
|
|
66
|
+
};
|
|
67
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const { rootUrl, apiRootUrl, types, ProcessThreads } = require('./utils');
|
|
2
|
+
|
|
3
|
+
module.exports = async (ctx) => {
|
|
4
|
+
const id = ctx.params.id ?? '';
|
|
5
|
+
const type = ctx.params.type ?? 'hot';
|
|
6
|
+
const order = ctx.params.order ?? '';
|
|
7
|
+
const limit = ctx.query.limit ? parseInt(ctx.query.limit) : 10;
|
|
8
|
+
|
|
9
|
+
const currentUrl = `${rootUrl}${id ? `/category/${id}` : ''}`;
|
|
10
|
+
const apiUrl = `${apiRootUrl}/api${id ? `/tags/${id}/` : ''}threads?type=${type}&includes=tags,forum_name,summary&ps=${limit}&pg=1&order=${order === '' ? '' : 'time_desc'}&is_groupid=1`;
|
|
11
|
+
|
|
12
|
+
ctx.state.data = {
|
|
13
|
+
title: `一亩三分地 - ${id}${types[type]}`,
|
|
14
|
+
link: currentUrl,
|
|
15
|
+
item: await ProcessThreads(ctx.cache.tryGet, apiUrl, order),
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'/blog/:category?': ['nczitzk'],
|
|
3
|
+
'/category/:id?/:type?/:order?': ['nczitzk'],
|
|
4
|
+
'/offer/:year?/:major?/:school?': ['NavePnow'],
|
|
5
|
+
'/post/:type?/:order?': ['NavePnow', 'DIYgod', 'nczitzk'],
|
|
6
|
+
'/section/:id?/:type?/:order?': ['nczitzk'],
|
|
7
|
+
'/user/:id/posts': ['Maecenas'],
|
|
8
|
+
'/user/:id/threads': ['Maecenas'],
|
|
9
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const { art } = require('@/utils/render');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
4
|
+
const { join } = require('path');
|
|
5
|
+
|
|
6
|
+
module.exports = async (ctx) => {
|
|
7
|
+
// year 2017-2022
|
|
8
|
+
// 2017:6 2018:11 2019:12 2020:13 2021:14 2022:15
|
|
9
|
+
// CS:1 MIS:2
|
|
10
|
+
const { year = 'null', major = 'null', school = 'null' } = ctx.params;
|
|
11
|
+
// const filter = 'filters: {planyr: "12", planmajor: "1", outname_w: "CMU"}';
|
|
12
|
+
const responseBasic = await got.post('https://api.1point3acres.com/offer/results', {
|
|
13
|
+
searchParams: {
|
|
14
|
+
ps: 15,
|
|
15
|
+
pg: 1,
|
|
16
|
+
},
|
|
17
|
+
json: {
|
|
18
|
+
filters: {
|
|
19
|
+
planyr: year !== 'null' ? year : undefined,
|
|
20
|
+
planmajor: major !== 'null' ? major : undefined,
|
|
21
|
+
outname_w: school !== 'null' ? school : undefined,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const data = responseBasic.data.results;
|
|
27
|
+
// data.id-> 访问offer具体信息->获取 data.tid
|
|
28
|
+
// if (data.id !== 0) {
|
|
29
|
+
// out = await Promise.all(
|
|
30
|
+
// data.map(async (item) => {
|
|
31
|
+
// var gettidresponse = await got({
|
|
32
|
+
// method: 'get',
|
|
33
|
+
// url: 'https://api.1point3acres.com/offer/results/'+ item.id + '/backgrounds',
|
|
34
|
+
// headers: {
|
|
35
|
+
// authorization: 'eyJhbGciOiJIUzUxMiIsImlhdCI6MTU3Njk5Njc5OSwiZXhwIjoxNTg0ODU5MTk5fQ.eyJ1aWQiOjQ1NzQyN30.0ei5UE6OgLBzN2_IS7xUIbIfW_S1Wzl42q2UeusbboxuzvctO_4Mz6YRr6f0PBLUVZMETxt8F0_4-yqIJ3_kUQ',
|
|
36
|
+
// },
|
|
37
|
+
// });
|
|
38
|
+
// var tid = gettidresponse.data.background.tid;
|
|
39
|
+
// //https: //www.1point3acres.com/bbs/thread-581177-1-1.html
|
|
40
|
+
// console.log(tid);
|
|
41
|
+
// const threadlink = 'https://www.1point3acres.com/bbs/thread-' + tid + '-1-1.html';
|
|
42
|
+
// console.log(threadlink);
|
|
43
|
+
// return threadlink;
|
|
44
|
+
// })
|
|
45
|
+
// );
|
|
46
|
+
// }
|
|
47
|
+
// let responseBasic_1;
|
|
48
|
+
// responseBasic_1 = await got({
|
|
49
|
+
// method: 'get',
|
|
50
|
+
// url: `https://api.1point3acres.com/offer/results/A7m20e4g/backgrounds`,
|
|
51
|
+
// headers: {
|
|
52
|
+
// authorization: `eyJhbGciOiJIUzUxMiIsImlhdCI6MTU3Njk5Njc5OSwiZXhwIjoxNTg0ODU5MTk5fQ.eyJ1aWQiOjQ1NzQyN30.0ei5UE6OgLBzN2_IS7xUIbIfW_S1Wzl42q2UeusbboxuzvctO_4Mz6YRr6f0PBLUVZMETxt8F0_4-yqIJ3_kUQ`,
|
|
53
|
+
// },
|
|
54
|
+
// });
|
|
55
|
+
// const tid = responseBasic_1.data.background.tid;
|
|
56
|
+
ctx.state.data = {
|
|
57
|
+
title: '录取结果 - 一亩三分地',
|
|
58
|
+
link: 'https://offer.1point3acres.com',
|
|
59
|
+
item: data.map((item) => ({
|
|
60
|
+
title: `${item.planyr}年${item.planmajor}@${item.outname_w}:${item.result} - 一亩三分地`,
|
|
61
|
+
description: art(join(__dirname, 'templates/offer.art'), {
|
|
62
|
+
item,
|
|
63
|
+
}),
|
|
64
|
+
pubDate: parseDate(item.dateline, 'X'),
|
|
65
|
+
link: 'https://offer.1point3acres.com',
|
|
66
|
+
guid: `1point3acres:offer:${year}:${major}:${school}:${item.id}`,
|
|
67
|
+
})),
|
|
68
|
+
};
|
|
69
|
+
};
|