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,272 @@
|
|
|
1
|
+
import { type Data, type DataItem, type Route, ViewType } from '@/types';
|
|
2
|
+
|
|
3
|
+
import cache from '@/utils/cache';
|
|
4
|
+
import ofetch from '@/utils/ofetch';
|
|
5
|
+
import { parseDate } from '@/utils/parse-date';
|
|
6
|
+
|
|
7
|
+
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
|
8
|
+
import type { Element } from 'domhandler';
|
|
9
|
+
import { type Context } from 'hono';
|
|
10
|
+
|
|
11
|
+
export const handler = async (ctx: Context): Promise<Data> => {
|
|
12
|
+
const { category = 'daily-news' } = ctx.req.param();
|
|
13
|
+
const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10);
|
|
14
|
+
|
|
15
|
+
const baseUrl: string = 'https://www.expats.cz';
|
|
16
|
+
const targetUrl: string = new URL(`czech-news/${category}`, baseUrl).href;
|
|
17
|
+
|
|
18
|
+
const response = await ofetch(targetUrl);
|
|
19
|
+
const $: CheerioAPI = load(response);
|
|
20
|
+
const language = $('html').attr('lang') ?? 'en';
|
|
21
|
+
|
|
22
|
+
let items: DataItem[] = [];
|
|
23
|
+
|
|
24
|
+
items = $('div.main h3 a')
|
|
25
|
+
.slice(0, limit)
|
|
26
|
+
.toArray()
|
|
27
|
+
.map((el): Element => {
|
|
28
|
+
const $el: Cheerio<Element> = $(el);
|
|
29
|
+
|
|
30
|
+
const processedItem: DataItem = {
|
|
31
|
+
title: $el.text(),
|
|
32
|
+
link: new URL($el.attr('href') as string, baseUrl).href,
|
|
33
|
+
language,
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return processedItem;
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
items = await Promise.all(
|
|
40
|
+
items.map((item) => {
|
|
41
|
+
if (!item.link) {
|
|
42
|
+
return item;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return cache.tryGet(item.link, async (): Promise<DataItem> => {
|
|
46
|
+
const detailResponse = await ofetch(item.link);
|
|
47
|
+
const $$: CheerioAPI = load(detailResponse);
|
|
48
|
+
|
|
49
|
+
$$('div.promo-widget, div.eas').remove();
|
|
50
|
+
|
|
51
|
+
const title: string = $$('div.title h1').text();
|
|
52
|
+
const description: string | undefined = $$('div#expats-article-content').html() ?? undefined;
|
|
53
|
+
const pubDateStr: string | undefined = $$('meta[property="article:published_time"]').attr('content');
|
|
54
|
+
const categories: string[] = [$$('meta[property="article:section"]').attr('content') ?? ''];
|
|
55
|
+
const authorEls: Element[] = $$('span.written-by a').toArray();
|
|
56
|
+
const authors: DataItem['author'] = authorEls.map((authorEl) => {
|
|
57
|
+
const $$authorEl: Cheerio<Element> = $$(authorEl);
|
|
58
|
+
|
|
59
|
+
return {
|
|
60
|
+
name: $$authorEl.text(),
|
|
61
|
+
url: $$authorEl.attr('href') ? new URL($$authorEl.attr('href') as string, baseUrl).href : undefined,
|
|
62
|
+
avatar: $$('div.authors div.photos a img').attr('src') ? new URL($$('div.authors div.photos a img').attr('src') as string, baseUrl).href : undefined,
|
|
63
|
+
};
|
|
64
|
+
});
|
|
65
|
+
const image: string | undefined = $$('meta[property="og:image"]').attr('content');
|
|
66
|
+
const upDatedStr: string | undefined = pubDateStr;
|
|
67
|
+
|
|
68
|
+
const processedItem: DataItem = {
|
|
69
|
+
title,
|
|
70
|
+
description,
|
|
71
|
+
pubDate: pubDateStr ? parseDate(pubDateStr) : item.pubDate,
|
|
72
|
+
category: categories,
|
|
73
|
+
author: authors,
|
|
74
|
+
content: {
|
|
75
|
+
html: description,
|
|
76
|
+
text: description,
|
|
77
|
+
},
|
|
78
|
+
image,
|
|
79
|
+
banner: image,
|
|
80
|
+
updated: upDatedStr ? parseDate(upDatedStr) : item.updated,
|
|
81
|
+
language,
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
return {
|
|
85
|
+
...item,
|
|
86
|
+
...processedItem,
|
|
87
|
+
};
|
|
88
|
+
});
|
|
89
|
+
})
|
|
90
|
+
);
|
|
91
|
+
|
|
92
|
+
return {
|
|
93
|
+
title: $('title').text(),
|
|
94
|
+
description: $('meta[property="og:description"]').attr('content'),
|
|
95
|
+
link: targetUrl,
|
|
96
|
+
item: items,
|
|
97
|
+
allowEmpty: true,
|
|
98
|
+
image: $('meta[property="og:image"]').attr('content'),
|
|
99
|
+
author: $('meta[property="og:site_name"]').attr('content'),
|
|
100
|
+
language,
|
|
101
|
+
id: targetUrl,
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
export const route: Route = {
|
|
106
|
+
path: '/czech-news/:category?',
|
|
107
|
+
name: 'Czech News',
|
|
108
|
+
url: 'www.expats.cz',
|
|
109
|
+
maintainers: ['nczitzk'],
|
|
110
|
+
handler,
|
|
111
|
+
example: '/expats/czech-news/daily-news',
|
|
112
|
+
parameters: {
|
|
113
|
+
category: {
|
|
114
|
+
description: 'Category, `daily-news` by default',
|
|
115
|
+
options: [
|
|
116
|
+
{
|
|
117
|
+
label: 'Daily News',
|
|
118
|
+
value: 'daily-news',
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
label: 'Prague Guide',
|
|
122
|
+
value: 'prague-guide',
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
label: 'Culture & Events',
|
|
126
|
+
value: 'culture-events',
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
label: 'Food & Drink',
|
|
130
|
+
value: 'food-drink',
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
label: 'Expat Life',
|
|
134
|
+
value: 'expat-life',
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
label: 'Housing',
|
|
138
|
+
value: 'housing',
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
label: 'Education',
|
|
142
|
+
value: 'education',
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
label: 'Health',
|
|
146
|
+
value: 'health',
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
label: 'Work',
|
|
150
|
+
value: 'work',
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
label: 'Travel',
|
|
154
|
+
value: 'travel',
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
label: 'Economy',
|
|
158
|
+
value: 'economy',
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
label: 'Language',
|
|
162
|
+
value: 'language',
|
|
163
|
+
},
|
|
164
|
+
],
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
description: `:::tip
|
|
168
|
+
To subscribe to [Daily News](https://www.expats.cz/czech-news/daily-news), where the source URL is \`https://www.expats.cz/czech-news/daily-news\`, extract the certain parts from this URL to be used as parameters, resulting in the route as [\`/expats/czech-news/daily-news\`](https://rsshub.app/expats/czech-news/daily-news).
|
|
169
|
+
:::
|
|
170
|
+
|
|
171
|
+
<details>
|
|
172
|
+
<summary>More categories</summary>
|
|
173
|
+
|
|
174
|
+
| Category | ID |
|
|
175
|
+
| ------------------------------------------------------------- | --------------------------------------------------------------------- |
|
|
176
|
+
| [Daily News](https://www.expats.cz/czech-news/daily-news) | [daily-news](https://rsshub.app/expats/czech-news/daily-news) |
|
|
177
|
+
| [Prague Guide](https://www.expats.cz/czech-news/prague-guide) | [prague-guide](https://rsshub.app/expats/czech-news/prague-guide) |
|
|
178
|
+
| [Culture](https://www.expats.cz/czech-news/culture-events) | [culture-events](https://rsshub.app/expats/czech-news/culture-events) |
|
|
179
|
+
| [Food & Drink](https://www.expats.cz/czech-news/food-drink) | [food-drink](https://rsshub.app/expats/czech-news/food) |
|
|
180
|
+
| [Expat Life](https://www.expats.cz/czech-news/expat-life) | [expat-life](https://rsshub.app/expats/czech-news/expat-life) |
|
|
181
|
+
| [Housing](https://www.expats.cz/czech-news/housing) | [housing](https://rsshub.app/expats/czech-news/housing) |
|
|
182
|
+
| [Education](https://www.expats.cz/czech-news/education) | [education](https://rsshub.app/expats/czech-news/education) |
|
|
183
|
+
| [Health](https://www.expats.cz/czech-news/health) | [health](https://rsshub.app/expats/czech-news/health) |
|
|
184
|
+
| [Work](https://www.expats.cz/czech-news/work) | [work](https://rsshub.app/expats/czech-news/work) |
|
|
185
|
+
| [Travel](https://www.expats.cz/czech-news/travel) | [travel](https://rsshub.app/expats/czech-news/travel) |
|
|
186
|
+
| [Economy](https://www.expats.cz/czech-news/economy) | [economy](https://rsshub.app/expats/czech-news/economy) |
|
|
187
|
+
| [Language](https://www.expats.cz/czech-news/language) | [language](https://rsshub.app/expats/czech-news/language) |
|
|
188
|
+
|
|
189
|
+
</details>
|
|
190
|
+
`,
|
|
191
|
+
categories: ['new-media'],
|
|
192
|
+
features: {
|
|
193
|
+
requireConfig: false,
|
|
194
|
+
requirePuppeteer: false,
|
|
195
|
+
antiCrawler: false,
|
|
196
|
+
supportRadar: true,
|
|
197
|
+
supportBT: false,
|
|
198
|
+
supportPodcast: false,
|
|
199
|
+
supportScihub: false,
|
|
200
|
+
},
|
|
201
|
+
radar: [
|
|
202
|
+
{
|
|
203
|
+
source: ['www.expats.cz/czech-news/:category'],
|
|
204
|
+
target: (params) => {
|
|
205
|
+
const category: string = params.category;
|
|
206
|
+
|
|
207
|
+
return `/expats/czech-news${category ? `/${category}` : ''}`;
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
title: 'Daily News',
|
|
212
|
+
source: ['www.expats.cz/czech-news/daily-news'],
|
|
213
|
+
target: '/expats/czech-news/daily-news',
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
title: 'Prague Guide',
|
|
217
|
+
source: ['www.expats.cz/czech-news/prague-guide'],
|
|
218
|
+
target: '/expats/czech-news/prague-guide',
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
title: 'Culture & Events',
|
|
222
|
+
source: ['www.expats.cz/czech-news/culture-events'],
|
|
223
|
+
target: '/expats/czech-news/culture-events',
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
title: 'Food & Drink',
|
|
227
|
+
source: ['www.expats.cz/czech-news/food-drink'],
|
|
228
|
+
target: '/expats/czech-news/food-drink',
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
title: 'Expat Life',
|
|
232
|
+
source: ['www.expats.cz/czech-news/expat-life'],
|
|
233
|
+
target: '/expats/czech-news/expat-life',
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
title: 'Housing',
|
|
237
|
+
source: ['www.expats.cz/czech-news/housing'],
|
|
238
|
+
target: '/expats/czech-news/housing',
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
title: 'Education',
|
|
242
|
+
source: ['www.expats.cz/czech-news/education'],
|
|
243
|
+
target: '/expats/czech-news/education',
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
title: 'Health',
|
|
247
|
+
source: ['www.expats.cz/czech-news/health'],
|
|
248
|
+
target: '/expats/czech-news/health',
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
title: 'Work',
|
|
252
|
+
source: ['www.expats.cz/czech-news/work'],
|
|
253
|
+
target: '/expats/czech-news/work',
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
title: 'Travel',
|
|
257
|
+
source: ['www.expats.cz/czech-news/travel'],
|
|
258
|
+
target: '/expats/czech-news/travel',
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
title: 'Economy',
|
|
262
|
+
source: ['www.expats.cz/czech-news/economy'],
|
|
263
|
+
target: '/expats/czech-news/economy',
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
title: 'Language',
|
|
267
|
+
source: ['www.expats.cz/czech-news/language'],
|
|
268
|
+
target: '/expats/czech-news/language',
|
|
269
|
+
},
|
|
270
|
+
],
|
|
271
|
+
view: ViewType.Articles,
|
|
272
|
+
};
|
|
@@ -166,7 +166,7 @@ async function parseDetail(i: PostDetailResponse['body']) {
|
|
|
166
166
|
|
|
167
167
|
export function parseItem(item: PostItem) {
|
|
168
168
|
return cache.tryGet(`fanbox-${item.id}-${item.updatedDatetime}`, async () => {
|
|
169
|
-
const postDetail = (await ofetch(`https://api.fanbox.cc/post.info?postId=${item.id}`, { headers: getHeaders() })) as PostDetailResponse;
|
|
169
|
+
const postDetail = (await ofetch(`https://api.fanbox.cc/post.info?postId=${item.id}`, { headers: { ...getHeaders(), 'User-Agent': config.trueUA } })) as PostDetailResponse;
|
|
170
170
|
return {
|
|
171
171
|
title: item.title || `No title`,
|
|
172
172
|
description: await parseDetail(postDetail.body),
|
package/lib/routes/fansly/tag.ts
CHANGED
|
@@ -151,7 +151,7 @@ async function handler(ctx) {
|
|
|
151
151
|
|
|
152
152
|
const rootUrl = 'https://fantia.jp';
|
|
153
153
|
const apiUrl = `${rootUrl}/api/v1/search/${type}?keyword=${keyword}&peroid=${period}&brand_type=0&category=${caty === 'all' ? '' : caty}&order=${order}${
|
|
154
|
-
rating === 'all' ? '' :
|
|
154
|
+
rating === 'all' ? '' : rating === 'general' ? '&rating=general' : '&adult=1'
|
|
155
155
|
}&per_page=30`;
|
|
156
156
|
const response = await got({
|
|
157
157
|
method: 'get',
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Route } from '@/types';
|
|
2
|
+
import { parseDate } from '@/utils/parse-date';
|
|
3
|
+
import { getCreatorFragment, getCreatorPostReelList, baseUrl } from './utils';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { art } from '@/utils/render';
|
|
6
|
+
|
|
7
|
+
export const route: Route = {
|
|
8
|
+
path: '/r18/creator/:identifier',
|
|
9
|
+
categories: ['multimedia'],
|
|
10
|
+
example: '/fantube/r18/creator/miyuu',
|
|
11
|
+
parameters: { identifier: 'User handle' },
|
|
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: ['www.fantube.tokyo/r18/creator/:identifier'],
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
name: 'User Posts',
|
|
26
|
+
maintainers: ['TonyRL'],
|
|
27
|
+
handler,
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const render = ({ description, thumbnailUrl, sampleVideoId, imageUrls }) =>
|
|
31
|
+
art(path.join(__dirname, 'templates/post.art'), {
|
|
32
|
+
description,
|
|
33
|
+
thumbnailUrl,
|
|
34
|
+
sampleVideoId,
|
|
35
|
+
imageUrls,
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
async function handler(ctx) {
|
|
39
|
+
const { identifier } = ctx.req.param();
|
|
40
|
+
const limit = Number.parseInt(ctx.req.query('limit') || 18, 10);
|
|
41
|
+
|
|
42
|
+
const creatorInfo = await getCreatorFragment(identifier);
|
|
43
|
+
const posts = await getCreatorPostReelList(identifier, limit);
|
|
44
|
+
|
|
45
|
+
const items = posts.map((p) => ({
|
|
46
|
+
title: p.title.replaceAll('\n', ' ').trim(),
|
|
47
|
+
description: render({
|
|
48
|
+
description: p.description,
|
|
49
|
+
thumbnailUrl: p.thumbnailUrl,
|
|
50
|
+
sampleVideoId: p.sampleVideoId,
|
|
51
|
+
imageUrls: p.contentData?.imageUrls || [],
|
|
52
|
+
}),
|
|
53
|
+
link: `${baseUrl}/r18/post/${p.id}?creator=${identifier}`,
|
|
54
|
+
author: p.creator.displayName,
|
|
55
|
+
pubDate: parseDate(p.publishStartAt),
|
|
56
|
+
image: p.thumbnailUrl,
|
|
57
|
+
}));
|
|
58
|
+
|
|
59
|
+
return {
|
|
60
|
+
title: `${creatorInfo.displayName}のプロフィール|クリエイターページ|FANTUBE(ファンチューブ)`,
|
|
61
|
+
link: `${baseUrl}/r18/creator/${identifier}`,
|
|
62
|
+
description: creatorInfo.description,
|
|
63
|
+
image: creatorInfo.avatarImageUrl,
|
|
64
|
+
icon: creatorInfo.avatarImageUrl,
|
|
65
|
+
logo: creatorInfo.avatarImageUrl,
|
|
66
|
+
language: 'ja',
|
|
67
|
+
item: items,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{{ if thumbnailUrl }}
|
|
2
|
+
<img src="{{ thumbnailUrl }}"><br>
|
|
3
|
+
{{ /if }}
|
|
4
|
+
|
|
5
|
+
{{ if imageUrls }}
|
|
6
|
+
{{ each imageUrls img }}
|
|
7
|
+
<img src="{{ img }}"><br>
|
|
8
|
+
{{ /each }}
|
|
9
|
+
{{ /if }}
|
|
10
|
+
|
|
11
|
+
{{ if sampleVideoId }}
|
|
12
|
+
<div style="position: relative; padding-top: 56.25%"><iframe src="https://customer-7d4xajfg7g3ps2lm.cloudflarestream.com/{{ sampleVideoId }}/iframe" style="border: none; position: absolute; top: 0; height: 100%; width: 100%" allow="accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture;" allowfullscreen="true"></iframe></div><br>
|
|
13
|
+
{{ /if }}
|
|
14
|
+
|
|
15
|
+
{{ if description }}
|
|
16
|
+
{{@ description.replaceAll('\n', '<br>') }}
|
|
17
|
+
{{ /if }}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
interface PlanPost {
|
|
2
|
+
id: string;
|
|
3
|
+
thumbnailUrl: string;
|
|
4
|
+
title: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
interface Plan {
|
|
8
|
+
id: string;
|
|
9
|
+
title: string;
|
|
10
|
+
price: number;
|
|
11
|
+
description: string;
|
|
12
|
+
isArchive: boolean;
|
|
13
|
+
isRecommended: boolean;
|
|
14
|
+
deleteRequestAt: null;
|
|
15
|
+
subscriptionCloseAt: null;
|
|
16
|
+
capacity: null;
|
|
17
|
+
isSubscribing: boolean;
|
|
18
|
+
subscribersCount: number;
|
|
19
|
+
planPosts: {
|
|
20
|
+
totalCount: number;
|
|
21
|
+
nodes: {
|
|
22
|
+
post: PlanPost;
|
|
23
|
+
}[];
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
interface Followers {
|
|
28
|
+
totalCount: number;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
interface CreatorUnitPurchaseTotalCount {
|
|
32
|
+
totalCount: number;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
interface CreatorPostsTotalCount {
|
|
36
|
+
totalCount: number;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
interface AllPosts {
|
|
40
|
+
totalCount: number;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface CreatorFragment {
|
|
44
|
+
displayName: string;
|
|
45
|
+
id: string;
|
|
46
|
+
messageReceive: boolean;
|
|
47
|
+
coverImageUrl: string;
|
|
48
|
+
avatarImageUrl: string;
|
|
49
|
+
identifier: string;
|
|
50
|
+
description: string;
|
|
51
|
+
snsLinks: string[];
|
|
52
|
+
isSelf: boolean;
|
|
53
|
+
following: boolean;
|
|
54
|
+
followers: Followers;
|
|
55
|
+
creatorUnitPurchaseTotalCount: CreatorUnitPurchaseTotalCount;
|
|
56
|
+
creatorPostsTotalCount: CreatorPostsTotalCount;
|
|
57
|
+
allPosts: AllPosts;
|
|
58
|
+
plans: {
|
|
59
|
+
totalCount: number;
|
|
60
|
+
nodes: Plan[];
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
interface Comments {
|
|
65
|
+
totalCount: number;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface PostReelNode {
|
|
69
|
+
id: string;
|
|
70
|
+
title: string;
|
|
71
|
+
type: 'VIDEO' | 'IMAGE';
|
|
72
|
+
price: number;
|
|
73
|
+
sampleVideoId: string | null;
|
|
74
|
+
thumbnailUrl: string;
|
|
75
|
+
description: string;
|
|
76
|
+
publishStartAt: string;
|
|
77
|
+
pinnedAt: string | null;
|
|
78
|
+
isBuyEnabled: boolean;
|
|
79
|
+
isFavorite: boolean;
|
|
80
|
+
isMine: boolean;
|
|
81
|
+
canComment: boolean;
|
|
82
|
+
creator: CreatorFragment;
|
|
83
|
+
comments: Comments;
|
|
84
|
+
planPosts: {
|
|
85
|
+
nodes: {
|
|
86
|
+
plan: Plan;
|
|
87
|
+
}[];
|
|
88
|
+
};
|
|
89
|
+
favoritesCount: number;
|
|
90
|
+
contentData: {
|
|
91
|
+
__typename: 'PostVideoType' | 'PostImageType';
|
|
92
|
+
videoUrl: string;
|
|
93
|
+
isSample: boolean;
|
|
94
|
+
noSample: boolean;
|
|
95
|
+
durationSeconds: number;
|
|
96
|
+
encrypted: boolean;
|
|
97
|
+
imageUrls: string[];
|
|
98
|
+
count: number;
|
|
99
|
+
};
|
|
100
|
+
}
|