rsshub 1.0.0-master.ff3a9ce → 1.0.0-master.ff3ea5a
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/lib/config.ts +38 -0
- package/lib/errors/index.tsx +3 -2
- package/lib/middleware/debug.ts +6 -4
- package/lib/middleware/header.ts +4 -2
- package/lib/registry.test.ts +24 -1
- package/lib/registry.ts +40 -11
- package/lib/router.js +1 -1
- package/lib/routes/121/namespace.ts +9 -0
- package/lib/routes/121/templates/description.art +17 -0
- package/lib/routes/121/weather-live.ts +104 -0
- package/lib/routes/141jav/index.ts +3 -0
- package/lib/routes/141ppv/index.ts +3 -0
- package/lib/routes/163/news/rank.ts +1 -1
- package/lib/routes/18comic/album.ts +59 -64
- package/lib/routes/18comic/index.ts +1 -0
- package/lib/routes/18comic/search.ts +53 -4
- package/lib/routes/18comic/utils.ts +70 -1
- package/lib/routes/2048/index.ts +1 -0
- package/lib/routes/30secondsofcode/utils.ts +0 -1
- package/lib/routes/6park/index.ts +1 -1
- package/lib/routes/7mmtv/index.ts +1 -0
- package/lib/routes/91porn/index.ts +1 -0
- package/lib/routes/95mm/tab.ts +1 -0
- package/lib/routes/agefans/detail.ts +1 -1
- package/lib/routes/aliyun/database-month.ts +1 -1
- package/lib/routes/anthropic/research.ts +112 -0
- package/lib/routes/apnews/topics.ts +2 -1
- package/lib/routes/apnews/utils.ts +1 -1
- package/lib/routes/apple/design.ts +54 -0
- package/lib/routes/apple/namespace.ts +1 -1
- package/lib/routes/aqara/post.ts +1 -1
- package/lib/routes/augmentcode/blog.ts +161 -0
- package/lib/routes/augmentcode/namespace.ts +9 -0
- package/lib/routes/augmentcode/templates/description.art +17 -0
- package/lib/routes/azul/namespace.ts +9 -0
- package/lib/routes/azul/packages.ts +105 -0
- package/lib/routes/banshujiang/index.ts +763 -0
- package/lib/routes/banshujiang/namespace.ts +9 -0
- package/lib/routes/banshujiang/templates/description.art +17 -0
- package/lib/routes/bfl/announcements.ts +1 -1
- package/lib/routes/bilibili/cache.ts +78 -0
- package/lib/routes/bilibili/danmaku.ts +1 -1
- package/lib/routes/bilibili/dynamic.ts +8 -2
- package/lib/routes/bilibili/video.ts +31 -73
- package/lib/routes/biquge/index.ts +1 -1
- package/lib/routes/bsky/keyword.ts +15 -10
- package/lib/routes/capitalmind/insights.ts +40 -0
- package/lib/routes/capitalmind/namespace.ts +8 -0
- package/lib/routes/capitalmind/podcasts.ts +41 -0
- package/lib/routes/capitalmind/utils.ts +122 -0
- package/lib/routes/cartoonmad/comic.ts +1 -1
- package/lib/routes/chikubi/index.ts +1 -0
- package/lib/routes/chikubi/tag.ts +1 -0
- package/lib/routes/chocolatey/namespace.ts +9 -0
- package/lib/routes/chocolatey/packages.ts +122 -0
- package/lib/routes/cmde/index.ts +1 -1
- package/lib/routes/cockroachlabs/blog.ts +113 -0
- package/lib/routes/cockroachlabs/namespace.ts +7 -0
- package/lib/routes/cool18/index.ts +4 -1
- package/lib/routes/coomer/index.ts +12 -6
- package/lib/routes/coomer/namespace.ts +1 -1
- package/lib/routes/copymanga/comic.ts +7 -9
- package/lib/routes/css-tricks/articles.ts +48 -0
- package/lib/routes/css-tricks/collections.ts +62 -0
- package/lib/routes/css-tricks/namespace.ts +8 -0
- package/lib/routes/css-tricks/popular.ts +39 -0
- package/lib/routes/css-tricks/utils.ts +103 -0
- package/lib/routes/cursor/changelog.ts +26 -17
- package/lib/routes/cursor/namespace.ts +1 -1
- package/lib/routes/cw/utils.ts +6 -13
- package/lib/routes/dealstreetasia/home.ts +1 -1
- package/lib/routes/dedao/index.ts +3 -3
- package/lib/routes/deepl/blog.ts +422 -0
- package/lib/routes/deepl/namespace.ts +9 -0
- package/lib/routes/deepl/templates/description.art +21 -0
- package/lib/routes/deeplearning/the-batch.ts +1 -1
- package/lib/routes/dev.to/guides.ts +100 -0
- package/lib/routes/dev.to/namespace.ts +8 -0
- package/lib/routes/dev.to/top.ts +105 -0
- package/lib/routes/dgut/jwb.ts +73 -0
- package/lib/routes/dgut/namespace.ts +9 -0
- package/lib/routes/digitalpolicyalert/activity-tracker.ts +135 -0
- package/lib/routes/digitalpolicyalert/namespace.ts +9 -0
- package/lib/routes/dnaindia/common.ts +26 -8
- package/lib/routes/douban/other/list.ts +3 -3
- package/lib/routes/e-hentai/index.ts +4 -1
- package/lib/routes/ehentai/tag.ts +1 -0
- package/lib/routes/englishhome/index.ts +55 -0
- package/lib/routes/englishhome/namespace.ts +6 -0
- package/lib/routes/epicgames/index.ts +2 -2
- package/lib/routes/espn/news.ts +1 -1
- package/lib/routes/expats/czech-news.ts +272 -0
- package/lib/routes/expats/namespace.ts +9 -0
- package/lib/routes/fanbox/index.ts +1 -0
- package/lib/routes/fanbox/utils.ts +1 -1
- package/lib/routes/fansly/tag.ts +1 -0
- package/lib/routes/fantia/search.ts +1 -1
- package/lib/routes/fantube/creator.ts +69 -0
- package/lib/routes/fantube/namespace.ts +7 -0
- package/lib/routes/fantube/templates/post.art +17 -0
- package/lib/routes/fantube/types.ts +100 -0
- package/lib/routes/fantube/utils.ts +268 -0
- package/lib/routes/follow/profile.ts +1 -1
- package/lib/routes/followin/news.ts +1 -1
- package/lib/routes/foresightnews/util.ts +1 -1
- package/lib/routes/freexcomic/book.ts +4 -1
- package/lib/routes/gamer/hot.ts +5 -5
- package/lib/routes/gaoyu/blog.ts +145 -0
- package/lib/routes/gaoyu/namespace.ts +9 -0
- package/lib/routes/gaoyu/templates/description.art +7 -0
- package/lib/routes/geocaching/blogs.ts +2 -2
- package/lib/routes/github/namespace.ts +1 -1
- package/lib/routes/github/private-feed.ts +229 -0
- package/lib/routes/github/star.ts +1 -1
- package/lib/routes/google/extension.ts +9 -10
- package/lib/routes/gov/beijing/bphc/index.ts +1 -1
- package/lib/routes/gov/ccdi/index.ts +1 -1
- package/lib/routes/gov/chongqing/sydwgkzp.ts +22 -6
- package/lib/routes/gov/customs/list.ts +1 -1
- package/lib/routes/gov/general/general.ts +1 -1
- package/lib/routes/gov/hangzhou/zwfw.ts +1 -1
- package/lib/routes/gov/pbc/goutongjiaoliu.ts +1 -1
- package/lib/routes/gov/shenzhen/szlh/index.ts +77 -0
- package/lib/routes/gov/shenzhen/szlh/namespace.ts +8 -0
- package/lib/routes/grist/utils.ts +5 -4
- package/lib/routes/hanime1/search.ts +4 -2
- package/lib/routes/hellogithub/report.ts +1 -1
- package/lib/routes/hit/hitgs.ts +240 -54
- package/lib/routes/hit/templates/description.art +7 -0
- package/lib/routes/hlju/namespace.ts +8 -0
- package/lib/routes/hlju/news.ts +141 -0
- package/lib/routes/hostmonit/cloudflareyes.ts +1 -1
- package/lib/routes/hotukdeals/index.ts +1 -1
- package/lib/routes/hyperdash/namespace.ts +7 -0
- package/lib/routes/hyperdash/templates/description.art +34 -0
- package/lib/routes/hyperdash/top-traders.ts +84 -0
- package/lib/routes/hyperdash/utils.ts +49 -0
- package/lib/routes/hypergryph/arknights/announce.ts +1 -1
- package/lib/routes/ielts/index.ts +1 -1
- package/lib/routes/infoq/topic.ts +16 -13
- package/lib/routes/instagram/web-api/index.ts +17 -13
- package/lib/routes/instagram/web-api/utils.ts +46 -63
- package/lib/routes/jamesclear/book-summaries.ts +40 -0
- package/lib/routes/jamesclear/great-speeches.ts +40 -0
- package/lib/routes/jamesclear/namespace.ts +8 -0
- package/lib/routes/jamesclear/quotes.ts +40 -0
- package/lib/routes/jamesclear/three-two-one.ts +41 -0
- package/lib/routes/jamesclear/utils.ts +22 -0
- package/lib/routes/japanpost/utils.ts +2 -2
- package/lib/routes/javbus/index.ts +3 -0
- package/lib/routes/javdb/tags.ts +1 -0
- package/lib/routes/javlibrary/star.ts +1 -0
- package/lib/routes/javtiful/actress.ts +3 -0
- package/lib/routes/javtiful/channel.ts +3 -0
- package/lib/routes/javtrailers/casts.ts +3 -0
- package/lib/routes/jetbrains/comments.ts +99 -0
- package/lib/routes/jetbrains/namespace.ts +8 -0
- package/lib/routes/jimmyspa/books.ts +1 -1
- package/lib/routes/jimmyspa/news.ts +1 -1
- package/lib/routes/jpxgmn/tab.ts +3 -0
- package/lib/routes/kakuyomu/works.ts +3 -0
- package/lib/routes/kaopu/news.ts +1 -1
- package/lib/routes/kemono/const.ts +1 -1
- package/lib/routes/kemono/index.ts +12 -11
- package/lib/routes/kemono/namespace.ts +1 -1
- package/lib/routes/kiro/blog.ts +131 -0
- package/lib/routes/kiro/changelog.ts +128 -0
- package/lib/routes/kiro/namespace.ts +9 -0
- package/lib/routes/konachan/post.ts +3 -0
- package/lib/routes/kovidgoyal/kitty/changelog.ts +83 -0
- package/lib/routes/kovidgoyal/namespace.ts +7 -0
- package/lib/routes/kunchengblog/essay.ts +1 -1
- package/lib/routes/landiannews/category.ts +1 -1
- package/lib/routes/landiannews/index.ts +1 -1
- package/lib/routes/landiannews/tag.ts +1 -1
- package/lib/routes/line/utils.ts +1 -1
- package/lib/routes/lineageos/changes.ts +79 -0
- package/lib/routes/lineageos/namespace.ts +9 -0
- package/lib/routes/linkedin/cn/renderer.ts +1 -1
- package/lib/routes/liquipedia/cs-matches.ts +42 -14
- package/lib/routes/literotica/new.ts +1 -0
- package/lib/routes/lofter/tag.ts +27 -3
- package/lib/routes/makerworld/contest.ts +51 -0
- package/lib/routes/makerworld/namespace.ts +7 -0
- package/lib/routes/makerworld/trending.ts +45 -0
- package/lib/routes/makerworld/user-upload.ts +54 -0
- package/lib/routes/makerworld/utils.ts +18 -0
- package/lib/routes/manhuagui/comic.ts +1 -1
- package/lib/routes/manus/blog.ts +77 -0
- package/lib/routes/manus/namespace.ts +7 -0
- package/lib/routes/mastodon/tag.ts +48 -0
- package/lib/routes/mathpix/blog.ts +155 -0
- package/lib/routes/mathpix/namespace.ts +9 -0
- package/lib/routes/mathpix/templates/description.art +21 -0
- package/lib/routes/mckinsey/cn/category-map.ts +9 -15
- package/lib/routes/mckinsey/cn/index.ts +77 -40
- package/lib/routes/melonbooks/search.ts +1 -0
- package/lib/routes/metacritic/index.ts +2 -2
- package/lib/routes/meteoblue/namespace.ts +8 -0
- package/lib/routes/meteoblue/weathernews.ts +75 -0
- package/lib/routes/meteor/index.ts +1 -1
- package/lib/routes/microsoft/addon.ts +7 -9
- package/lib/routes/mihoyo/zzz/news.ts +106 -0
- package/lib/routes/missav/new.ts +2 -1
- package/lib/routes/mit/hanlab.ts +61 -0
- package/lib/routes/mit/namespace.ts +6 -0
- package/lib/routes/mittrchina/index.ts +3 -3
- package/lib/routes/mixcloud/config.ts +129 -0
- package/lib/routes/mixcloud/index.ts +163 -107
- package/lib/routes/mixcloud/user-playlist.ts +31 -0
- package/lib/routes/mixi2/community.ts +72 -0
- package/lib/routes/mixi2/discovery.ts +52 -0
- package/lib/routes/mixi2/home.ts +51 -0
- package/lib/routes/mixi2/namespace.ts +8 -0
- package/lib/routes/mixi2/user.ts +77 -0
- package/lib/routes/mixi2/utils.ts +56 -0
- package/lib/routes/modelscope/learn.ts +94 -0
- package/lib/routes/moodysmismicrosite/report.ts +1 -1
- package/lib/routes/musify/index.ts +130 -0
- package/lib/routes/musify/namespace.ts +9 -0
- package/lib/routes/musikguru/namespace.ts +9 -0
- package/lib/routes/musikguru/news.ts +146 -0
- package/lib/routes/musikguru/templates/description.art +21 -0
- package/lib/routes/myfans/post.ts +1 -0
- package/lib/routes/nankai/cc-notice.ts +114 -0
- package/lib/routes/nankai/jwc.ts +131 -0
- package/lib/routes/nankai/namespace.ts +7 -0
- package/lib/routes/nankai/notice.ts +84 -0
- package/lib/routes/nankai/yzb.ts +97 -0
- package/lib/routes/neu/yz.ts +172 -0
- package/lib/routes/newslaundry/explainer.ts +30 -0
- package/lib/routes/newslaundry/namespace.ts +8 -0
- package/lib/routes/newslaundry/nl-cheatsheet.ts +30 -0
- package/lib/routes/newslaundry/nl-collaborations.ts +30 -0
- package/lib/routes/newslaundry/podcast.ts +61 -0
- package/lib/routes/newslaundry/reports.ts +30 -0
- package/lib/routes/newslaundry/shot.ts +30 -0
- package/lib/routes/newslaundry/subscriber-only.ts +30 -0
- package/lib/routes/newslaundry/templates/description.art +28 -0
- package/lib/routes/newslaundry/utils.ts +108 -0
- package/lib/routes/newswav/latest.ts +100 -0
- package/lib/routes/newswav/namespace.ts +7 -0
- package/lib/routes/nhentai/index.ts +1 -0
- package/lib/routes/nifd/research.ts +16 -0
- package/lib/routes/nio/namespace.ts +9 -0
- package/lib/routes/nio/nioradio.ts +75 -0
- package/lib/routes/njust/cs.ts +58 -0
- package/lib/routes/njust/utils.ts +1 -1
- package/lib/routes/ntdm/video.ts +1 -1
- package/lib/routes/nuaa/utils/pypasswaf.ts +1 -1
- package/lib/routes/oilchem/index.ts +1 -1
- package/lib/routes/oncc/money18.ts +1 -1
- package/lib/routes/openai/cookbook.ts +1 -1
- package/lib/routes/paulgraham/article.ts +2 -2
- package/lib/routes/picuki/profile.ts +4 -0
- package/lib/routes/pixiv/bookmarks.ts +1 -1
- package/lib/routes/pixiv/novel-api/series/sfw.ts +1 -1
- package/lib/routes/pixiv/novels.ts +2 -2
- package/lib/routes/pixiv/user.ts +1 -1
- package/lib/routes/playno1/av.ts +1 -0
- package/lib/routes/pornhub/model.ts +3 -7
- package/lib/routes/pornhub/pornstar.ts +2 -7
- package/lib/routes/pornhub/users.ts +2 -7
- package/lib/routes/pornhub/utils.ts +12 -1
- package/lib/routes/qingting/podcast.ts +2 -1
- package/lib/routes/qipamaijia/index.ts +1 -0
- package/lib/routes/questmobile/report.ts +1 -1
- package/lib/routes/railway/index.ts +73 -0
- package/lib/routes/railway/namespace.ts +8 -0
- package/lib/routes/reuters/common.ts +0 -3
- package/lib/routes/rockthejvm/articles.ts +167 -0
- package/lib/routes/rockthejvm/namespace.ts +9 -0
- package/lib/routes/rockthejvm/templates/description.art +7 -0
- package/lib/routes/samrdprc/namespace.ts +7 -0
- package/lib/routes/samrdprc/news.ts +79 -0
- package/lib/routes/sankei/namespace.ts +7 -0
- package/lib/routes/sankei/news.ts +68 -0
- package/lib/routes/sankei/topics.ts +71 -0
- package/lib/routes/sciencenet/user.ts +1 -1
- package/lib/routes/scoop/apps.ts +188 -0
- package/lib/routes/scoop/namespace.ts +9 -0
- package/lib/routes/scoop/templates/description.art +56 -0
- package/lib/routes/scpta/namespace.ts +8 -0
- package/lib/routes/scpta/news.ts +101 -0
- package/lib/routes/seekingalpha/index.ts +1 -1
- package/lib/routes/sehuatang/index.ts +29 -31
- package/lib/routes/setn/index.ts +11 -2
- package/lib/routes/seu/cyber/index.ts +78 -0
- package/lib/routes/sicau/jiaowu.ts +42 -34
- package/lib/routes/sis001/forum.ts +1 -0
- package/lib/routes/sjtu/seiee/icisee.ts +67 -0
- package/lib/routes/sketis/isabelle-dev/blog/index.ts +1 -1
- package/lib/routes/smartlink/index.ts +13 -3
- package/lib/routes/sohu/mp.ts +17 -6
- package/lib/routes/sotwe/namespace.ts +1 -0
- package/lib/routes/sotwe/user.ts +98 -0
- package/lib/routes/spankbang/new-videos.ts +1 -0
- package/lib/routes/spglobal/ratings.ts +1 -1
- package/lib/routes/stanford/blog.ts +77 -0
- package/lib/routes/stanford/namespace.ts +7 -0
- package/lib/routes/syosetu/index.ts +1 -1
- package/lib/routes/t66y/index.ts +1 -0
- package/lib/routes/taobao/mysql.ts +157 -0
- package/lib/routes/taobao/namespace.ts +2 -2
- package/lib/routes/techcrunch/category.ts +48 -0
- package/lib/routes/telegram/channel.ts +2 -2
- package/lib/routes/tesla/cx.ts +1 -1
- package/lib/routes/test/index.ts +1 -1
- package/lib/routes/themoviedb/episodes.ts +1 -1
- package/lib/routes/thewirehindi/category.ts +78 -0
- package/lib/routes/thewirehindi/index.ts +43 -0
- package/lib/routes/thewirehindi/namespace.ts +7 -0
- package/lib/routes/thewirehindi/templates/description.art +9 -0
- package/lib/routes/thewirehindi/utils.ts +33 -0
- package/lib/routes/threads/utils.ts +2 -2
- package/lib/routes/tidb/blog.ts +314 -0
- package/lib/routes/tidb/namespace.ts +9 -0
- package/lib/routes/tumblr/namespace.ts +17 -0
- package/lib/routes/tumblr/posts.ts +74 -0
- package/lib/routes/tumblr/utils.ts +110 -0
- package/lib/routes/tver/namespace.ts +7 -0
- package/lib/routes/tver/series.ts +98 -0
- package/lib/routes/twitter/api/web-api/login.ts +1 -3
- package/lib/routes/twitter/api/web-api/utils.ts +23 -1
- package/lib/routes/twitter/utils.ts +21 -21
- package/lib/routes/udn/breaking-news.ts +2 -2
- package/lib/routes/uestc/auto.ts +1 -1
- package/lib/routes/uestc/cqe.ts +1 -1
- package/lib/routes/uestc/scse.ts +1 -1
- package/lib/routes/uestc/sice.ts +1 -1
- package/lib/routes/uestc/sise.ts +1 -1
- package/lib/routes/upc/jwc.ts +32 -46
- package/lib/routes/uptimerobot/rss.ts +1 -1
- package/lib/routes/visionias/daily-news-summary.ts +65 -0
- package/lib/routes/visionias/monthly-magazine.ts +68 -0
- package/lib/routes/visionias/news-today.ts +3 -13
- package/lib/routes/visionias/utils.ts +5 -5
- package/lib/routes/visionias/weekly-focus.ts +2 -2
- package/lib/routes/wdfxw/bookfree.ts +528 -0
- package/lib/routes/wdfxw/namespace.ts +8 -0
- package/lib/routes/wdfxw/templates/description.art +13 -0
- package/lib/routes/whu/swrh.ts +1 -1
- package/lib/routes/windsurf/blog.ts +118 -0
- package/lib/routes/windsurf/changelog.ts +100 -0
- package/lib/routes/windsurf/namespace.ts +9 -0
- package/lib/routes/windsurf/templates/description.art +21 -0
- package/lib/routes/x6d/index.ts +1 -1
- package/lib/routes/xbookcn/blog.ts +1 -0
- package/lib/routes/xiaohongshu/util.ts +1 -3
- package/lib/routes/xiaoyuzhou/pickup.ts +1 -1
- package/lib/routes/ximalaya/album.ts +32 -70
- package/lib/routes/ximalaya/types.ts +48 -0
- package/lib/routes/ximalaya/utils.ts +9 -7
- package/lib/routes/xmanhua/index.ts +1 -0
- package/lib/routes/xueqiu/cookies.ts +1 -1
- package/lib/routes/xueqiu/user.ts +1 -1
- package/lib/routes/xwenming/index.ts +184 -0
- package/lib/routes/xwenming/namespace.ts +9 -0
- package/lib/routes/yahoo/news/utils.ts +1 -1
- package/lib/routes/yande/post.ts +3 -0
- package/lib/routes/ymgal/game.ts +1 -0
- package/lib/routes/youtube/api/google.ts +27 -0
- package/lib/routes/youtube/api/youtubei.ts +70 -20
- package/lib/routes/youtube/community.ts +3 -1
- package/lib/routes/youtube/utils.ts +16 -14
- package/lib/routes/zaobao/util.ts +8 -5
- package/lib/routes/zhihu/activities.ts +3 -0
- package/lib/routes/zhihu/execlib/x-zse-96-v3.ts +5 -5
- package/lib/routes/zhizhuan100/namespace.ts +7 -0
- package/lib/routes/zhizhuan100/report.ts +79 -0
- package/lib/routes/zimuxia/portfolio.ts +1 -1
- package/lib/routes/zju/sis/index.ts +161 -0
- package/lib/server.ts +5 -0
- package/lib/types.ts +58 -54
- package/lib/utils/helpers.ts +1 -1
- package/lib/utils/logger.ts +1 -1
- package/lib/utils/proxy/index.ts +102 -18
- package/lib/utils/proxy/multi-proxy.ts +139 -0
- package/lib/utils/proxy/unify-proxy.ts +3 -1
- package/lib/utils/puppeteer-utils.test.ts +1 -1
- package/lib/utils/puppeteer.test.ts +14 -27
- package/lib/utils/puppeteer.ts +51 -37
- package/lib/utils/readable-social.test.ts +65 -0
- package/lib/utils/readable-social.ts +15 -1
- package/lib/utils/request-rewriter/fetch.ts +42 -4
- package/package.json +54 -56
- package/lib/routes/mixcloud/queries.ts +0 -2274
- package/lib/routes-deprecated/dev.to/top.js +0 -40
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { Data, DataItem, Route } from '@/types';
|
|
2
|
+
import got from '@/utils/got';
|
|
3
|
+
import { load } from 'cheerio';
|
|
4
|
+
import { parseDate } from '@/utils/parse-date';
|
|
5
|
+
import cache from '@/utils/cache';
|
|
6
|
+
|
|
7
|
+
export const route: Route = {
|
|
8
|
+
path: '/guides',
|
|
9
|
+
categories: ['programming'],
|
|
10
|
+
example: '/dev.to/guides',
|
|
11
|
+
parameters: {},
|
|
12
|
+
features: {
|
|
13
|
+
requireConfig: false,
|
|
14
|
+
requirePuppeteer: false,
|
|
15
|
+
antiCrawler: false,
|
|
16
|
+
supportBT: false,
|
|
17
|
+
supportPodcast: false,
|
|
18
|
+
supportScihub: false,
|
|
19
|
+
},
|
|
20
|
+
radar: [
|
|
21
|
+
{
|
|
22
|
+
source: ['dev.to/'],
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
name: 'Trending Guides',
|
|
26
|
+
maintainers: ['Rjnishant530'],
|
|
27
|
+
handler,
|
|
28
|
+
url: 'dev.to',
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
async function handler() {
|
|
32
|
+
const baseUrl = 'https://dev.to';
|
|
33
|
+
const response = await got(baseUrl);
|
|
34
|
+
const $ = load(response.data);
|
|
35
|
+
|
|
36
|
+
// Get all guide links from the widget-link-list
|
|
37
|
+
const guideLinks = $('.widget-link-list .crayons-link--contentful')
|
|
38
|
+
.toArray()
|
|
39
|
+
.map((element) => {
|
|
40
|
+
const $element = $(element);
|
|
41
|
+
return {
|
|
42
|
+
title: $element.text().trim(),
|
|
43
|
+
link: baseUrl + $element.attr('href'),
|
|
44
|
+
};
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
// Fetch content for each guide
|
|
48
|
+
const items = await Promise.all(
|
|
49
|
+
guideLinks.map((item) =>
|
|
50
|
+
cache.tryGet(item.link, async () => {
|
|
51
|
+
const articleResponse = await got(item.link);
|
|
52
|
+
const $article = load(articleResponse.data);
|
|
53
|
+
|
|
54
|
+
// Extract article cover image
|
|
55
|
+
const coverImage = $article('.crayons-article__cover img').attr('src');
|
|
56
|
+
|
|
57
|
+
// Extract article content
|
|
58
|
+
const content = $article('.crayons-article__body').html() || '';
|
|
59
|
+
|
|
60
|
+
// Extract author info
|
|
61
|
+
const authorName = $article('.crayons-article__header__meta .fw-bold').first().text().trim();
|
|
62
|
+
const authorUrl = $article('.crayons-article__header__meta .fw-bold').first().attr('href');
|
|
63
|
+
const authorAvatar = $article('.crayons-article__header__meta .radius-full').attr('src');
|
|
64
|
+
// Extract publication date
|
|
65
|
+
const dateElement = $article('time[datetime]').first();
|
|
66
|
+
const dateString = dateElement.attr('datetime') || undefined;
|
|
67
|
+
const pubDate = dateString ? parseDate(dateString) : undefined;
|
|
68
|
+
// Extract tags
|
|
69
|
+
const tags = $article('.spec__tags .crayons-tag')
|
|
70
|
+
.toArray()
|
|
71
|
+
.map((tag) => $(tag).text().trim().replace('#', ''));
|
|
72
|
+
|
|
73
|
+
return {
|
|
74
|
+
title: item.title,
|
|
75
|
+
link: item.link,
|
|
76
|
+
description: content,
|
|
77
|
+
image: coverImage,
|
|
78
|
+
pubDate,
|
|
79
|
+
category: tags,
|
|
80
|
+
author: [
|
|
81
|
+
{
|
|
82
|
+
name: authorName,
|
|
83
|
+
url: authorUrl ? baseUrl + authorUrl : undefined,
|
|
84
|
+
avatar: authorAvatar,
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
} as DataItem;
|
|
88
|
+
})
|
|
89
|
+
)
|
|
90
|
+
);
|
|
91
|
+
|
|
92
|
+
return {
|
|
93
|
+
title: 'DEV.to - Trending Guides',
|
|
94
|
+
link: baseUrl,
|
|
95
|
+
description: 'Trending guides and resources from DEV.to',
|
|
96
|
+
language: 'en-us',
|
|
97
|
+
item: items,
|
|
98
|
+
icon: 'https://media2.dev.to/dynamic/image/width=32,height=,fit=scale-down,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8j7kvp660rqzt99zui8e.png',
|
|
99
|
+
} as Data;
|
|
100
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { Data, DataItem, Route } from '@/types';
|
|
2
|
+
import got from '@/utils/got';
|
|
3
|
+
import { parseDate } from '@/utils/parse-date';
|
|
4
|
+
import { load } from 'cheerio';
|
|
5
|
+
import cache from '@/utils/cache';
|
|
6
|
+
|
|
7
|
+
export const route: Route = {
|
|
8
|
+
path: '/top/:period',
|
|
9
|
+
categories: ['programming'],
|
|
10
|
+
example: '/dev.to/top/week',
|
|
11
|
+
parameters: { period: 'Period (week, month, year, infinity)' },
|
|
12
|
+
features: {
|
|
13
|
+
requireConfig: false,
|
|
14
|
+
requirePuppeteer: false,
|
|
15
|
+
antiCrawler: false,
|
|
16
|
+
supportBT: false,
|
|
17
|
+
supportPodcast: false,
|
|
18
|
+
supportScihub: false,
|
|
19
|
+
},
|
|
20
|
+
radar: [
|
|
21
|
+
{
|
|
22
|
+
source: ['dev.to/top/:period'],
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
name: 'Top Posts',
|
|
26
|
+
maintainers: ['dwemerx', 'Rjnishant530'],
|
|
27
|
+
handler,
|
|
28
|
+
url: 'dev.to/top',
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
async function handler(ctx) {
|
|
32
|
+
const period = ctx.req.param('period');
|
|
33
|
+
const baseUrl = 'https://dev.to';
|
|
34
|
+
const link = `${baseUrl}/top/${period}`;
|
|
35
|
+
|
|
36
|
+
// Calculate date based on period
|
|
37
|
+
const date = new Date();
|
|
38
|
+
|
|
39
|
+
switch (period) {
|
|
40
|
+
case 'week':
|
|
41
|
+
date.setDate(date.getDate() - 7);
|
|
42
|
+
break;
|
|
43
|
+
case 'month':
|
|
44
|
+
date.setMonth(date.getMonth() - 1);
|
|
45
|
+
break;
|
|
46
|
+
case 'year':
|
|
47
|
+
date.setFullYear(date.getFullYear() - 1);
|
|
48
|
+
break;
|
|
49
|
+
case 'infinity':
|
|
50
|
+
default:
|
|
51
|
+
date.setFullYear(date.getFullYear() - 5);
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const publishedDate = date.toISOString();
|
|
56
|
+
const apiUrl = `https://dev.to/search/feed_content?per_page=15&sort_by=public_reactions_count&sort_direction=desc&approved=&class_name=Article&published_at%5Bgte%5D=${encodeURIComponent(publishedDate)}`;
|
|
57
|
+
const response = await got({
|
|
58
|
+
method: 'get',
|
|
59
|
+
url: apiUrl,
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
const data = response.data;
|
|
63
|
+
|
|
64
|
+
// Fetch content for each article
|
|
65
|
+
const items = await Promise.all(
|
|
66
|
+
data.result.map((item) => {
|
|
67
|
+
const articleUrl = `${baseUrl}${item.path}`;
|
|
68
|
+
return cache.tryGet(articleUrl, async () => {
|
|
69
|
+
const articleResponse = await got(articleUrl);
|
|
70
|
+
const $ = load(articleResponse.data);
|
|
71
|
+
|
|
72
|
+
// Extract article cover image
|
|
73
|
+
const coverImage = $('.crayons-article__cover img').attr('src');
|
|
74
|
+
|
|
75
|
+
// Extract article content
|
|
76
|
+
const content = $('.crayons-article__body').html() || '';
|
|
77
|
+
|
|
78
|
+
return {
|
|
79
|
+
title: item.title,
|
|
80
|
+
author: [
|
|
81
|
+
{
|
|
82
|
+
name: item.user.name,
|
|
83
|
+
url: `${baseUrl}/${item.user.username}`,
|
|
84
|
+
avatar: item.user.profile_image_90,
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
link: articleUrl,
|
|
88
|
+
pubDate: parseDate(item.published_at_int * 1000),
|
|
89
|
+
description: content,
|
|
90
|
+
category: item.tag_list,
|
|
91
|
+
image: coverImage,
|
|
92
|
+
} as DataItem;
|
|
93
|
+
});
|
|
94
|
+
})
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
return {
|
|
98
|
+
title: `dev.to top (${period})`,
|
|
99
|
+
link,
|
|
100
|
+
description: 'Top dev.to posts',
|
|
101
|
+
language: 'en-us',
|
|
102
|
+
item: items,
|
|
103
|
+
icon: 'https://media2.dev.to/dynamic/image/width=32,height=,fit=scale-down,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8j7kvp660rqzt99zui8e.png',
|
|
104
|
+
} as Data;
|
|
105
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Route } from '@/types';
|
|
2
|
+
import cache from '@/utils/cache';
|
|
3
|
+
import ofetch from '@/utils/ofetch';
|
|
4
|
+
import { load } from 'cheerio';
|
|
5
|
+
import { parseDate } from '@/utils/parse-date';
|
|
6
|
+
|
|
7
|
+
export const route: Route = {
|
|
8
|
+
path: '/jwb/:type?',
|
|
9
|
+
categories: ['university'],
|
|
10
|
+
example: '/dgut/jwb/jwtz',
|
|
11
|
+
parameters: { type: '哪种通知,默认为教务通知' },
|
|
12
|
+
features: {
|
|
13
|
+
requireConfig: false,
|
|
14
|
+
requirePuppeteer: false,
|
|
15
|
+
antiCrawler: false,
|
|
16
|
+
supportBT: false,
|
|
17
|
+
supportPodcast: false,
|
|
18
|
+
supportScihub: false,
|
|
19
|
+
},
|
|
20
|
+
maintainers: ['1200522928'],
|
|
21
|
+
radar: [
|
|
22
|
+
{
|
|
23
|
+
source: ['jwb.dgut.edu.cn/tzgg/'],
|
|
24
|
+
target: '',
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
name: '教务部通知公告',
|
|
28
|
+
description: `| 教学动态 | 教务通知 | 教研通知 | 实践通知 | 产业学院 | 通识教育 |"杨振宁"班|招生信息 |采购公告 |
|
|
29
|
+
| ------- | ------- | ---------| --------| --------| ----------|---------|------- |--------|
|
|
30
|
+
| jxdt | jwtz | jytz | sjtz | cyxy | tsjy | yznb | zsxx | cggg |`,
|
|
31
|
+
handler,
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
async function handler(ctx) {
|
|
35
|
+
const { type = 'jwtz' } = ctx.req.param();
|
|
36
|
+
const url = `https://jwb.dgut.edu.cn/tzgg/${type}.htm`;
|
|
37
|
+
const baseurl = 'https://jwb.dgut.edu.cn/';
|
|
38
|
+
|
|
39
|
+
const response = await ofetch(url);
|
|
40
|
+
const $ = load(response);
|
|
41
|
+
const list = $('ul.ul-new4 > li')
|
|
42
|
+
.toArray()
|
|
43
|
+
.map((item) => {
|
|
44
|
+
const $li = $(item);
|
|
45
|
+
const $a = $li.find('a.con');
|
|
46
|
+
return {
|
|
47
|
+
title: $a.find('.tit').text().trim(),
|
|
48
|
+
pubDate: parseDate(`${$a.find('.year').text().trim()}-${$a.find('.day').text().trim()}`),
|
|
49
|
+
link: `${baseurl}${$a.attr('href')}`,
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
const items = await Promise.all(
|
|
54
|
+
list.map((item) =>
|
|
55
|
+
cache.tryGet(item.link, async () => {
|
|
56
|
+
const response = await ofetch(item.link);
|
|
57
|
+
const $ = load(response);
|
|
58
|
+
|
|
59
|
+
return {
|
|
60
|
+
...item,
|
|
61
|
+
description: $('div.v_news_content').first().html() || undefined,
|
|
62
|
+
};
|
|
63
|
+
})
|
|
64
|
+
)
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
return {
|
|
68
|
+
title: $('title').text(),
|
|
69
|
+
link: url,
|
|
70
|
+
allowEmpty: true,
|
|
71
|
+
item: items,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { type Data, type DataItem, type Route, ViewType } from '@/types';
|
|
2
|
+
|
|
3
|
+
import ofetch from '@/utils/ofetch';
|
|
4
|
+
import { parseDate } from '@/utils/parse-date';
|
|
5
|
+
|
|
6
|
+
import { type CheerioAPI, load } from 'cheerio';
|
|
7
|
+
import { type Context } from 'hono';
|
|
8
|
+
|
|
9
|
+
const createSearchParams = (queryString: string, limit: number = 30): URLSearchParams => {
|
|
10
|
+
const params = new URLSearchParams(queryString);
|
|
11
|
+
params.set('offset', '0');
|
|
12
|
+
params.set('limit', limit.toString());
|
|
13
|
+
return params;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const searchParamsToObject = (searchParams: URLSearchParams): Record<string, string> => {
|
|
17
|
+
const obj: Record<string, string> = {};
|
|
18
|
+
for (const [key, value] of searchParams.entries()) {
|
|
19
|
+
obj[key] = value;
|
|
20
|
+
}
|
|
21
|
+
return obj;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const handler = async (ctx: Context): Promise<Data> => {
|
|
25
|
+
const { filters } = ctx.req.param();
|
|
26
|
+
const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10);
|
|
27
|
+
const params: URLSearchParams = createSearchParams(filters, limit);
|
|
28
|
+
|
|
29
|
+
const baseUrl: string = 'https://digitalpolicyalert.org';
|
|
30
|
+
const apiBaseUrl: string = 'https://api.globaltradealert.org';
|
|
31
|
+
const targetUrl: string = new URL(`activity-tracker?${params.toString()}`, baseUrl).href;
|
|
32
|
+
const apiUrl: string = new URL('dpa/intervention', apiBaseUrl).href;
|
|
33
|
+
|
|
34
|
+
const response = await ofetch(apiUrl, {
|
|
35
|
+
query: searchParamsToObject(params),
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const targetResponse = await ofetch(targetUrl);
|
|
39
|
+
const $: CheerioAPI = load(targetResponse);
|
|
40
|
+
const language = $('html').attr('lang') ?? 'en';
|
|
41
|
+
|
|
42
|
+
let items: DataItem[] = [];
|
|
43
|
+
|
|
44
|
+
items = response.results.slice(0, limit).map((item): DataItem => {
|
|
45
|
+
const title: string = item.title;
|
|
46
|
+
const description: string | undefined = item.latest_event?.description ?? undefined;
|
|
47
|
+
const pubDate: number | string = item.latest_event?.date;
|
|
48
|
+
const linkUrl: string | undefined = item.slug ? `change/${item.slug}` : undefined;
|
|
49
|
+
const categories: string[] = [
|
|
50
|
+
...new Set([
|
|
51
|
+
...(item.economic_activities?.map((activity) => activity.name) ?? []),
|
|
52
|
+
...(item.implementers?.map((implementer) => implementer.name) ?? []),
|
|
53
|
+
...(item.policies?.map((policy) => policy.name) ?? []),
|
|
54
|
+
item.status?.name,
|
|
55
|
+
item.type?.name,
|
|
56
|
+
]),
|
|
57
|
+
].filter(Boolean);
|
|
58
|
+
const authors: DataItem['author'] =
|
|
59
|
+
item.implementers?.map((author) => ({
|
|
60
|
+
name: author.name,
|
|
61
|
+
url: undefined,
|
|
62
|
+
avatar: undefined,
|
|
63
|
+
})) ?? undefined;
|
|
64
|
+
const updated: number | string = pubDate;
|
|
65
|
+
|
|
66
|
+
const processedItem: DataItem = {
|
|
67
|
+
title,
|
|
68
|
+
description,
|
|
69
|
+
pubDate: pubDate ? parseDate(pubDate) : undefined,
|
|
70
|
+
link: linkUrl ? new URL(linkUrl, baseUrl).href : undefined,
|
|
71
|
+
category: categories,
|
|
72
|
+
author: authors,
|
|
73
|
+
content: {
|
|
74
|
+
html: description,
|
|
75
|
+
text: description,
|
|
76
|
+
},
|
|
77
|
+
updated: updated ? parseDate(updated) : undefined,
|
|
78
|
+
language,
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
return processedItem;
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
return {
|
|
85
|
+
title: $('title').text(),
|
|
86
|
+
description: $('meta[property="og:description"]').attr('content'),
|
|
87
|
+
link: targetUrl,
|
|
88
|
+
item: items,
|
|
89
|
+
allowEmpty: true,
|
|
90
|
+
image: $('meta[property="og:image"]').attr('content') ? new URL($('meta[property="og:image"]').attr('content'), baseUrl).href : undefined,
|
|
91
|
+
author: $('meta[property="og:site_name"]').attr('content'),
|
|
92
|
+
language,
|
|
93
|
+
id: $('meta[property="og:url"]').attr('content'),
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export const route: Route = {
|
|
98
|
+
path: '/activity-tracker/:filters?',
|
|
99
|
+
name: 'Activity Tracker',
|
|
100
|
+
url: 'digitalpolicyalert.org',
|
|
101
|
+
maintainers: ['nczitzk'],
|
|
102
|
+
handler,
|
|
103
|
+
example: '/digitalpolicyalert/activity-tracker',
|
|
104
|
+
parameters: {
|
|
105
|
+
filter: {
|
|
106
|
+
description: 'Filter, all by default',
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
description: `:::tip
|
|
110
|
+
To subscribe to [Activity Tracker - International trade](https://digitalpolicyalert.org/activity-tracker?policy=1), where the source URL is \`https://digitalpolicyalert.org/activity-tracker?policy=1\`, extract the certain parts from this URL to be used as parameters, resulting in the route as [\`/digitalpolicyalert/activity-tracker/policy=1\`](https://rsshub.app/digitalpolicyalert/activity-tracker/policy=1).
|
|
111
|
+
:::
|
|
112
|
+
`,
|
|
113
|
+
categories: ['other'],
|
|
114
|
+
features: {
|
|
115
|
+
requireConfig: false,
|
|
116
|
+
requirePuppeteer: false,
|
|
117
|
+
antiCrawler: false,
|
|
118
|
+
supportRadar: true,
|
|
119
|
+
supportBT: false,
|
|
120
|
+
supportPodcast: false,
|
|
121
|
+
supportScihub: false,
|
|
122
|
+
},
|
|
123
|
+
radar: [
|
|
124
|
+
{
|
|
125
|
+
source: ['digitalpolicyalert.org'],
|
|
126
|
+
target: (_, url) => {
|
|
127
|
+
const urlObj: URL = new URL(url);
|
|
128
|
+
const filters: string = createSearchParams(urlObj.searchParams.toString()).toString();
|
|
129
|
+
|
|
130
|
+
return `/digitalpolicyalert/activity-tracker${filters ? `/${filters}` : ''}`;
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
],
|
|
134
|
+
view: ViewType.Articles,
|
|
135
|
+
};
|
|
@@ -20,7 +20,7 @@ export async function handler(ctx) {
|
|
|
20
20
|
const { data: response } = await got(link);
|
|
21
21
|
const $ = load(response);
|
|
22
22
|
|
|
23
|
-
const listItems = $('div.
|
|
23
|
+
const listItems = $('div.list-news')
|
|
24
24
|
.toArray()
|
|
25
25
|
.map((item) => {
|
|
26
26
|
item = $(item);
|
|
@@ -36,14 +36,23 @@ export async function handler(ctx) {
|
|
|
36
36
|
cache.tryGet(item.link, async () => {
|
|
37
37
|
const { data: response } = await got(item.link);
|
|
38
38
|
const $ = load(response);
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
|
|
40
|
+
const itunes_item_image = $('div.article-img img').attr('src');
|
|
41
|
+
const category = $('div.tags ul li')
|
|
41
42
|
.toArray()
|
|
42
43
|
.map((item) => $(item).find('a').text());
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
// Process date
|
|
45
|
+
const timeText = $('p.dna-update').text();
|
|
46
|
+
const dateMatch = timeText.match(/Updated\s*:\s*([\w\s,:\d]+?)(?:\s*\||$)/);
|
|
47
|
+
let time = dateMatch ? dateMatch[1].trim() : '';
|
|
48
|
+
time = time.replace(/\s+IST$/, '');
|
|
49
|
+
const pubDate = timezone(parseDate(time), +5.5);
|
|
50
|
+
// Get author information
|
|
51
|
+
const authorMeta = $('meta[name="author"]').attr('content');
|
|
52
|
+
const author = authorMeta || 'DNA Web Team';
|
|
53
|
+
|
|
54
|
+
// Process description
|
|
55
|
+
const description = $('div.article-description')
|
|
47
56
|
.clone()
|
|
48
57
|
.children('div')
|
|
49
58
|
.remove()
|
|
@@ -51,7 +60,16 @@ export async function handler(ctx) {
|
|
|
51
60
|
.toArray()
|
|
52
61
|
.map((element) => $(element).html())
|
|
53
62
|
.join('');
|
|
54
|
-
|
|
63
|
+
|
|
64
|
+
// Return all properties at once
|
|
65
|
+
return {
|
|
66
|
+
...item,
|
|
67
|
+
itunes_item_image,
|
|
68
|
+
category,
|
|
69
|
+
pubDate,
|
|
70
|
+
author,
|
|
71
|
+
description,
|
|
72
|
+
};
|
|
55
73
|
})
|
|
56
74
|
)
|
|
57
75
|
);
|
|
@@ -3,7 +3,7 @@ import { Route } from '@/types';
|
|
|
3
3
|
import got from '@/utils/got';
|
|
4
4
|
import path from 'node:path';
|
|
5
5
|
import { art } from '@/utils/render';
|
|
6
|
-
import { fallback, queryToInteger } from '@/utils/readable-social';
|
|
6
|
+
import { fallback, queryToInteger, queryToFloat } from '@/utils/readable-social';
|
|
7
7
|
|
|
8
8
|
export const route: Route = {
|
|
9
9
|
path: '/list/:type?/:routeParams?',
|
|
@@ -52,7 +52,7 @@ export const route: Route = {
|
|
|
52
52
|
| 额外参数 | 含义 | 接受的值 | 默认值 |
|
|
53
53
|
| -------- | ---------------------- | -------- | ------ |
|
|
54
54
|
| playable | 仅看有可播放片源的影片 | 0/1 | 0 |
|
|
55
|
-
| score | 筛选评分 | 0-10
|
|
55
|
+
| score | 筛选评分 | 0.0-10.0 | 0 |
|
|
56
56
|
|
|
57
57
|
用例:\`/douban/list/tv_korean/playable=1&score=8\`
|
|
58
58
|
|
|
@@ -67,7 +67,7 @@ async function handler(ctx) {
|
|
|
67
67
|
const type = ctx.req.param('type') || 'subject_real_time_hotest';
|
|
68
68
|
const routeParams = Object.fromEntries(new URLSearchParams(ctx.req.param('routeParams')));
|
|
69
69
|
const playable = fallback(undefined, queryToInteger(routeParams.playable), 0);
|
|
70
|
-
const score = fallback(undefined,
|
|
70
|
+
const score = fallback(undefined, queryToFloat(routeParams.score), 0);
|
|
71
71
|
let start = 0;
|
|
72
72
|
const count = 50;
|
|
73
73
|
let items = [];
|
|
@@ -11,6 +11,9 @@ export const route: Route = {
|
|
|
11
11
|
path: '/:what?/:id?/:needTorrents?/:needImages?',
|
|
12
12
|
name: 'Unknown',
|
|
13
13
|
maintainers: [],
|
|
14
|
+
features: {
|
|
15
|
+
nsfw: true,
|
|
16
|
+
},
|
|
14
17
|
handler,
|
|
15
18
|
};
|
|
16
19
|
|
|
@@ -33,7 +36,7 @@ async function handler(ctx) {
|
|
|
33
36
|
$('.itd').parent().remove();
|
|
34
37
|
|
|
35
38
|
let items = $('table.gltc tbody tr')
|
|
36
|
-
.slice(1, ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) + 1 :
|
|
39
|
+
.slice(1, ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) + 1 : needImages ? 16 : 26)
|
|
37
40
|
.toArray()
|
|
38
41
|
.map((item) => {
|
|
39
42
|
item = $(item);
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Route, type Data } from '@/types';
|
|
2
|
+
import ofetch from '@/utils/ofetch';
|
|
3
|
+
import { parseDate } from '@/utils/parse-date';
|
|
4
|
+
|
|
5
|
+
export const route: Route = {
|
|
6
|
+
path: '/',
|
|
7
|
+
categories: ['blog'],
|
|
8
|
+
example: '/englishhome',
|
|
9
|
+
parameters: {},
|
|
10
|
+
features: {
|
|
11
|
+
requireConfig: false,
|
|
12
|
+
requirePuppeteer: false,
|
|
13
|
+
antiCrawler: false,
|
|
14
|
+
supportBT: false,
|
|
15
|
+
supportPodcast: false,
|
|
16
|
+
supportScihub: false,
|
|
17
|
+
},
|
|
18
|
+
radar: [
|
|
19
|
+
{
|
|
20
|
+
source: ['englishhome.org/'],
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
name: '首頁',
|
|
24
|
+
maintainers: ['johan456789'],
|
|
25
|
+
handler,
|
|
26
|
+
description: '英語之家 - The Home of English 首頁',
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
async function handler() {
|
|
30
|
+
const rootUrl = 'https://englishhome.org';
|
|
31
|
+
const apiUrl = `${rootUrl}/wp-json/wp/v2/posts?per_page=20&_embed=author,wp:term`;
|
|
32
|
+
|
|
33
|
+
const data = await ofetch<any[]>(apiUrl);
|
|
34
|
+
|
|
35
|
+
const items = data.map((post) => ({
|
|
36
|
+
title: post.title?.rendered,
|
|
37
|
+
description: post.content?.rendered ?? post.excerpt?.rendered ?? '',
|
|
38
|
+
link: post.link,
|
|
39
|
+
pubDate: parseDate(post.date_gmt ?? post.date),
|
|
40
|
+
author: post._embedded?.author?.[0]?.name,
|
|
41
|
+
category: Array.isArray(post._embedded?.['wp:term'])
|
|
42
|
+
? post._embedded['wp:term']
|
|
43
|
+
.flat()
|
|
44
|
+
.map((term: any) => term?.name)
|
|
45
|
+
.filter(Boolean)
|
|
46
|
+
: undefined,
|
|
47
|
+
}));
|
|
48
|
+
|
|
49
|
+
return {
|
|
50
|
+
title: '英語之家 - The Home of English',
|
|
51
|
+
link: rootUrl,
|
|
52
|
+
language: 'zh-TW',
|
|
53
|
+
item: items,
|
|
54
|
+
} as Data;
|
|
55
|
+
}
|
|
@@ -78,9 +78,9 @@ async function handler(ctx) {
|
|
|
78
78
|
let linkSlug =
|
|
79
79
|
item.catalogNs.mappings && item.catalogNs.mappings.length > 0
|
|
80
80
|
? item.catalogNs.mappings[0].pageSlug
|
|
81
|
-
:
|
|
81
|
+
: item.offerMappings && item.offerMappings.length > 0
|
|
82
82
|
? item.offerMappings[0].pageSlug
|
|
83
|
-
: (item.productSlug ?? item.urlSlug)
|
|
83
|
+
: (item.productSlug ?? item.urlSlug);
|
|
84
84
|
if (item.offerType === 'ADD_ON') {
|
|
85
85
|
linkSlug = item.offerMappings[0].pageSlug;
|
|
86
86
|
}
|
package/lib/routes/espn/news.ts
CHANGED
|
@@ -69,7 +69,7 @@ export const route: Route = {
|
|
|
69
69
|
author: itemDetail.byline,
|
|
70
70
|
pubDate: item.date,
|
|
71
71
|
// for videos and shortstops, no need to extract full text below
|
|
72
|
-
description: itemType === 'Media' ? renderMedia(itemDetail.video[0]) :
|
|
72
|
+
description: itemType === 'Media' ? renderMedia(itemDetail.video[0]) : itemType === 'Shortstop' ? itemDetail.headline : '',
|
|
73
73
|
};
|
|
74
74
|
});
|
|
75
75
|
|