rsshub 1.0.0-master.fb6d4f3 → 1.0.0-master.fb7e42c
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/assets/logo.svg +1 -0
- package/lib/config.ts +10 -0
- package/lib/errors/index.test.ts +15 -5
- package/lib/errors/types/captcha.ts +5 -0
- package/lib/middleware/cache.ts +4 -0
- package/lib/middleware/parameter.ts +1 -1
- package/lib/registry.ts +6 -2
- package/lib/routes/10000link/info.ts +1 -1
- package/lib/routes/18comic/album.ts +1 -0
- package/lib/routes/18comic/blogs.ts +1 -0
- package/lib/routes/18comic/search.ts +1 -0
- package/lib/routes/199it/index.ts +1 -1
- package/lib/routes/21caijing/channel.ts +1 -1
- package/lib/routes/51cto/utils.ts +1 -1
- package/lib/routes/6v123/index.ts +487 -0
- package/lib/routes/6v123/namespace.ts +1 -0
- package/lib/routes/8kcos/cat.ts +3 -0
- package/lib/routes/8kcos/latest.ts +1 -0
- package/lib/routes/8kcos/tag.ts +1 -0
- package/lib/routes/91porn/author.ts +1 -0
- package/lib/routes/95mm/category.ts +1 -0
- package/lib/routes/95mm/tag.ts +1 -0
- package/lib/routes/aa1/60s.ts +189 -0
- package/lib/routes/{xinhuanet → aa1}/namespace.ts +3 -3
- package/lib/routes/abc/index.ts +1 -1
- package/lib/routes/abskoop/index.ts +3 -0
- package/lib/routes/abskoop/nsfw.ts +3 -0
- package/lib/routes/acgvinyl/namespace.ts +6 -0
- package/lib/routes/acgvinyl/news.ts +86 -0
- package/lib/routes/ally/rail.ts +1 -1
- package/lib/routes/amazfitwatchfaces/index.ts +1 -2
- package/lib/routes/anthropic/news.ts +13 -11
- package/lib/routes/apnews/mobile-api.ts +1 -1
- package/lib/routes/apnews/sitemap.ts +1 -1
- package/lib/routes/app-sales/index.ts +1 -1
- package/lib/routes/apple/apps.ts +2 -2
- package/lib/routes/apple/podcast.ts +58 -25
- package/lib/routes/apple/security-releases.ts +2 -2
- package/lib/routes/asiafruitchina/categories.ts +1 -1
- package/lib/routes/asiantolick/index.ts +3 -0
- package/lib/routes/asmr-200/index.ts +1 -0
- package/lib/routes/bandisoft/history.ts +2 -2
- package/lib/routes/bangumi.tv/group/reply.ts +1 -1
- package/lib/routes/banshujiang/index.ts +1 -1
- package/lib/routes/banyuetan/index.ts +1 -1
- package/lib/routes/baozimh/index.ts +21 -3
- package/lib/routes/baselang/index.ts +117 -0
- package/lib/routes/baselang/namespace.ts +6 -0
- package/lib/routes/bbc/learningenglish.ts +35 -20
- package/lib/routes/bestofjs/monthly.ts +137 -0
- package/lib/routes/bestofjs/namespace.ts +7 -0
- package/lib/routes/bestofjs/templates/description.art +36 -0
- package/lib/routes/bilibili/cache.ts +17 -1
- package/lib/routes/bilibili/dynamic.ts +34 -8
- package/lib/routes/bilibili/page.ts +1 -1
- package/lib/routes/bilibili/ranking.ts +25 -17
- package/lib/routes/bilibili/wasm-exec.ts +1 -1
- package/lib/routes/bilibili/weekly-recommend.ts +22 -6
- package/lib/routes/bjp/apod.ts +1 -1
- package/lib/routes/bnext/index.ts +58 -0
- package/lib/routes/bnext/namespace.ts +7 -0
- package/lib/routes/bookwalker/namespace.ts +9 -0
- package/lib/routes/bookwalker/search.ts +114 -0
- package/lib/routes/bookwalker/templates/description.art +13 -0
- package/lib/routes/booru/mmda.ts +1 -0
- package/lib/routes/buaa/jiaowu.ts +1 -1
- package/lib/routes/bullionvault/gold-news.ts +4 -4
- package/lib/routes/cast/index.ts +1 -1
- package/lib/routes/cbndata/information.ts +250 -0
- package/lib/routes/cbndata/namespace.ts +9 -0
- package/lib/routes/cbndata/templates/description.art +17 -0
- package/lib/routes/cccmc/index.ts +1 -1
- package/lib/routes/ccg/index.ts +181 -0
- package/lib/routes/ccg/namespace.ts +9 -0
- package/lib/routes/ccg/templates/description.art +21 -0
- package/lib/routes/chikubi/category.ts +1 -0
- package/lib/routes/chikubi/navigation.ts +1 -0
- package/lib/routes/chikubi/nipple-video-category.ts +1 -0
- package/lib/routes/chikubi/nipple-video-maker.ts +1 -0
- package/lib/routes/chikubi/search.ts +1 -0
- package/lib/routes/chinadaily/language.ts +1 -1
- package/lib/routes/chinaratings/credit-research.ts +1 -1
- package/lib/routes/chub/characters.ts +3 -0
- package/lib/routes/civitai/discussions.ts +1 -0
- package/lib/routes/civitai/models.ts +1 -0
- package/lib/routes/civitai/user.ts +3 -0
- package/lib/routes/cline/blog.ts +34 -23
- package/lib/routes/coolapk/utils.ts +5 -4
- package/lib/routes/coolbuy/index.ts +106 -0
- package/lib/routes/coolbuy/namespace.ts +9 -0
- package/lib/routes/coolbuy/templates/description.art +48 -0
- package/lib/routes/coolidge/film-guide.ts +60 -0
- package/lib/routes/coolidge/namespace.ts +7 -0
- package/lib/routes/coolidge/news.ts +65 -0
- package/lib/routes/coolidge/templates/description.art +4 -0
- package/lib/routes/coomer/index.ts +4 -6
- package/lib/routes/copymanga/comic.ts +2 -1
- package/lib/routes/cosplaytele/category.ts +1 -0
- package/lib/routes/cosplaytele/latest.ts +1 -0
- package/lib/routes/cosplaytele/popular.ts +1 -0
- package/lib/routes/cosplaytele/tag.ts +1 -0
- package/lib/routes/cpta/handler.ts +1 -1
- package/lib/routes/creative-comic/book.ts +1 -1
- package/lib/routes/crush/index.ts +77 -0
- package/lib/routes/crush/namespace.ts +7 -0
- package/lib/routes/cursor/blog.ts +84 -0
- package/lib/routes/daum/potplayer.ts +3 -3
- package/lib/routes/dbaplus/new.ts +392 -0
- package/lib/routes/dbaplus/templates/description.art +21 -0
- package/lib/routes/deepl/blog.ts +2 -3
- package/lib/routes/diariofruticola/filtro.ts +1 -1
- package/lib/routes/digitalpolicyalert/activity-tracker.ts +1 -1
- package/lib/routes/dlsite/campaign.ts +1 -0
- package/lib/routes/dlsite/ci-en/article.ts +1 -0
- package/lib/routes/dlsite/new.ts +1 -0
- package/lib/routes/dlsite/z-index/index.ts +3 -0
- package/lib/routes/dockerhub/utils.ts +1 -1
- package/lib/routes/dora-world/article.ts +2 -2
- package/lib/routes/dytt/index.ts +1 -2
- package/lib/routes/eeo/kuaixun.ts +154 -0
- package/lib/routes/eeo/namespace.ts +9 -0
- package/lib/routes/eeo/templates/description.art +7 -0
- package/lib/routes/ehentai/ehapi.ts +3 -3
- package/lib/routes/ehentai/favorites.ts +1 -0
- package/lib/routes/ehentai/search.ts +1 -0
- package/lib/routes/elecfans/article.ts +64 -0
- package/lib/routes/elecfans/namespace.ts +7 -0
- package/lib/routes/elecfans/soft.ts +69 -0
- package/lib/routes/engineering/namespace.ts +8 -0
- package/lib/routes/engineering/tag.ts +55 -0
- package/lib/routes/eventbrite/events.ts +152 -0
- package/lib/routes/eventbrite/namespace.ts +7 -0
- package/lib/routes/eventernote/actors.ts +61 -64
- package/lib/routes/everia/category.ts +1 -0
- package/lib/routes/everia/latest.ts +1 -0
- package/lib/routes/everia/search.ts +1 -0
- package/lib/routes/everia/tag.ts +1 -0
- package/lib/routes/expats/czech-news.ts +1 -1
- package/lib/routes/fangchan/list.ts +1 -1
- package/lib/routes/fansly/post.ts +1 -0
- package/lib/routes/fantia/search.ts +1 -0
- package/lib/routes/fantia/user.ts +1 -0
- package/lib/routes/finology/tag.ts +1 -1
- package/lib/routes/furaffinity/art.ts +1 -0
- package/lib/routes/furaffinity/browse.ts +1 -0
- package/lib/routes/furaffinity/commissions.ts +1 -0
- package/lib/routes/furaffinity/home.ts +1 -0
- package/lib/routes/furaffinity/journal-comments.ts +1 -0
- package/lib/routes/furaffinity/journals.ts +1 -0
- package/lib/routes/furaffinity/search.ts +1 -0
- package/lib/routes/furaffinity/shouts.ts +1 -0
- package/lib/routes/furaffinity/status.ts +1 -0
- package/lib/routes/furaffinity/submission-comments.ts +1 -0
- package/lib/routes/furaffinity/user.ts +1 -0
- package/lib/routes/furaffinity/watchers.ts +1 -0
- package/lib/routes/furaffinity/watching.ts +1 -0
- package/lib/routes/gamebase/news.ts +2 -2
- package/lib/routes/gamer/gnn-index.ts +8 -3
- package/lib/routes/gcores/categories.ts +1 -1
- package/lib/routes/gcores/collections.ts +1 -1
- package/lib/routes/gcores/tags.ts +1 -1
- package/lib/routes/gcores/topics.ts +1 -1
- package/lib/routes/gdufs/xwxy/index.ts +196 -0
- package/lib/routes/gelbooru/post.ts +1 -0
- package/lib/routes/genossenschaften/index.ts +2 -3
- package/lib/routes/github/activity.ts +1 -1
- package/lib/routes/gitstar-ranking/index.ts +1 -1
- package/lib/routes/go/jihs/idwr.ts +3 -4
- package/lib/routes/google/jules.ts +63 -0
- package/lib/routes/gov/mem/namespace.ts +7 -0
- package/lib/routes/gov/mem/zfxxgkpt.ts +96 -0
- package/lib/routes/gov/moa/gjs.ts +1 -1
- package/lib/routes/gov/mot/index.ts +157 -53
- package/lib/routes/grainoil/category.ts +1 -2
- package/lib/routes/gxmzu/lib.ts +2 -2
- package/lib/routes/gxmzu/utils/index.ts +2 -2
- package/lib/routes/hameln/chapter.ts +1 -1
- package/lib/routes/hanime1/previews.ts +1 -0
- package/lib/routes/hanime1/search.ts +1 -0
- package/lib/routes/hex-rays/index.ts +1 -1
- package/lib/routes/hit/hitgs.ts +1 -1
- package/lib/routes/hit/namespace.ts +1 -1
- package/lib/routes/hpoi/banner-item.ts +28 -11
- package/lib/routes/hpoi/info.ts +1 -1
- package/lib/routes/hudsonrivertrading/index.ts +122 -0
- package/lib/routes/hudsonrivertrading/namespace.ts +7 -0
- package/lib/routes/huggingface/daily-papers.ts +45 -9
- package/lib/routes/huijin-inv/namespace.ts +7 -0
- package/lib/routes/huijin-inv/news.ts +83 -0
- package/lib/routes/hupu/index.ts +170 -74
- package/lib/routes/hupu/types.ts +163 -0
- package/lib/routes/hust/gs.ts +1 -1
- package/lib/routes/hust/mse.ts +1 -1
- package/lib/routes/huxiu/util.ts +2 -2
- package/lib/routes/immich/cursed-knowledge.ts +49 -0
- package/lib/routes/immich/namespace.ts +7 -0
- package/lib/routes/infoq/presentations.ts +1 -1
- package/lib/routes/instagram/common-utils.ts +3 -3
- package/lib/routes/investor/index.ts +362 -148
- package/lib/routes/itch/devlog.ts +7 -3
- package/lib/routes/iwara/index.ts +3 -0
- package/lib/routes/iwara/subscriptions.ts +1 -0
- package/lib/routes/javbus/index.ts +1 -1
- package/lib/routes/javdb/actors.ts +1 -0
- package/lib/routes/javdb/index.ts +3 -0
- package/lib/routes/javdb/lists.ts +3 -0
- package/lib/routes/javdb/makers.ts +1 -0
- package/lib/routes/javdb/rankings.ts +1 -0
- package/lib/routes/javdb/search.ts +1 -0
- package/lib/routes/javdb/series.ts +1 -0
- package/lib/routes/javdb/videocodes.ts +1 -0
- package/lib/routes/javlibrary/bestrated.ts +3 -0
- package/lib/routes/javlibrary/bestreviews.ts +1 -0
- package/lib/routes/javlibrary/genre.ts +3 -0
- package/lib/routes/javlibrary/maker.ts +1 -0
- package/lib/routes/javlibrary/mostwanted.ts +3 -0
- package/lib/routes/javlibrary/newentries.ts +3 -0
- package/lib/routes/javlibrary/newrelease.ts +3 -0
- package/lib/routes/javlibrary/update.ts +3 -0
- package/lib/routes/javlibrary/user.ts +3 -0
- package/lib/routes/javlibrary/utils.ts +1 -1
- package/lib/routes/javtrailers/categories.ts +3 -0
- package/lib/routes/javtrailers/studios.ts +3 -0
- package/lib/routes/jbma/namespace.ts +17 -0
- package/lib/routes/jbma/report.ts +471 -0
- package/lib/routes/jetbrains/comments.ts +1 -1
- package/lib/routes/jingzhengu/utils.ts +1 -1
- package/lib/routes/jou/utils/index.ts +2 -2
- package/lib/routes/jpxgmn/search.ts +3 -0
- package/lib/routes/jpxgmn/weekly.ts +3 -0
- package/lib/routes/juejin/aicoding.ts +102 -0
- package/lib/routes/juejin/trending.ts +70 -20
- package/lib/routes/juejin/utils.ts +36 -51
- package/lib/routes/jumeili/home.ts +1 -1
- package/lib/routes/kakuyomu/works.ts +1 -1
- package/lib/routes/kemono/index.ts +11 -3
- package/lib/routes/kemono/templates/discord.art +1 -1
- package/lib/routes/kisskiss/blog.ts +1 -0
- package/lib/routes/komiic/comic.ts +2 -1
- package/lib/routes/koyso/index.ts +339 -0
- package/lib/routes/koyso/namespace.ts +9 -0
- package/lib/routes/koyso/templates/description.art +13 -0
- package/lib/routes/kpopping/kpics.ts +3 -4
- package/lib/routes/kpopping/news.ts +2 -2
- package/lib/routes/laimanhua/index.ts +1 -0
- package/lib/routes/letterboxd/index.ts +65 -0
- package/lib/routes/letterboxd/namespace.ts +8 -0
- package/lib/routes/lhratings/research.ts +1 -1
- package/lib/routes/literotica/category.ts +3 -0
- package/lib/routes/lovelive-anime/topics.ts +5 -6
- package/lib/routes/maccms/index.ts +1 -1
- package/lib/routes/mangadex/index.ts +3 -0
- package/lib/routes/mangadex/mdlist/feed.ts +1 -0
- package/lib/routes/mangadex/user/feed.ts +1 -0
- package/lib/routes/mangadex/user/follows.ts +1 -0
- package/lib/routes/manhuagui/comic.ts +1 -0
- package/lib/routes/manhuagui/subscribe.ts +1 -0
- package/lib/routes/manyvids/video.ts +3 -0
- package/lib/routes/mercari/util.ts +1 -1
- package/lib/routes/mihoyo/sr/news.ts +2 -1
- package/lib/routes/mihoyo/zzz/news.ts +2 -1
- package/lib/routes/mingpao/index.ts +1 -1
- package/lib/routes/musify/index.ts +2 -3
- package/lib/routes/mycard520/news.ts +2 -2
- package/lib/routes/nankai/ai-notice.ts +142 -0
- package/lib/routes/nankai/graduate-notice.ts +162 -0
- package/lib/routes/natgeo/natgeo.ts +3 -2
- package/lib/routes/naturalism/namespace.ts +7 -0
- package/lib/routes/naturalism/new.ts +59 -0
- package/lib/routes/netflav/index.ts +3 -0
- package/lib/routes/nhentai/search.ts +1 -0
- package/lib/routes/nhk/news-web-easy.ts +1 -1
- package/lib/routes/nicovideo/mylist.ts +39 -0
- package/lib/routes/nicovideo/types.ts +27 -0
- package/lib/routes/nicovideo/utils.ts +27 -1
- package/lib/routes/nikkei/cn/index.ts +1 -4
- package/lib/routes/nio/nioradio.ts +1 -1
- package/lib/routes/njxzc/utils/index.ts +2 -2
- package/lib/routes/notion/namespace.ts +2 -2
- package/lib/routes/now/news.ts +1 -1
- package/lib/routes/nytimes/index.ts +1 -1
- package/lib/routes/olevod/vod.ts +3 -0
- package/lib/routes/olevod/vodlist.ts +3 -0
- package/lib/routes/oreno3d/main.ts +1 -0
- package/lib/routes/oschina/column.ts +1 -2
- package/lib/routes/oschina/event.ts +1 -1
- package/lib/routes/osu/beatmaps/latest-ranked.ts +2 -3
- package/lib/routes/papers/category.ts +3 -4
- package/lib/routes/patreon/feed.ts +1 -0
- package/lib/routes/picuki/profile.ts +13 -5
- package/lib/routes/pixiv/bookmarks.ts +1 -0
- package/lib/routes/pixiv/illustfollow.ts +1 -0
- package/lib/routes/pixiv/novel-api/user-novels/sfw.ts +1 -1
- package/lib/routes/pixiv/novel-series.ts +17 -3
- package/lib/routes/pixiv/novels.ts +1 -0
- package/lib/routes/pixiv/ranking.ts +1 -0
- package/lib/routes/pixiv/search.ts +1 -0
- package/lib/routes/pixiv/user.ts +1 -0
- package/lib/routes/pixivision/utils.ts +1 -1
- package/lib/routes/pku/hr.ts +1 -1
- package/lib/routes/pku/scc/recruit.ts +1 -1
- package/lib/routes/pornhub/category-url.ts +1 -0
- package/lib/routes/pornhub/category.ts +1 -0
- package/lib/routes/pornhub/pornstar.ts +1 -0
- package/lib/routes/pornhub/search.ts +1 -0
- package/lib/routes/pornhub/users.ts +1 -0
- package/lib/routes/producthunt/templates/description.art +2 -2
- package/lib/routes/producthunt/today.ts +17 -8
- package/lib/routes/ps/trophy.ts +1 -1
- package/lib/routes/pubscholar/utils.ts +14 -1
- package/lib/routes/qq/lol/news.ts +1 -1
- package/lib/routes/qweather/3days.ts +14 -14
- package/lib/routes/qweather/now.ts +12 -10
- package/lib/routes/qweather/util.tsx +89 -0
- package/lib/routes/qwenlm/blog.ts +75 -0
- package/lib/routes/qwenlm/namespace.ts +6 -0
- package/lib/routes/radio-canada/latest.ts +30 -17
- package/lib/routes/rawkuma/manga.ts +1 -0
- package/lib/routes/ruc/ai.ts +1 -1
- package/lib/routes/ruc/hr.ts +1 -1
- package/lib/routes/samrdprc/index.ts +241 -0
- package/lib/routes/samrdprc/namespace.ts +1 -1
- package/lib/routes/scientificamerican/podcast.ts +2 -2
- package/lib/routes/scitechvista/index.ts +99 -0
- package/lib/routes/scitechvista/namespace.ts +7 -0
- package/lib/routes/scitechvista/templates/description.art +6 -0
- package/lib/routes/scoop/apps.ts +2 -4
- package/lib/routes/sdo/ff14risingstones/api.ts +78 -0
- package/lib/routes/sdo/ff14risingstones/constant.ts +338 -0
- package/lib/routes/sdo/ff14risingstones/posts.ts +80 -0
- package/lib/routes/sdo/ff14risingstones/strats.ts +75 -0
- package/lib/routes/sdo/ff14risingstones/templates/duties-party.art +41 -0
- package/lib/routes/sdo/ff14risingstones/templates/fc-party.art +26 -0
- package/lib/routes/sdo/ff14risingstones/templates/novice-network-party.art +9 -0
- package/lib/routes/sdo/ff14risingstones/templates/rp-party.art +15 -0
- package/lib/routes/sdo/ff14risingstones/timeline.ts +31 -0
- package/lib/routes/sdo/ff14risingstones/types/dynamic.ts +50 -0
- package/lib/routes/sdo/ff14risingstones/types/index.ts +3 -0
- package/lib/routes/sdo/ff14risingstones/types/other.ts +57 -0
- package/lib/routes/sdo/ff14risingstones/types/party.ts +111 -0
- package/lib/routes/sdo/ff14risingstones/user-dynamics.ts +32 -0
- package/lib/routes/sdo/ff14risingstones/user-posts.ts +32 -0
- package/lib/routes/sdo/ff14risingstones/user-resently.ts +38 -0
- package/lib/routes/sdo/ff14risingstones/user-strats.ts +32 -0
- package/lib/routes/sdo/ff14risingstones/utils.ts +215 -0
- package/lib/routes/sdo/namespace.ts +7 -0
- package/lib/routes/secretsanfrancisco/namespace.ts +7 -0
- package/lib/routes/secretsanfrancisco/rss.ts +101 -0
- package/lib/routes/secretsanfrancisco/templates/description.art +9 -0
- package/lib/routes/sehuatang/user.ts +1 -0
- package/lib/routes/showstart/utils.ts +1 -1
- package/lib/routes/shu/global.ts +6 -5
- package/lib/routes/shu/xxgk.ts +107 -0
- package/lib/routes/shuiguopai/index.ts +3 -0
- package/lib/routes/sis001/author.ts +1 -0
- package/lib/routes/sjtu/jwc.ts +1 -1
- package/lib/routes/skeb/following-creators.ts +1 -0
- package/lib/routes/skeb/following-works.ts +1 -0
- package/lib/routes/skeb/friend-works.ts +1 -0
- package/lib/routes/skeb/index.ts +1 -0
- package/lib/routes/skeb/search.ts +1 -0
- package/lib/routes/skeb/works.ts +44 -25
- package/lib/routes/skebetter/illust.ts +1 -0
- package/lib/routes/skebetter/index.ts +1 -0
- package/lib/routes/skebetter/manga.ts +1 -0
- package/lib/routes/sohu/mp.ts +1 -1
- package/lib/routes/sotwe/user.ts +1 -1
- package/lib/routes/sspai/index.ts +5 -1
- package/lib/routes/stcn/index.ts +1 -2
- package/lib/routes/stcn/rank.ts +1 -2
- package/lib/routes/surfshark/blog.ts +273 -77
- package/lib/routes/surfshark/templates/description.art +16 -4
- package/lib/routes/sustainabilitymag/articles.ts +1 -1
- package/lib/routes/syosetu/dev.ts +1 -1
- package/lib/routes/syosetu/ranking-isekai.ts +1 -1
- package/lib/routes/szse/disclosure/listed-notice.ts +44 -6
- package/lib/routes/t66y/post.ts +1 -0
- package/lib/routes/techcrunch/news.ts +1 -0
- package/lib/routes/techpowerup/index.ts +11 -11
- package/lib/routes/techpowerup/namespace.ts +1 -1
- package/lib/routes/techpowerup/review.ts +12 -12
- package/lib/routes/techpowerup/utils.ts +2 -2
- package/lib/routes/telegram/channel-media.ts +249 -0
- package/lib/routes/telegram/channel.ts +5 -4
- package/lib/routes/telegram/stories.ts +130 -0
- package/lib/routes/telegram/tglib/channel.ts +146 -117
- package/lib/routes/telegram/tglib/client.ts +37 -139
- package/lib/routes/tesla/cx.ts +1 -1
- package/lib/routes/test/index.ts +4 -0
- package/lib/routes/thegadgetflow/namespace.ts +7 -0
- package/lib/routes/thegadgetflow/rss.ts +99 -0
- package/lib/routes/thegadgetflow/templates/description.art +9 -0
- package/lib/routes/theverge/index.ts +20 -6
- package/lib/routes/threads/utils.ts +7 -3
- package/lib/routes/tidb/blog.ts +2 -2
- package/lib/routes/tmtpost/column.ts +1 -1
- package/lib/routes/toutiao/user.ts +2 -2
- package/lib/routes/trendforce/namespace.ts +9 -0
- package/lib/routes/trendforce/new.ts +113 -0
- package/lib/routes/tsinghua/news.ts +87 -0
- package/lib/routes/twitter/api/mobile-api/api.ts +1 -1
- package/lib/routes/twitter/api/web-api/api.ts +5 -1
- package/lib/routes/txrjy/fornumtopic.ts +2 -2
- package/lib/routes/typst/universe.ts +1 -1
- package/lib/routes/uber/blog.ts +87 -46
- package/lib/routes/uraaka-joshi/uraaka-joshi-user.ts +1 -0
- package/lib/routes/uraaka-joshi/uraaka-joshi.ts +3 -0
- package/lib/routes/wainao/topics.ts +1 -1
- package/lib/routes/wdfxw/bookfree.ts +1 -1
- package/lib/routes/weibo/utils.ts +17 -9
- package/lib/routes/wikipedia/current-events.ts +411 -0
- package/lib/routes/wikipedia/namespace.ts +7 -0
- package/lib/routes/wnacg/category.ts +3 -0
- package/lib/routes/wnacg/index.ts +3 -0
- package/lib/routes/wnacg/tag.ts +3 -0
- package/lib/routes/wohnnet/index.ts +2 -2
- package/lib/routes/xiaohongshu/user.ts +2 -2
- package/lib/routes/xiaohongshu/util.ts +16 -9
- package/lib/routes/xjtu/ee-jzxx.ts +1 -1
- package/lib/routes/xjtu/zs.ts +1 -1
- package/lib/routes/xsijishe/forum.ts +1 -0
- package/lib/routes/xsijishe/rank.ts +1 -0
- package/lib/routes/xwenming/index.ts +1 -1
- package/lib/routes/yahoo/news/utils.ts +7 -3
- package/lib/routes/ymgal/article.ts +1 -1
- package/lib/routes/yoasobi-music/media.ts +1 -1
- package/lib/routes/youtube/api/google.ts +20 -6
- package/lib/routes/youtube/api/subtitles.ts +86 -0
- package/lib/routes/youtube/api/youtubei.ts +7 -51
- package/lib/routes/youtube/channel.ts +1 -1
- package/lib/routes/youtube/community.ts +4 -4
- package/lib/routes/youtube/user.ts +1 -1
- package/lib/routes/yuanliao/index.ts +1 -1
- package/lib/routes/zaimanhua/comic.ts +1 -0
- package/lib/routes/zaimanhua/update.ts +1 -0
- package/lib/routes/zaker/utils.ts +1 -1
- package/lib/routes/zaobao/interactive.ts +18 -7
- package/lib/routes/zaobao/other.ts +3 -2
- package/lib/routes/zaobao/realtime.ts +3 -2
- package/lib/routes/zaobao/util.tsx +185 -0
- package/lib/routes/zaobao/zaobao.tsx +23 -0
- package/lib/routes/zaobao/znews.ts +3 -2
- package/lib/routes/zhihu/daily-section.ts +19 -24
- package/lib/routes/zhihu/daily.ts +8 -11
- package/lib/routes/zju/cse/index.ts +102 -0
- package/lib/routes/zodgame/forum.ts +1 -0
- package/lib/server.ts +1 -1
- package/lib/types.ts +1 -1
- package/lib/utils/puppeteer-utils.test.ts +5 -5
- package/lib/utils/puppeteer.test.ts +1 -1
- package/lib/views/index.tsx +4 -4
- package/package.json +55 -57
- package/lib/routes/gdufs/xwxy/xwxy-news.ts +0 -90
- package/lib/routes/hit/jwc.ts +0 -86
- package/lib/routes/picuki/utils.ts +0 -19
- package/lib/routes/qweather/templates/3days.art +0 -22
- package/lib/routes/qweather/templates/now.art +0 -16
- package/lib/routes/xinhuanet/app.ts +0 -109
- package/lib/routes/zaobao/templates/zaobao.art +0 -17
- package/lib/routes/zaobao/util.ts +0 -198
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export type TimeStamp = `${number}`;
|
|
2
|
+
|
|
3
|
+
export type DateFormat = `${number}-${number}-${number}`;
|
|
4
|
+
|
|
5
|
+
export type DateTimeFormat = `${number}-${number}-${number} ${number}:${number}:${number}`;
|
|
6
|
+
|
|
7
|
+
export type BaseResponse<T = any> = {
|
|
8
|
+
code: number;
|
|
9
|
+
data: T;
|
|
10
|
+
msg: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export interface Resently {
|
|
14
|
+
detail: string;
|
|
15
|
+
event_type: string;
|
|
16
|
+
event_type_id: string;
|
|
17
|
+
log_time: DateTimeFormat;
|
|
18
|
+
part_date: DateFormat;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface UserInfo {
|
|
22
|
+
avatar: string;
|
|
23
|
+
character_name: string;
|
|
24
|
+
group_name: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface UserPost {
|
|
28
|
+
created_at: DateTimeFormat;
|
|
29
|
+
posts_id: string;
|
|
30
|
+
part_name: string;
|
|
31
|
+
title: string;
|
|
32
|
+
character_name: string;
|
|
33
|
+
group_name: string;
|
|
34
|
+
area_name: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface PostDetail {
|
|
38
|
+
contentInfo: {
|
|
39
|
+
content: string;
|
|
40
|
+
created_at: DateTimeFormat;
|
|
41
|
+
id: string;
|
|
42
|
+
posts_id: string;
|
|
43
|
+
};
|
|
44
|
+
created_at: DateTimeFormat;
|
|
45
|
+
updated_at: DateTimeFormat;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface TeamPosition {
|
|
49
|
+
D1: string;
|
|
50
|
+
D2: string;
|
|
51
|
+
D3: string;
|
|
52
|
+
D4: string;
|
|
53
|
+
H1: string;
|
|
54
|
+
H2: string;
|
|
55
|
+
MT: string;
|
|
56
|
+
ST: string;
|
|
57
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import type { NoviceNetworkIdentity } from '../constant';
|
|
2
|
+
import type { DateFormat, DateTimeFormat, TeamPosition, TimeStamp } from './other';
|
|
3
|
+
|
|
4
|
+
export interface BaseParty {
|
|
5
|
+
area_name: string;
|
|
6
|
+
begin_time: TimeStamp;
|
|
7
|
+
character_name: string;
|
|
8
|
+
end_time: TimeStamp;
|
|
9
|
+
group_name: string;
|
|
10
|
+
id: number;
|
|
11
|
+
status: number; // 1: 招募中, !1: 已结束
|
|
12
|
+
target_area_name: string;
|
|
13
|
+
target_group_name: string | null;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// 副本招募
|
|
17
|
+
export interface DutiesParty extends BaseParty {
|
|
18
|
+
D1: number;
|
|
19
|
+
D2: number;
|
|
20
|
+
D3: number;
|
|
21
|
+
D4: number;
|
|
22
|
+
H: number;
|
|
23
|
+
H1: number;
|
|
24
|
+
H2: number;
|
|
25
|
+
MT: number;
|
|
26
|
+
ST: number;
|
|
27
|
+
T: number;
|
|
28
|
+
fb_name: string;
|
|
29
|
+
fb_time: string;
|
|
30
|
+
fb_type: string;
|
|
31
|
+
labelInfo: {
|
|
32
|
+
name: string;
|
|
33
|
+
}[];
|
|
34
|
+
progress: string;
|
|
35
|
+
strategy: string;
|
|
36
|
+
team_composition: string;
|
|
37
|
+
team_position: {
|
|
38
|
+
A: TeamPosition;
|
|
39
|
+
B: TeamPosition;
|
|
40
|
+
C: TeamPosition;
|
|
41
|
+
} | null;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface DutiesPartyDetail extends DutiesParty {
|
|
45
|
+
team_detail_mask: string | null;
|
|
46
|
+
recruit_require_mask: string | null;
|
|
47
|
+
strategy_desc_mask: string | null;
|
|
48
|
+
updated_at: DateTimeFormat | null;
|
|
49
|
+
need_job: string[];
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// 导芽招募
|
|
53
|
+
export interface NoviceNetworkParty extends BaseParty {
|
|
54
|
+
identity: NoviceNetworkIdentity; // 1: 导师, 2: 豆芽
|
|
55
|
+
title: string;
|
|
56
|
+
weekday_time: string;
|
|
57
|
+
weekend_time: string;
|
|
58
|
+
style: string[];
|
|
59
|
+
styleInfo: { style: string; pic_url: string }[];
|
|
60
|
+
detail_mask: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// 角色扮演招募
|
|
64
|
+
export interface RolePlayParty extends BaseParty {
|
|
65
|
+
address: string;
|
|
66
|
+
custom_label: string;
|
|
67
|
+
detail_mask: string;
|
|
68
|
+
open_time: string;
|
|
69
|
+
profile: string;
|
|
70
|
+
rp_area_name: string;
|
|
71
|
+
rp_group_name: string;
|
|
72
|
+
rp_name: string;
|
|
73
|
+
rp_type: ('0' | '1' | '2' | '3')[]; // 0: 无 RP 元素, 1: 轻 RP 元素, 2: 中 RP 元素, 3: 重 RP 元素
|
|
74
|
+
create_time: DateFormat;
|
|
75
|
+
cover_pic: string;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface RolePlayPartyDetail extends RolePlayParty {
|
|
79
|
+
updated_at: DateTimeFormat | null;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// 部队招募
|
|
83
|
+
export interface FreeCompanyParty extends BaseParty {
|
|
84
|
+
created_at: TimeStamp;
|
|
85
|
+
guild_id: string;
|
|
86
|
+
guild_name: string;
|
|
87
|
+
guild_tag: string;
|
|
88
|
+
labelInfo: {
|
|
89
|
+
name: string;
|
|
90
|
+
}[];
|
|
91
|
+
detail_mask: string;
|
|
92
|
+
active_member_num: number;
|
|
93
|
+
target_recruit_num: number;
|
|
94
|
+
cover_pic: string;
|
|
95
|
+
weekday_time: string;
|
|
96
|
+
weekend_time: string;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface FreeCompanyPartyDetail extends FreeCompanyParty {
|
|
100
|
+
updated_at: DateTimeFormat | null;
|
|
101
|
+
create_time: DateTimeFormat | null;
|
|
102
|
+
guild_address: string | null;
|
|
103
|
+
foot_pic: string | null;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// 其它招募
|
|
107
|
+
export interface OtherParty extends BaseParty {
|
|
108
|
+
category_name: string;
|
|
109
|
+
title: string;
|
|
110
|
+
detail_mask: string;
|
|
111
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Data, Route } from '@/types';
|
|
2
|
+
import { INDEX_URL, REQUIRE_CONFIG } from './constant';
|
|
3
|
+
import type { Context } from 'hono';
|
|
4
|
+
import { checkConfig, generateDynamicFeeds } from './utils';
|
|
5
|
+
import { getUserDynamic, getUserInfo } from './api';
|
|
6
|
+
|
|
7
|
+
export const route: Route = {
|
|
8
|
+
path: '/ff14risingstones/user-dynamics/:uid',
|
|
9
|
+
example: '/sdo/ff14risingstones/user-dynamics/10001226',
|
|
10
|
+
name: '用户动态',
|
|
11
|
+
categories: ['bbs'],
|
|
12
|
+
maintainers: ['KarasuShin'],
|
|
13
|
+
features: {
|
|
14
|
+
requireConfig: REQUIRE_CONFIG,
|
|
15
|
+
},
|
|
16
|
+
handler,
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
async function handler(ctx: Context) {
|
|
20
|
+
checkConfig();
|
|
21
|
+
|
|
22
|
+
const uid = ctx.req.param('uid');
|
|
23
|
+
|
|
24
|
+
const [dynamics, userInfo] = await Promise.all([getUserDynamic(uid), getUserInfo(uid)]);
|
|
25
|
+
|
|
26
|
+
return {
|
|
27
|
+
title: `石之家 - ${userInfo.character_name}@${userInfo.group_name} 的动态`,
|
|
28
|
+
link: `${INDEX_URL}#/me/dynamics?uuid=${uid}`,
|
|
29
|
+
image: userInfo.avatar,
|
|
30
|
+
item: await generateDynamicFeeds(dynamics),
|
|
31
|
+
} as Data;
|
|
32
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Data, Route } from '@/types';
|
|
2
|
+
import { INDEX_URL, REQUIRE_CONFIG } from './constant';
|
|
3
|
+
import type { Context } from 'hono';
|
|
4
|
+
import { checkConfig, generatePostFeeds } from './utils';
|
|
5
|
+
import { getUserInfo, getUserPosts } from './api';
|
|
6
|
+
|
|
7
|
+
export const route: Route = {
|
|
8
|
+
path: '/ff14risingstones/user-posts/:uid',
|
|
9
|
+
example: '/sdo/ff14risingstones/user-posts/10001226',
|
|
10
|
+
name: '用户发帖',
|
|
11
|
+
categories: ['bbs'],
|
|
12
|
+
maintainers: ['KarasuShin'],
|
|
13
|
+
features: {
|
|
14
|
+
requireConfig: REQUIRE_CONFIG,
|
|
15
|
+
},
|
|
16
|
+
handler,
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
async function handler(ctx: Context) {
|
|
20
|
+
checkConfig();
|
|
21
|
+
|
|
22
|
+
const uid = ctx.req.param('uid');
|
|
23
|
+
|
|
24
|
+
const [posts, userInfo] = await Promise.all([getUserPosts(uid, 1), getUserInfo(uid)]);
|
|
25
|
+
|
|
26
|
+
return {
|
|
27
|
+
title: `石之家 - ${userInfo.character_name}@${userInfo.group_name} 发布的帖子`,
|
|
28
|
+
link: `${INDEX_URL}#/me/posts?uuid=${uid}`,
|
|
29
|
+
image: userInfo.avatar,
|
|
30
|
+
item: await generatePostFeeds(posts),
|
|
31
|
+
} as Data;
|
|
32
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { Data, Route } from '@/types';
|
|
2
|
+
import { INDEX_URL, REQUIRE_CONFIG } from './constant';
|
|
3
|
+
import type { Context } from 'hono';
|
|
4
|
+
import { checkConfig } from './utils';
|
|
5
|
+
import { getResently, getUserInfo } from './api';
|
|
6
|
+
import { parseDate } from '@/utils/parse-date';
|
|
7
|
+
import timezone from '@/utils/timezone';
|
|
8
|
+
|
|
9
|
+
export const route: Route = {
|
|
10
|
+
path: '/ff14risingstones/user-resently/:uid',
|
|
11
|
+
categories: ['bbs'],
|
|
12
|
+
example: '/sdo/ff14risingstones/user-resently/10008214',
|
|
13
|
+
name: '游戏近况',
|
|
14
|
+
maintainers: ['KarasuShin'],
|
|
15
|
+
features: {
|
|
16
|
+
requireConfig: REQUIRE_CONFIG,
|
|
17
|
+
},
|
|
18
|
+
handler,
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
async function handler(ctx: Context) {
|
|
22
|
+
checkConfig();
|
|
23
|
+
|
|
24
|
+
const uid = ctx.req.param('uid');
|
|
25
|
+
|
|
26
|
+
const [resently, userInfo] = await Promise.all([getResently(uid), getUserInfo(uid)]);
|
|
27
|
+
|
|
28
|
+
return {
|
|
29
|
+
title: `石之家 - ${userInfo.character_name}@${userInfo.group_name} 的游戏近况`,
|
|
30
|
+
link: `${INDEX_URL}#/me/info?uuid=${uid}`,
|
|
31
|
+
image: userInfo.avatar,
|
|
32
|
+
item: resently.map((i) => ({
|
|
33
|
+
title: `${i.event_type} - ${i.detail}`,
|
|
34
|
+
pubDate: timezone(parseDate(i.log_time), +8),
|
|
35
|
+
guid: `sdo/ff14risingstones/resently:${uid}-${i.detail}`,
|
|
36
|
+
})),
|
|
37
|
+
} as Data;
|
|
38
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Data, Route } from '@/types';
|
|
2
|
+
import { INDEX_URL, REQUIRE_CONFIG } from './constant';
|
|
3
|
+
import type { Context } from 'hono';
|
|
4
|
+
import { checkConfig, generatePostFeeds } from './utils';
|
|
5
|
+
import { getUserInfo, getUserPosts } from './api';
|
|
6
|
+
|
|
7
|
+
export const route: Route = {
|
|
8
|
+
path: '/ff14risingstones/user-strats/:uid',
|
|
9
|
+
example: '/sdo/ff14risingstones/user-strats/10001226',
|
|
10
|
+
name: '用户攻略',
|
|
11
|
+
categories: ['bbs'],
|
|
12
|
+
maintainers: ['KarasuShin'],
|
|
13
|
+
features: {
|
|
14
|
+
requireConfig: REQUIRE_CONFIG,
|
|
15
|
+
},
|
|
16
|
+
handler,
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
async function handler(ctx: Context) {
|
|
20
|
+
checkConfig();
|
|
21
|
+
|
|
22
|
+
const uid = ctx.req.param('uid');
|
|
23
|
+
|
|
24
|
+
const [posts, userInfo] = await Promise.all([getUserPosts(uid, 2), getUserInfo(uid)]);
|
|
25
|
+
|
|
26
|
+
return {
|
|
27
|
+
title: `石之家 - ${userInfo.character_name}@${userInfo.group_name} 发布的攻略`,
|
|
28
|
+
link: `${INDEX_URL}#/me/posts?uuid=${uid}`,
|
|
29
|
+
image: userInfo.avatar,
|
|
30
|
+
item: await generatePostFeeds(posts),
|
|
31
|
+
} as Data;
|
|
32
|
+
}
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { config } from '@/config';
|
|
2
|
+
import ConfigNotFoundError from '@/errors/types/config-not-found';
|
|
3
|
+
import ofetch from '@/utils/ofetch';
|
|
4
|
+
import type { BaseResponse, DutiesPartyDetail, FreeCompanyPartyDetail, NoviceNetworkParty, PostDetail, UserDynamic, UserPost } from './types';
|
|
5
|
+
import { DataItem } from '@/types';
|
|
6
|
+
import { DynamicSource, INDEX_URL, JOB, NoviceNetworkIdentity, PLAY_STYLE } from './constant';
|
|
7
|
+
import { getDutiesRecruitDetail, getFreeCompanyRecruitDetail, getNoviceNetworkRecruitDetail, getPostsDetail } from './api';
|
|
8
|
+
import timezone from '@/utils/timezone';
|
|
9
|
+
import { parseDate } from '@/utils/parse-date';
|
|
10
|
+
import { art } from '@/utils/render';
|
|
11
|
+
import path from 'node:path';
|
|
12
|
+
|
|
13
|
+
export function checkConfig() {
|
|
14
|
+
if (!config.sdo.ff14risingstones || !config.sdo.ua) {
|
|
15
|
+
throw new ConfigNotFoundError('ff14risingstones RSS is disabled due to the lack of relevant config');
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function request(url: string, options?: RequestInit) {
|
|
20
|
+
return ofetch(url, {
|
|
21
|
+
...options,
|
|
22
|
+
headers: {
|
|
23
|
+
Cookie: `ff14risingstones=${config.sdo.ff14risingstones}`,
|
|
24
|
+
'User-Agent': config.sdo.ua!,
|
|
25
|
+
...options?.headers,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export async function requestAPI<T = any>(url: string, options?: RequestInit) {
|
|
31
|
+
const response = (await request(url, options)) as BaseResponse<T>;
|
|
32
|
+
|
|
33
|
+
if (response.code !== 10000) {
|
|
34
|
+
throw new Error(response.msg);
|
|
35
|
+
}
|
|
36
|
+
return response.data;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export async function generatePostFeeds(posts: UserPost[]) {
|
|
40
|
+
return await Promise.all(
|
|
41
|
+
posts.map(async (post) => {
|
|
42
|
+
const detail = await getPostsDetail(post.posts_id);
|
|
43
|
+
return {
|
|
44
|
+
title: `[${post.part_name}] ${post.title}`,
|
|
45
|
+
link: `${INDEX_URL}#/post/detail/${post.posts_id}`,
|
|
46
|
+
description: detail?.contentInfo.content,
|
|
47
|
+
pubDate: timezone(parseDate(post.created_at), +8),
|
|
48
|
+
updated: detail?.updated_at ? timezone(parseDate(detail.updated_at), +8) : undefined,
|
|
49
|
+
guid: `sdo/ff14risingstones/posts:${post.posts_id}`,
|
|
50
|
+
author: `${post.character_name}@${post.group_name}`,
|
|
51
|
+
} as DataItem;
|
|
52
|
+
})
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export async function generateDynamicFeeds(dynamics: UserDynamic[]) {
|
|
57
|
+
return await Promise.all(
|
|
58
|
+
dynamics.map(async (dynamic) => {
|
|
59
|
+
let title = `${dynamic.character_name}@${dynamic.group_name} ${dynamic.mask_content}`;
|
|
60
|
+
let link: string | undefined;
|
|
61
|
+
let description: string | undefined;
|
|
62
|
+
let detail: PostDetail | DutiesPartyDetail | FreeCompanyPartyDetail | NoviceNetworkParty | null = null;
|
|
63
|
+
|
|
64
|
+
switch (dynamic.from) {
|
|
65
|
+
case DynamicSource.Post:
|
|
66
|
+
case DynamicSource.Strat:
|
|
67
|
+
if (!dynamic.from_info) {
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
title += dynamic.from_info.title;
|
|
71
|
+
link = `${INDEX_URL}#/post/detail/${dynamic.from_info.posts_id}`;
|
|
72
|
+
detail = await getPostsDetail(dynamic.from_info.posts_id);
|
|
73
|
+
description = detail?.contentInfo.content;
|
|
74
|
+
break;
|
|
75
|
+
|
|
76
|
+
case DynamicSource.NoviceNetwork:
|
|
77
|
+
if (!dynamic.from_info) {
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
title += `[找${dynamic.from_info.identity === NoviceNetworkIdentity.Mentor ? '豆芽' : '导师'}] ${dynamic.from_info.title}`;
|
|
81
|
+
link = `${INDEX_URL}#/recruit/beginner?id=${dynamic.from_info.id}`;
|
|
82
|
+
detail = await getNoviceNetworkRecruitDetail(dynamic.from_info.id);
|
|
83
|
+
description = art(path.join(__dirname, 'templates/novice-network-party.art'), {
|
|
84
|
+
detail_mask: dynamic.from_info.detail_mask,
|
|
85
|
+
styles: dynamic.from_info.style.map((i) => PLAY_STYLE[i]).join(','),
|
|
86
|
+
target: `${dynamic.from_info.target_area_name} ${dynamic.from_info.target_group_name ?? '全区'}`,
|
|
87
|
+
weekday_time: detail?.weekday_time,
|
|
88
|
+
weekend_time: detail?.weekend_time,
|
|
89
|
+
});
|
|
90
|
+
break;
|
|
91
|
+
|
|
92
|
+
case DynamicSource.Duty:
|
|
93
|
+
if (!dynamic.from_info) {
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
title += `[${dynamic.from_info.fb_type}] ${dynamic.from_info.fb_name}`;
|
|
97
|
+
link = `${INDEX_URL}#/recruit/party?id=${dynamic.from_info.id}`;
|
|
98
|
+
detail = await getDutiesRecruitDetail(dynamic.from_info.id);
|
|
99
|
+
|
|
100
|
+
description = art(path.join(__dirname, 'templates/duties-party.art'), {
|
|
101
|
+
progress: dynamic.from_info.progress,
|
|
102
|
+
strategy: dynamic.from_info.strategy,
|
|
103
|
+
fb_name: dynamic.from_info.fb_name,
|
|
104
|
+
fb_time: dynamic.from_info.fb_time,
|
|
105
|
+
labelInfo: dynamic.from_info.labelInfo,
|
|
106
|
+
team_composition: dynamic.from_info.team_composition,
|
|
107
|
+
team_position: dynamic.from_info.team_position
|
|
108
|
+
? {
|
|
109
|
+
A: Object.keys(dynamic.from_info.team_position.A)
|
|
110
|
+
.filter((i) => dynamic.from_info!.team_position!.A[i] !== '0')
|
|
111
|
+
.map((i) => `${i}: ${JOB[dynamic.from_info!.team_position!.A[i]]}`)
|
|
112
|
+
.join(','),
|
|
113
|
+
B: Object.keys(dynamic.from_info.team_position.B)
|
|
114
|
+
.filter((i) => dynamic.from_info!.team_position!.B[i] !== '0')
|
|
115
|
+
.map((i) => `${i}: ${JOB[dynamic.from_info!.team_position!.B[i]]}`)
|
|
116
|
+
.join(','),
|
|
117
|
+
C: Object.keys(dynamic.from_info.team_position.C)
|
|
118
|
+
.filter((i) => dynamic.from_info!.team_position!.C[i] !== '0')
|
|
119
|
+
.map((i) => `${i}: ${JOB[dynamic.from_info!.team_position!.C[i]]}`)
|
|
120
|
+
.join(','),
|
|
121
|
+
}
|
|
122
|
+
: null,
|
|
123
|
+
MT: JOB[dynamic.from_info.MT],
|
|
124
|
+
ST: JOB[dynamic.from_info.ST],
|
|
125
|
+
T: JOB[dynamic.from_info.T],
|
|
126
|
+
H: JOB[dynamic.from_info.H],
|
|
127
|
+
H1: JOB[dynamic.from_info.H1],
|
|
128
|
+
H2: JOB[dynamic.from_info.H2],
|
|
129
|
+
D1: JOB[dynamic.from_info.D1],
|
|
130
|
+
D2: JOB[dynamic.from_info.D2],
|
|
131
|
+
D3: JOB[dynamic.from_info.D3],
|
|
132
|
+
D4: JOB[dynamic.from_info.D4],
|
|
133
|
+
need_job: detail?.need_job.map((i) => JOB[i]).join(','),
|
|
134
|
+
team_detail_mask: detail?.team_detail_mask,
|
|
135
|
+
recruit_require_mask: detail?.recruit_require_mask,
|
|
136
|
+
strategy_desc_mask: detail?.strategy_desc_mask,
|
|
137
|
+
});
|
|
138
|
+
break;
|
|
139
|
+
|
|
140
|
+
case DynamicSource.FreeCompany:
|
|
141
|
+
if (!dynamic.from_info) {
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
title += `[部队招待] ${dynamic.from_info.guild_name} <${dynamic.from_info.guild_tag}>`;
|
|
145
|
+
link = `${INDEX_URL}#/recruit/guild/detail/${dynamic.from_info.id}`;
|
|
146
|
+
detail = await getFreeCompanyRecruitDetail(dynamic.from_info.id);
|
|
147
|
+
|
|
148
|
+
description = art(path.join(__dirname, 'templates/fc-party.art'), {
|
|
149
|
+
cover_pic: dynamic.from_info.cover_pic,
|
|
150
|
+
guild_name: dynamic.from_info.guild_name,
|
|
151
|
+
guild_tag: dynamic.from_info.guild_tag,
|
|
152
|
+
labelInfo: dynamic.from_info.labelInfo,
|
|
153
|
+
area_name: dynamic.from_info.target_area_name,
|
|
154
|
+
group_name: dynamic.from_info.target_group_name,
|
|
155
|
+
active_member_num: dynamic.from_info.active_member_num,
|
|
156
|
+
target_recruit_num: dynamic.from_info.target_recruit_num,
|
|
157
|
+
weekday_time: dynamic.from_info.weekday_time,
|
|
158
|
+
weekend_time: dynamic.from_info.weekend_time,
|
|
159
|
+
guild_address: detail?.guild_address ?? '',
|
|
160
|
+
create_time: detail?.create_time ?? '',
|
|
161
|
+
foot_pic: detail?.foot_pic ?? '',
|
|
162
|
+
detail_mask: dynamic.from_info.detail_mask,
|
|
163
|
+
});
|
|
164
|
+
break;
|
|
165
|
+
|
|
166
|
+
case DynamicSource.RolePlay:
|
|
167
|
+
if (!dynamic.from_info) {
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
title += dynamic.from_info.rp_name;
|
|
171
|
+
link = `${INDEX_URL}#/recruit/roleplay/detail/${dynamic.from_info.id}`;
|
|
172
|
+
description = art(path.join(__dirname, 'templates/rp-party.art'), {
|
|
173
|
+
cover_pic: dynamic.from_info.cover_pic,
|
|
174
|
+
open_time: dynamic.from_info.open_time,
|
|
175
|
+
rp_type: `${dynamic.from_info.rp_type
|
|
176
|
+
.map(
|
|
177
|
+
(i) =>
|
|
178
|
+
({
|
|
179
|
+
'0': '无',
|
|
180
|
+
'1': '轻',
|
|
181
|
+
'2': '中',
|
|
182
|
+
'3': '重',
|
|
183
|
+
})[i]
|
|
184
|
+
)
|
|
185
|
+
.join('/')}RP 元素`,
|
|
186
|
+
create_time: dynamic.from_info.create_time,
|
|
187
|
+
area: `${dynamic.from_info.rp_area_name} ${dynamic.from_info.rp_group_name}`,
|
|
188
|
+
address: dynamic.from_info.address,
|
|
189
|
+
custom_label: dynamic.from_info.custom_label,
|
|
190
|
+
profile: dynamic.from_info.profile,
|
|
191
|
+
detail_mask: dynamic.from_info.detail_mask,
|
|
192
|
+
});
|
|
193
|
+
break;
|
|
194
|
+
case DynamicSource.Other:
|
|
195
|
+
if (!dynamic.from_info) {
|
|
196
|
+
break;
|
|
197
|
+
}
|
|
198
|
+
title += `[${dynamic.from_info.category_name}] ${dynamic.from_info.title}`;
|
|
199
|
+
link = `${INDEX_URL}#/recruit/others?id=${dynamic.from_info.id}`;
|
|
200
|
+
description = dynamic.from_info.detail_mask;
|
|
201
|
+
break;
|
|
202
|
+
default:
|
|
203
|
+
// do nothing
|
|
204
|
+
}
|
|
205
|
+
return {
|
|
206
|
+
title,
|
|
207
|
+
link,
|
|
208
|
+
pubDate: timezone(parseDate(dynamic.created_at), +8),
|
|
209
|
+
guid: `sdo/ff14risingstones/dynamics:${dynamic.id}`,
|
|
210
|
+
author: `${dynamic.character_name}@${dynamic.group_name}`,
|
|
211
|
+
description,
|
|
212
|
+
} as DataItem;
|
|
213
|
+
})
|
|
214
|
+
);
|
|
215
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { Route } from '@/types';
|
|
2
|
+
import got from '@/utils/got';
|
|
3
|
+
import { parseDate } from '@/utils/parse-date';
|
|
4
|
+
import { art } from '@/utils/render';
|
|
5
|
+
import path from 'node:path';
|
|
6
|
+
import { load } from 'cheerio';
|
|
7
|
+
import cache from '@/utils/cache';
|
|
8
|
+
|
|
9
|
+
export const route: Route = {
|
|
10
|
+
path: '/:category?',
|
|
11
|
+
categories: ['new-media'],
|
|
12
|
+
example: '/secretsanfrancisco/top-news',
|
|
13
|
+
parameters: { category: 'category name, can be found in url' },
|
|
14
|
+
features: {
|
|
15
|
+
requireConfig: false,
|
|
16
|
+
requirePuppeteer: false,
|
|
17
|
+
antiCrawler: false,
|
|
18
|
+
supportBT: false,
|
|
19
|
+
supportPodcast: false,
|
|
20
|
+
supportScihub: false,
|
|
21
|
+
},
|
|
22
|
+
radar: [
|
|
23
|
+
{
|
|
24
|
+
source: ['secretsanfrancisco.com/:category'],
|
|
25
|
+
target: '/:category',
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
name: 'Category',
|
|
29
|
+
maintainers: ['EthanWng97'],
|
|
30
|
+
handler,
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
async function handler(ctx) {
|
|
34
|
+
const baseUrl = 'https://secretsanfrancisco.com';
|
|
35
|
+
const categoryApiPath = '/wp-json/wp/v2/categories';
|
|
36
|
+
const postApiPath = '/wp-json/wp/v2/posts';
|
|
37
|
+
|
|
38
|
+
// get category number
|
|
39
|
+
const categorySlug = ctx.req.param('category') || '';
|
|
40
|
+
|
|
41
|
+
let category;
|
|
42
|
+
if (categorySlug) {
|
|
43
|
+
category = await cache.tryGet(`${baseUrl}${categoryApiPath}`, async () => {
|
|
44
|
+
const { data } = await got(`${baseUrl}${categoryApiPath}`, {
|
|
45
|
+
searchParams: { slug: categorySlug },
|
|
46
|
+
});
|
|
47
|
+
if (!data || data.length === 0) {
|
|
48
|
+
throw new Error(`Category "${categorySlug}" not found`);
|
|
49
|
+
}
|
|
50
|
+
return data[0];
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const categoryId = category?.id;
|
|
55
|
+
const categoryName = category?.name;
|
|
56
|
+
const categoryLink = category?.link;
|
|
57
|
+
|
|
58
|
+
// get posts
|
|
59
|
+
const postsUrl = `${baseUrl}${postApiPath}`;
|
|
60
|
+
const postsResponse = await got(postsUrl, {
|
|
61
|
+
searchParams: {
|
|
62
|
+
per_page: ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 10,
|
|
63
|
+
_embed: '',
|
|
64
|
+
...(categoryId && { categories: categoryId }),
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
const items = postsResponse.data
|
|
69
|
+
.filter((item) => item.language === 'en')
|
|
70
|
+
.map((item) => {
|
|
71
|
+
const featuredMedia = item._embedded?.['wp:featuredmedia']?.find((v) => v.id === item.featured_media);
|
|
72
|
+
const image = featuredMedia?.source_url;
|
|
73
|
+
const altText = featuredMedia?.alt_text || featuredMedia?.title?.rendered;
|
|
74
|
+
let caption;
|
|
75
|
+
if (featuredMedia?.caption?.rendered) {
|
|
76
|
+
caption = load(featuredMedia?.caption?.rendered);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const single = {
|
|
80
|
+
title: item.title.rendered,
|
|
81
|
+
description: art(path.join(__dirname, 'templates/description.art'), {
|
|
82
|
+
content: item.content.rendered,
|
|
83
|
+
image,
|
|
84
|
+
altText,
|
|
85
|
+
caption: caption?.text() || '',
|
|
86
|
+
}),
|
|
87
|
+
link: item.link,
|
|
88
|
+
pubDate: parseDate(item.date_gmt),
|
|
89
|
+
updated: parseDate(item.modified_gmt),
|
|
90
|
+
image,
|
|
91
|
+
author: item._embedded.author[0].name,
|
|
92
|
+
};
|
|
93
|
+
return single;
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
return {
|
|
97
|
+
title: categoryName ? `Secret San Francisco - ${categoryName}` : 'Secret San Francisco',
|
|
98
|
+
link: categoryLink || `${baseUrl}/${categorySlug}`,
|
|
99
|
+
item: items,
|
|
100
|
+
};
|
|
101
|
+
}
|