rsshub 1.0.0-master.eb9cabb → 1.0.0-master.ebb62b5
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 +39 -1
- package/lib/errors/index.tsx +2 -1
- package/lib/index.ts +48 -15
- package/lib/middleware/debug.ts +6 -4
- package/lib/middleware/header.test.ts +1 -0
- package/lib/middleware/header.ts +6 -0
- package/lib/middleware/template.test.ts +8 -0
- package/lib/middleware/template.tsx +5 -0
- package/lib/registry.ts +71 -1
- package/lib/router.js +0 -6
- package/lib/routes/18comic/album.ts +59 -64
- package/lib/routes/18comic/search.ts +53 -4
- package/lib/routes/18comic/utils.ts +70 -1
- package/lib/routes/36kr/hot-list.ts +1 -1
- package/lib/routes/36kr/index.ts +1 -1
- package/lib/routes/3dmgame/news-center.ts +1 -1
- package/lib/routes/500px/tribe-set.ts +1 -1
- package/lib/routes/acfun/article.ts +1 -1
- package/lib/routes/acfun/bangumi.ts +1 -1
- package/lib/routes/acfun/video.ts +1 -1
- package/lib/routes/aeon/category.ts +1 -1
- package/lib/routes/aeon/type.ts +1 -1
- package/lib/routes/agirls/topic-list.ts +1 -1
- package/lib/routes/agirls/topic.ts +1 -1
- package/lib/routes/agirls/z-index.ts +1 -1
- package/lib/routes/aibase/daily.ts +110 -0
- package/lib/routes/aibase/discover.ts +1 -1
- package/lib/routes/aibase/news.ts +1 -1
- package/lib/routes/aibase/topic.ts +1 -1
- package/lib/routes/aibase/util.ts +3 -0
- package/lib/routes/ainvest/news.ts +1 -1
- package/lib/routes/ajmide/index.ts +1 -1
- package/lib/routes/aliresearch/information.ts +1 -1
- package/lib/routes/android/security-bulletin.ts +61 -0
- 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/app-sales/index.ts +200 -0
- package/lib/routes/app-sales/mostwanted.ts +194 -0
- package/lib/routes/app-sales/namespace.ts +9 -0
- package/lib/routes/app-sales/templates/description.art +120 -0
- package/lib/routes/app-sales/util.ts +161 -0
- package/lib/routes/apple/apps.ts +1 -1
- package/lib/routes/apple/security-releases.ts +179 -0
- package/lib/routes/apple/templates/security-releases.art +28 -0
- package/lib/routes/appleinsider/index.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/baidu/gushitong/index.ts +1 -1
- package/lib/routes/bakamh/manga.ts +74 -0
- package/lib/routes/bakamh/namespace.ts +8 -0
- package/lib/routes/bandisoft/history.ts +329 -0
- package/lib/routes/bandisoft/namespace.ts +9 -0
- package/lib/routes/banyuetan/index.ts +238 -0
- package/lib/routes/banyuetan/namespace.ts +9 -0
- package/lib/routes/banyuetan/templates/description.art +21 -0
- package/lib/routes/bbc/learningenglish.ts +76 -0
- package/lib/routes/behance/user.ts +1 -1
- package/lib/routes/bfl/announcements.ts +127 -0
- package/lib/routes/bfl/namespace.ts +9 -0
- package/lib/routes/bigquant/collections.ts +1 -1
- package/lib/routes/bilibili/bangumi.ts +1 -1
- package/lib/routes/bilibili/cache.ts +19 -20
- package/lib/routes/bilibili/check-cookie.ts +31 -0
- package/lib/routes/bilibili/dynamic.ts +29 -15
- package/lib/routes/bilibili/followings-dynamic.ts +9 -3
- package/lib/routes/bilibili/ranking.ts +3 -1
- package/lib/routes/bilibili/readlist.ts +1 -1
- package/lib/routes/bilibili/video.ts +3 -1
- package/lib/routes/binance/announcement.ts +1 -1
- package/lib/routes/bitget/announcement.ts +1 -1
- package/lib/routes/bjp/apod.ts +1 -1
- package/lib/routes/bloomberg/authors.ts +1 -1
- package/lib/routes/bloomberg/index.ts +1 -1
- package/lib/routes/bookfere/category.ts +1 -1
- package/lib/routes/bsky/feeds.ts +1 -1
- package/lib/routes/bsky/keyword.ts +15 -10
- package/lib/routes/bsky/posts.ts +1 -1
- package/lib/routes/bupt/scss.ts +98 -0
- package/lib/routes/caixin/latest.ts +1 -1
- package/lib/routes/cara/likes.ts +1 -1
- package/lib/routes/cara/portfolio.ts +1 -1
- package/lib/routes/cara/timeline.ts +1 -1
- package/lib/routes/changba/user.ts +1 -1
- package/lib/routes/chaping/banner.ts +1 -1
- package/lib/routes/chaping/news.ts +1 -1
- package/lib/routes/chaping/newsflash.ts +1 -1
- package/lib/routes/chiphell/namespace.ts +7 -0
- package/lib/routes/chiphell/portal.ts +82 -0
- package/lib/routes/chnmuseum/namespace.ts +10 -0
- package/lib/routes/chnmuseum/xingnew.ts +73 -0
- package/lib/routes/chnmuseum/xwzt.ts +67 -0
- package/lib/routes/chocolatey/namespace.ts +9 -0
- package/lib/routes/chocolatey/packages.ts +122 -0
- package/lib/routes/chub/characters.ts +4 -6
- package/lib/routes/cih-index/namespace.ts +7 -0
- package/lib/routes/cih-index/report.ts +74 -0
- package/lib/routes/civitai/user.ts +90 -0
- package/lib/routes/cmde/index.ts +1 -1
- package/lib/routes/cna/index.ts +2 -24
- package/lib/routes/cna/utils.ts +23 -0
- package/lib/routes/cna/web/index.ts +2 -22
- package/lib/routes/cnbeta/namespace.ts +1 -1
- package/lib/routes/cngal/entry.ts +2 -2
- package/lib/routes/cngal/weekly.ts +3 -3
- package/lib/routes/cockroachlabs/blog.ts +113 -0
- package/lib/routes/cockroachlabs/namespace.ts +7 -0
- package/lib/routes/copymanga/comic.ts +7 -9
- package/lib/routes/cuilingmag/index.ts +1 -1
- package/lib/routes/cyzone/author.ts +1 -1
- package/lib/routes/cyzone/label.ts +1 -1
- package/lib/routes/daum/potplayer.ts +257 -0
- package/lib/routes/dcfever/news.ts +1 -1
- package/lib/routes/dcfever/reviews.ts +1 -1
- package/lib/routes/dcfever/trading-search.ts +1 -1
- package/lib/routes/dcfever/trading.ts +1 -1
- package/lib/routes/dedao/index.ts +1 -1
- package/lib/routes/dedao/knowledge.ts +1 -1
- package/lib/routes/dedao/list.ts +1 -1
- package/lib/routes/dedao/user.ts +1 -1
- 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/deepmind/blog.ts +1 -1
- package/lib/routes/diandong/news.ts +1 -1
- package/lib/routes/digitalcameraworld/news.ts +1 -1
- package/lib/routes/dlsite/campaign.ts +1 -1
- package/lib/routes/dlsite/ci-en/article.ts +1 -1
- package/lib/routes/dlsite/new.ts +1 -1
- package/lib/routes/dn/news.ts +1 -1
- package/lib/routes/dockerhub/build.ts +1 -1
- package/lib/routes/dongqiudi/daily.ts +1 -1
- package/lib/routes/dongqiudi/player-news.ts +1 -1
- package/lib/routes/dongqiudi/result.ts +1 -1
- package/lib/routes/dongqiudi/special.ts +1 -1
- package/lib/routes/dongqiudi/team-news.ts +1 -1
- package/lib/routes/dongqiudi/top-news.ts +1 -1
- package/lib/routes/dora-world/article.ts +1 -1
- package/lib/routes/douban/other/group.ts +1 -1
- package/lib/routes/douban/other/list.ts +3 -3
- package/lib/routes/douban/other/topic.ts +1 -1
- package/lib/routes/douban/people/status.ts +1 -1
- package/lib/routes/dx2025/index.ts +1 -1
- package/lib/routes/eastmoney/report/index.ts +1 -1
- package/lib/routes/eastmoney/search/index.ts +1 -1
- package/lib/routes/eastmoney/ttjj/user.ts +1 -1
- package/lib/routes/economist/espresso.ts +1 -1
- package/lib/routes/economist/full.ts +1 -1
- package/lib/routes/embassy/supported-list.ts +1 -1
- package/lib/routes/epicgames/index.ts +1 -1
- package/lib/routes/eventernote/actors.ts +1 -1
- package/lib/routes/everia/article.ts +21 -0
- package/lib/routes/everia/category.ts +54 -0
- package/lib/routes/everia/const.ts +4 -0
- package/lib/routes/everia/latest.ts +49 -0
- package/lib/routes/everia/namespace.ts +6 -0
- package/lib/routes/everia/search.ts +45 -0
- package/lib/routes/everia/tag.ts +54 -0
- package/lib/routes/fanbox/utils.ts +1 -1
- package/lib/routes/fantia/search.ts +1 -1
- package/lib/routes/fantia/user.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/fashionnetwork/namespace.ts +1 -1
- package/lib/routes/fastbull/express-news.ts +1 -1
- package/lib/routes/fastbull/news.ts +1 -1
- package/lib/routes/fediverse/timeline.ts +1 -1
- package/lib/routes/ff14/ff14-global.ts +1 -1
- package/lib/routes/finviz/news.ts +1 -1
- package/lib/routes/followin/index.ts +1 -1
- package/lib/routes/followin/news.ts +1 -1
- package/lib/routes/foresightnews/article.ts +1 -1
- package/lib/routes/foresightnews/column.ts +1 -1
- package/lib/routes/foresightnews/index.ts +1 -1
- package/lib/routes/foresightnews/news.ts +1 -1
- package/lib/routes/freewechat/profile.ts +7 -1
- package/lib/routes/ftm/index.ts +1 -1
- package/lib/routes/furaffinity/browse.ts +1 -1
- package/lib/routes/furaffinity/home.ts +1 -1
- package/lib/routes/furaffinity/journals.ts +1 -1
- package/lib/routes/furaffinity/search.ts +1 -1
- package/lib/routes/furaffinity/shouts.ts +1 -1
- package/lib/routes/furaffinity/status.ts +1 -1
- package/lib/routes/fx678/kx.ts +1 -1
- package/lib/routes/gamer/ani/anime.ts +1 -1
- package/lib/routes/gamer/ani/new-anime.ts +1 -1
- package/lib/routes/gamer/gnn-index.ts +1 -1
- package/lib/routes/gamer/hot.ts +1 -1
- package/lib/routes/gcores/radio.ts +1 -1
- package/lib/routes/geekpark/index.ts +1 -1
- package/lib/routes/gelonghui/home.ts +1 -1
- package/lib/routes/gelonghui/hot-article.ts +1 -1
- package/lib/routes/gelonghui/keyword.ts +1 -1
- package/lib/routes/gelonghui/live.ts +1 -1
- package/lib/routes/gelonghui/subject.ts +1 -1
- package/lib/routes/gelonghui/user.ts +1 -1
- package/lib/routes/geocaching/blogs.ts +2 -2
- package/lib/routes/gettr/user.ts +1 -1
- package/lib/routes/github/activity.ts +2 -1
- package/lib/routes/github/issue.ts +1 -1
- package/lib/routes/github/star.ts +1 -1
- package/lib/routes/github/trending.ts +1 -1
- package/lib/routes/gmu/namespace.ts +7 -0
- package/lib/routes/gmu/news.ts +136 -0
- package/lib/routes/gmu/yjs.ts +173 -0
- package/lib/routes/go/jihs/idwr.ts +137 -0
- package/lib/routes/google/citations.ts +1 -1
- package/lib/routes/google/doodles.ts +1 -1
- package/lib/routes/google/news.ts +1 -1
- package/lib/routes/google/scholar.ts +1 -1
- package/lib/routes/google/search.ts +18 -30
- package/lib/routes/gov/chongqing/sydwgkzp.ts +22 -6
- package/lib/routes/gov/customs/list.ts +8 -3
- package/lib/routes/gov/hangzhou/zwfw.ts +1 -1
- package/lib/routes/gov/pbc/goutongjiaoliu.ts +1 -1
- package/lib/routes/gov/sichuan/deyang/govpublicinfo.ts +9 -10
- package/lib/routes/gq/news.ts +1 -1
- package/lib/routes/grist/featured.ts +1 -1
- package/lib/routes/grist/index.ts +1 -1
- package/lib/routes/grist/series.ts +1 -1
- package/lib/routes/grist/topic.ts +1 -1
- package/lib/routes/guokr/channel.ts +1 -1
- package/lib/routes/guokr/scientific.ts +1 -1
- package/lib/routes/hackernews/index.ts +1 -1
- package/lib/routes/harvard/health/blog.ts +1 -1
- package/lib/routes/hbr/topic.ts +1 -1
- package/lib/routes/hedwig/namespace.ts +7 -0
- package/lib/routes/hedwig/posts.ts +60 -0
- package/lib/routes/hellobtc/information.ts +1 -1
- package/lib/routes/hellobtc/kepu.ts +1 -1
- package/lib/routes/hellobtc/news.ts +1 -1
- package/lib/routes/hellogithub/index.ts +1 -1
- package/lib/routes/hkepc/index.ts +1 -1
- package/lib/routes/hpoi/all.ts +1 -1
- package/lib/routes/hpoi/character.ts +1 -1
- package/lib/routes/hpoi/work.ts +1 -1
- package/lib/routes/huawei/developer/harmonyos/samplecode.ts +69 -0
- package/lib/routes/huawei/namespace.ts +7 -0
- package/lib/routes/hupu/templates/description.art +1 -1
- package/lib/routes/huxiu/brief-column.ts +1 -1
- package/lib/routes/huxiu/channel.ts +1 -1
- package/lib/routes/huxiu/club.ts +1 -1
- package/lib/routes/huxiu/collection.ts +1 -1
- package/lib/routes/huxiu/member.ts +1 -1
- package/lib/routes/huxiu/moment.ts +1 -1
- package/lib/routes/huxiu/search.ts +1 -1
- package/lib/routes/huxiu/tag.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/idolypride/news.ts +1 -1
- package/lib/routes/ielts/index.ts +1 -1
- package/lib/routes/ifanr/category.ts +1 -1
- package/lib/routes/ifanr/digest.ts +1 -1
- package/lib/routes/ifanr/index.ts +1 -1
- package/lib/routes/imdb/chart.ts +1 -1
- package/lib/routes/infoq/presentations.ts +1 -1
- package/lib/routes/infoq/recommend.ts +1 -1
- package/lib/routes/infoq/topic.ts +17 -14
- package/lib/routes/informedainews/docs.ts +1 -1
- package/lib/routes/inoreader/index.ts +1 -1
- package/lib/routes/inoreader/rss.ts +1 -1
- package/lib/routes/instagram/web-api/index.ts +17 -13
- package/lib/routes/instagram/web-api/utils.ts +46 -63
- package/lib/routes/javbus/index.ts +1 -1
- package/lib/routes/jianshu/collection.ts +1 -1
- package/lib/routes/jianshu/home.ts +1 -1
- package/lib/routes/jianshu/user.ts +1 -1
- package/lib/routes/jike/topic.ts +1 -1
- package/lib/routes/jike/user.ts +1 -1
- package/lib/routes/jin10/index.ts +1 -1
- package/lib/routes/jin10/topic.ts +1 -1
- package/lib/routes/jinse/lives.ts +1 -1
- package/lib/routes/jinse/timeline.ts +1 -1
- package/lib/routes/jiuyangongshe/community.ts +1 -1
- package/lib/routes/jjwxc/book.ts +1 -1
- package/lib/routes/keep/user.ts +1 -1
- package/lib/routes/kemono/const.ts +9 -0
- package/lib/routes/kemono/index.ts +282 -141
- package/lib/routes/kemono/types.ts +31 -0
- package/lib/routes/konachan/post.ts +27 -19
- package/lib/routes/kurogames/wutheringwaves/constants.ts +1 -1
- package/lib/routes/kurogames/wutheringwaves/news.ts +4 -1
- package/lib/routes/laohu8/personal.ts +1 -1
- package/lib/routes/lemmy/index.ts +1 -1
- package/lib/routes/lenovo/drive.ts +65 -0
- package/lib/routes/lenovo/namespace.ts +7 -0
- package/lib/routes/lenovo/templates/drive.art +9 -0
- package/lib/routes/line/publisher.ts +1 -1
- package/lib/routes/line/today.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/linkedin/jobs.ts +1 -1
- package/lib/routes/liquipedia/cs-matches.ts +42 -14
- package/lib/routes/liveuamap/index.ts +1 -1
- package/lib/routes/lofter/collection.ts +1 -1
- package/lib/routes/lofter/tag.ts +1 -1
- package/lib/routes/lofter/user.ts +1 -1
- package/lib/routes/macfilos/blog.ts +1 -1
- package/lib/routes/magnumphotos/magazine.ts +1 -1
- 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/mangadex/_access.ts +111 -0
- package/lib/routes/mangadex/_constants.ts +75 -0
- package/lib/routes/mangadex/_feed.ts +184 -0
- package/lib/routes/mangadex/_profile.ts +47 -0
- package/lib/routes/mangadex/_utils.ts +49 -0
- package/lib/routes/mangadex/index.ts +16 -67
- package/lib/routes/mangadex/mdlist/feed.ts +156 -0
- package/lib/routes/mangadex/namespace.ts +2 -0
- package/lib/routes/mangadex/user/feed.ts +126 -0
- package/lib/routes/mangadex/user/follows.ts +149 -0
- package/lib/routes/mastodon/account-id.ts +1 -1
- package/lib/routes/mastodon/acct.ts +1 -1
- package/lib/routes/mastodon/tag.ts +48 -0
- package/lib/routes/mastodon/timeline-local.ts +1 -1
- package/lib/routes/mastodon/timeline-remote.ts +1 -1
- 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/matters/namespace.ts +1 -1
- package/lib/routes/mckinsey/cn/index.ts +1 -1
- package/lib/routes/medsci/index.ts +1 -1
- package/lib/routes/meta/ai-blog.ts +121 -0
- package/lib/routes/meta/namespace.ts +6 -0
- package/lib/routes/metacritic/index.ts +2 -2
- package/lib/routes/mihoyo/ys/news.ts +19 -73
- package/lib/routes/mirror/index.ts +1 -1
- package/lib/routes/missav/new.ts +27 -9
- package/lib/routes/misskey/featured-notes.ts +1 -1
- package/lib/routes/misskey/user-timeline.ts +1 -1
- package/lib/routes/mittrchina/index.ts +1 -1
- 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/mygopen/index.ts +1 -1
- package/lib/routes/nasa/apod.ts +1 -1
- package/lib/routes/nautil/topics.ts +1 -1
- package/lib/routes/newyorker/news.ts +1 -1
- package/lib/routes/nga/forum.ts +1 -1
- package/lib/routes/nhk/news.ts +1 -1
- package/lib/routes/nifd/research.ts +16 -0
- package/lib/routes/njust/cs.ts +58 -0
- package/lib/routes/njust/utils.ts +1 -1
- package/lib/routes/notefolio/search.ts +1 -1
- package/lib/routes/now/news.ts +93 -33
- package/lib/routes/nuaa/utils/pypasswaf.ts +1 -1
- package/lib/routes/nytimes/book.ts +1 -1
- package/lib/routes/nytimes/daily-briefing-chinese.ts +1 -1
- package/lib/routes/nytimes/index.ts +1 -1
- package/lib/routes/nytimes/rss.ts +1 -1
- package/lib/routes/odaily/activity.ts +1 -1
- package/lib/routes/odaily/newsflash.ts +1 -1
- package/lib/routes/odaily/post.ts +1 -1
- package/lib/routes/odaily/search-news.ts +1 -1
- package/lib/routes/odaily/user.ts +1 -1
- package/lib/routes/panewslab/author.ts +1 -1
- package/lib/routes/panewslab/news.ts +1 -1
- package/lib/routes/panewslab/profundity.ts +1 -1
- package/lib/routes/panewslab/topic.ts +1 -1
- package/lib/routes/paulgraham/article.ts +2 -2
- package/lib/routes/pconline/focus.ts +1 -1
- package/lib/routes/phoronix/index.ts +1 -1
- package/lib/routes/picnob/user.ts +64 -146
- package/lib/routes/picnob/utils.ts +14 -12
- package/lib/routes/picuki/namespace.ts +1 -7
- package/lib/routes/picuki/profile.ts +111 -171
- package/lib/routes/picuki/utils.ts +5 -10
- package/lib/routes/pingwest/status.ts +1 -1
- package/lib/routes/pingwest/tag.ts +1 -1
- package/lib/routes/pingwest/user.ts +1 -1
- package/lib/routes/pixabay/search.ts +1 -1
- package/lib/routes/pixiv/ranking.ts +1 -1
- package/lib/routes/pixiv/search.ts +1 -1
- package/lib/routes/pixiv/user.ts +1 -1
- package/lib/routes/pixivision/index.ts +1 -1
- package/lib/routes/plurk/anonymous.ts +1 -1
- package/lib/routes/plurk/hotlinks.ts +1 -1
- package/lib/routes/plurk/news.ts +1 -1
- package/lib/routes/plurk/search.ts +1 -1
- package/lib/routes/plurk/top.ts +1 -1
- package/lib/routes/plurk/topic.ts +1 -1
- package/lib/routes/plurk/user.ts +1 -1
- package/lib/routes/podwise/collections.ts +1 -1
- package/lib/routes/pornhub/category.ts +1 -1
- package/lib/routes/pornhub/model.ts +1 -1
- package/lib/routes/pornhub/pornstar.ts +1 -1
- package/lib/routes/pornhub/search.ts +1 -1
- package/lib/routes/ps/monthly-games.ts +1 -1
- package/lib/routes/psyche/topic.ts +1 -1
- package/lib/routes/python/namespace.ts +9 -0
- package/lib/routes/python/release.ts +120 -0
- package/lib/routes/qbitai/category.ts +1 -1
- package/lib/routes/qbitai/tag.ts +1 -1
- package/lib/routes/qidian/chapter.ts +1 -1
- package/lib/routes/questmobile/report.ts +1 -1
- package/lib/routes/radio/album.ts +40 -49
- package/lib/routes/radio/templates/description.art +2 -2
- package/lib/routes/readhub/daily.ts +1 -1
- package/lib/routes/readhub/index.ts +1 -1
- package/lib/routes/rebase/geekdaily.ts +1 -1
- package/lib/routes/reuters/common.ts +1 -1
- package/lib/routes/reuters/investigates.ts +1 -1
- package/lib/routes/rsshub/routes.ts +1 -1
- 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/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/sehuatang/index.ts +27 -32
- package/lib/routes/seu/cyber/index.ts +78 -0
- package/lib/routes/simpleinfo/index.ts +1 -1
- package/lib/routes/sjtu/seiee/icisee.ts +67 -0
- package/lib/routes/slowmist/slowmist.ts +1 -1
- package/lib/routes/smartlink/index.ts +84 -0
- package/lib/routes/smartlink/namespace.ts +7 -0
- package/lib/routes/smzdm/article.ts +19 -3
- package/lib/routes/smzdm/baoliao.ts +19 -3
- package/lib/routes/smzdm/haowen-fenlei.ts +19 -3
- package/lib/routes/smzdm/haowen.ts +19 -3
- package/lib/routes/smzdm/keyword.ts +15 -2
- package/lib/routes/smzdm/product.ts +19 -3
- package/lib/routes/smzdm/ranking.ts +172 -156
- package/lib/routes/smzdm/utils.ts +7 -0
- package/lib/routes/sohu/mp.ts +1 -1
- package/lib/routes/solidot/main.ts +1 -1
- package/lib/routes/spotify/artist.ts +1 -1
- package/lib/routes/spotify/playlist.ts +1 -1
- package/lib/routes/spotify/show.ts +1 -1
- package/lib/routes/sspai/activity.ts +1 -1
- package/lib/routes/sspai/author.ts +1 -1
- package/lib/routes/sspai/bookmarks.ts +1 -1
- package/lib/routes/sspai/column.ts +1 -1
- package/lib/routes/sspai/index.ts +1 -1
- package/lib/routes/sspai/matrix.ts +1 -1
- package/lib/routes/sspai/series-update.ts +1 -1
- package/lib/routes/sspai/series.ts +1 -1
- package/lib/routes/sspai/shortcuts-gallery.ts +1 -1
- package/lib/routes/sspai/tag.ts +1 -1
- package/lib/routes/sspai/topic.ts +1 -1
- package/lib/routes/sspai/topics.ts +1 -1
- package/lib/routes/startuplatte/index.ts +1 -1
- package/lib/routes/steam/news.ts +281 -0
- package/lib/routes/stheadline/std/realtime.ts +24 -16
- package/lib/routes/stockedge/daily-news.ts +1 -1
- package/lib/routes/storm/channel.ts +80 -0
- package/lib/routes/tailwindcss/blog.ts +26 -0
- package/lib/routes/tailwindcss/constants.ts +2 -0
- package/lib/routes/tailwindcss/namespace.ts +7 -0
- package/lib/routes/tailwindcss/utils.ts +68 -0
- package/lib/routes/techflowpost/express.ts +1 -1
- package/lib/routes/techflowpost/index.ts +1 -1
- package/lib/routes/telegram/blog.ts +1 -1
- package/lib/routes/telegram/channel.ts +1 -1
- package/lib/routes/test/api-index.ts +13 -0
- package/lib/routes/theblockbeats/index.ts +3 -3
- package/lib/routes/theinitium/app.ts +1 -1
- package/lib/routes/theinitium/author.ts +1 -1
- package/lib/routes/theinitium/channel.ts +1 -1
- package/lib/routes/theinitium/tags.ts +1 -1
- package/lib/routes/themoviedb/seasons.ts +1 -1
- package/lib/routes/thepaper/channel.ts +1 -1
- package/lib/routes/thepaper/factpaper.ts +1 -1
- package/lib/routes/thepaper/featured.ts +1 -1
- package/lib/routes/thepaper/list.ts +1 -1
- package/lib/routes/thepaper/sidebar.ts +1 -1
- package/lib/routes/thepaper/user.ts +1 -1
- package/lib/routes/thepaper/utils.ts +8 -3
- package/lib/routes/thepetcity/index.ts +1 -1
- package/lib/routes/theverge/index.ts +1 -1
- package/lib/routes/threads/index.ts +1 -1
- package/lib/routes/thzt/index.ts +72 -0
- package/lib/routes/thzt/namespace.ts +8 -0
- package/lib/routes/timednews/news.ts +1 -1
- package/lib/routes/tingtingfm/program.ts +1 -1
- package/lib/routes/tju/yzb/index.ts +2 -2
- package/lib/routes/tophub/index.ts +1 -1
- package/lib/routes/tophub/list.ts +1 -1
- package/lib/routes/tver/namespace.ts +7 -0
- package/lib/routes/tver/series.ts +98 -0
- package/lib/routes/twitch/live.ts +1 -1
- package/lib/routes/twitch/video.ts +1 -1
- package/lib/routes/twitter/api/web-api/login.ts +1 -3
- package/lib/routes/twitter/api/web-api/utils.ts +24 -2
- package/lib/routes/twitter/keyword.ts +1 -1
- package/lib/routes/twitter/list.ts +1 -1
- package/lib/routes/twitter/media.ts +1 -1
- package/lib/routes/twitter/namespace.ts +1 -0
- package/lib/routes/twitter/user.ts +1 -1
- package/lib/routes/twitter/utils.ts +24 -16
- package/lib/routes/twreporter/category.ts +1 -1
- package/lib/routes/twreporter/newest.ts +1 -1
- package/lib/routes/udn/breaking-news.ts +1 -1
- 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/unusualwhales/news.ts +10 -8
- package/lib/routes/utgd/category.ts +1 -1
- package/lib/routes/utgd/timeline.ts +1 -1
- package/lib/routes/utgd/topic.ts +1 -1
- package/lib/routes/v2ex/tab.ts +1 -1
- package/lib/routes/v2ex/topics.ts +1 -1
- package/lib/routes/vertikal/latest.ts +1 -1
- package/lib/routes/vimeo/category.ts +1 -1
- package/lib/routes/vimeo/usr-videos.ts +1 -1
- package/lib/routes/visualstudio/code-blog.ts +67 -0
- package/lib/routes/visualstudio/namespace.ts +7 -0
- package/lib/routes/vocus/publication.ts +1 -1
- package/lib/routes/vocus/user.ts +1 -1
- package/lib/routes/voronoiapp/common.ts +1 -1
- package/lib/routes/warhammer-community/namespace.ts +7 -0
- package/lib/routes/warhammer-community/news.ts +73 -0
- package/lib/routes/warp/blog.ts +77 -0
- package/lib/routes/warp/namespace.ts +7 -0
- package/lib/routes/weibo/keyword.ts +1 -1
- package/lib/routes/weibo/search/hot.ts +1 -1
- package/lib/routes/weibo/user.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/woshipm/popular.ts +3 -2
- package/lib/routes/xiaohongshu/check-cookie.ts +16 -0
- package/lib/routes/xiaohongshu/user.ts +3 -3
- package/lib/routes/xiaohongshu/util.ts +24 -12
- package/lib/routes/xiaoyuzhou/podcast.ts +18 -5
- package/lib/routes/xjtu/ee-jzxx.ts +110 -0
- package/lib/routes/xsijishe/rank.ts +2 -2
- package/lib/routes/xueqiu/cookies.ts +1 -1
- package/lib/routes/xueqiu/user.ts +115 -52
- package/lib/routes/yahoo/news/index.ts +1 -1
- package/lib/routes/yahoo/news/listid.ts +1 -1
- package/lib/routes/yahoo/news/provider-helper.ts +1 -1
- package/lib/routes/yahoo/news/provider.ts +1 -1
- package/lib/routes/yande/post.ts +1 -1
- package/lib/routes/yilinzazhi/index.ts +1 -1
- package/lib/routes/yilinzazhi/latest.ts +1 -1
- package/lib/routes/youtube/api/google.ts +216 -0
- package/lib/routes/youtube/api/youtubei.ts +98 -0
- package/lib/routes/youtube/channel.ts +10 -35
- package/lib/routes/youtube/community.ts +5 -3
- package/lib/routes/youtube/playlist.ts +11 -30
- package/lib/routes/youtube/user.ts +12 -92
- package/lib/routes/youtube/utils.ts +27 -52
- package/lib/routes/youzhiyouxing/materials.ts +1 -1
- package/lib/routes/yuanliao/index.ts +218 -0
- package/lib/routes/yuanliao/namespace.ts +9 -0
- package/lib/routes/yyets/article.ts +1 -1
- package/lib/routes/yyets/today.ts +1 -1
- package/lib/routes/zaimanhua/comic.ts +88 -0
- package/lib/routes/zaimanhua/template/comic.art +3 -0
- package/lib/routes/zaimanhua/update.ts +42 -10
- package/lib/routes/zcool/top.ts +1 -1
- package/lib/routes/zcool/user.ts +1 -1
- package/lib/routes/zed/blog.ts +75 -0
- package/lib/routes/zed/namespace.ts +7 -0
- package/lib/routes/zhihu/activities.ts +1 -1
- package/lib/routes/zhihu/all-collections.ts +10 -1
- package/lib/routes/zhihu/check-cookie.ts +31 -0
- package/lib/routes/zhihu/collection.ts +9 -1
- package/lib/routes/zhihu/execlib/x-zse-96-v3.ts +5 -5
- package/lib/routes/zhihu/hot.ts +12 -79
- package/lib/routes/zhihu/topic.ts +11 -5
- package/lib/routes/zhihu/zhuanlan.ts +7 -2
- package/lib/routes/zhitongcaijing/index.ts +1 -1
- package/lib/routes/zongheng/detail.ts +77 -0
- package/lib/routes/zongheng/namespace.ts +7 -0
- package/lib/types.ts +48 -3
- package/lib/utils/cache/index.ts +2 -2
- package/lib/utils/helpers.test.ts +8 -1
- package/lib/utils/helpers.ts +19 -0
- 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 +136 -27
- package/lib/utils/puppeteer.ts +152 -28
- 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/go/niid/idwr-dl.ts +0 -104
- package/lib/routes/google/templates/description.art +0 -6
- package/lib/routes/mihoyo/templates/ys.art +0 -4
- package/lib/routes/mixcloud/queries.ts +0 -2274
- package/lib/routes/picnob/templates/desc.art +0 -20
- package/lib/routes-deprecated/blogs/hedwig.js +0 -42
- package/lib/routes-deprecated/chiphell/forum.js +0 -67
|
@@ -9,7 +9,7 @@ import { isYouTubeChannelId } from './utils';
|
|
|
9
9
|
|
|
10
10
|
export const route: Route = {
|
|
11
11
|
path: '/community/:handle',
|
|
12
|
-
categories: ['social-media'
|
|
12
|
+
categories: ['social-media'],
|
|
13
13
|
example: '/youtube/community/@JFlaMusic',
|
|
14
14
|
parameters: { handle: 'YouTube handles or channel id' },
|
|
15
15
|
name: 'Community',
|
|
@@ -35,7 +35,9 @@ async function handler(ctx) {
|
|
|
35
35
|
|
|
36
36
|
const channelMetadata = ytInitialData.metadata.channelMetadataRenderer;
|
|
37
37
|
const username = channelMetadata.title;
|
|
38
|
-
const communityTab = ytInitialData.contents.twoColumnBrowseResultsRenderer.tabs.find(
|
|
38
|
+
const communityTab = ytInitialData.contents.twoColumnBrowseResultsRenderer.tabs.find(
|
|
39
|
+
(tab) => tab.tabRenderer.endpoint.commandMetadata.webCommandMetadata.url.endsWith('/posts') || tab.tabRenderer.endpoint.commandMetadata.webCommandMetadata.url.endsWith('/community')
|
|
40
|
+
);
|
|
39
41
|
const list = communityTab.tabRenderer.content.sectionListRenderer.contents[0].itemSectionRenderer.contents;
|
|
40
42
|
|
|
41
43
|
if (list[0].messageRenderer) {
|
|
@@ -48,7 +50,7 @@ async function handler(ctx) {
|
|
|
48
50
|
const post = item.backstagePostThreadRenderer.post.backstagePostRenderer || item.backstagePostThreadRenderer.post.sharedPostRenderer.originalPost.backstagePostRenderer;
|
|
49
51
|
const media = post.backstageAttachment?.postMultiImageRenderer?.images.map((i) => i.backstageImageRenderer.image.thumbnails.pop()) ?? [post.backstageAttachment?.backstageImageRenderer?.image.thumbnails.pop()];
|
|
50
52
|
return {
|
|
51
|
-
title: post.contentText.runs[0].text,
|
|
53
|
+
title: post.contentText.runs?.[0].text ?? '',
|
|
52
54
|
description: art(path.join(__dirname, 'templates/community.art'), {
|
|
53
55
|
runs: post.contentText.runs,
|
|
54
56
|
media,
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { Route, ViewType } from '@/types';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { parseDate } from '@/utils/parse-date';
|
|
6
|
-
import ConfigNotFoundError from '@/errors/types/config-not-found';
|
|
2
|
+
import { callApi } from './utils';
|
|
3
|
+
import { getDataByPlaylistId as getDataByPlaylistIdYoutubei } from './api/youtubei';
|
|
4
|
+
import { getDataByPlaylistId as getDataByPlaylistIdGoogle } from './api/google';
|
|
7
5
|
|
|
8
6
|
export const route: Route = {
|
|
9
7
|
path: '/playlist/:id/:embed?',
|
|
10
|
-
categories: ['social-media'
|
|
8
|
+
categories: ['social-media'],
|
|
11
9
|
view: ViewType.Videos,
|
|
12
10
|
example: '/youtube/playlist/PLqQ1RwlxOgeLTJ1f3fNMSwhjVgaWKo_9Z',
|
|
13
11
|
parameters: { id: 'YouTube playlist id', embed: 'Default to embed the video, set to any value to disable embedding' },
|
|
@@ -16,6 +14,7 @@ export const route: Route = {
|
|
|
16
14
|
{
|
|
17
15
|
name: 'YOUTUBE_KEY',
|
|
18
16
|
description: ' YouTube API Key, support multiple keys, split them with `,`, [API Key application](https://console.developers.google.com/)',
|
|
17
|
+
optional: true,
|
|
19
18
|
},
|
|
20
19
|
],
|
|
21
20
|
requirePuppeteer: false,
|
|
@@ -30,32 +29,14 @@ export const route: Route = {
|
|
|
30
29
|
};
|
|
31
30
|
|
|
32
31
|
async function handler(ctx) {
|
|
33
|
-
if (!config.youtube || !config.youtube.key) {
|
|
34
|
-
throw new ConfigNotFoundError('YouTube RSS is disabled due to the lack of <a href="https://docs.rsshub.app/deploy/config#route-specific-configurations">relevant config</a>');
|
|
35
|
-
}
|
|
36
32
|
const id = ctx.req.param('id');
|
|
37
33
|
const embed = !ctx.req.param('embed');
|
|
38
34
|
|
|
39
|
-
const
|
|
35
|
+
const data = await callApi({
|
|
36
|
+
googleApi: getDataByPlaylistIdGoogle,
|
|
37
|
+
youtubeiApi: getDataByPlaylistIdYoutubei,
|
|
38
|
+
params: { playlistId: id, embed },
|
|
39
|
+
});
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
return {
|
|
44
|
-
title: `${playlistTitle} by ${data[0].snippet.channelTitle} - YouTube`,
|
|
45
|
-
link: `https://www.youtube.com/playlist?list=${id}`,
|
|
46
|
-
description: `YouTube playlist ${playlistTitle} by ${data[0].snippet.channelTitle}`,
|
|
47
|
-
item: data.map((item) => {
|
|
48
|
-
const snippet = item.snippet;
|
|
49
|
-
const videoId = snippet.resourceId.videoId;
|
|
50
|
-
const img = utils.getThumbnail(snippet.thumbnails);
|
|
51
|
-
return {
|
|
52
|
-
title: snippet.title,
|
|
53
|
-
description: utils.renderDescription(embed, videoId, img, utils.formatDescription(snippet.description)),
|
|
54
|
-
pubDate: parseDate(snippet.publishedAt),
|
|
55
|
-
link: `https://www.youtube.com/watch?v=${videoId}`,
|
|
56
|
-
author: snippet.videoOwnerChannelTitle,
|
|
57
|
-
image: img.url,
|
|
58
|
-
};
|
|
59
|
-
}),
|
|
60
|
-
};
|
|
41
|
+
return data;
|
|
61
42
|
}
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import { Route, ViewType } from '@/types';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { parseDate } from '@/utils/parse-date';
|
|
6
|
-
import ofetch from '@/utils/ofetch';
|
|
7
|
-
import * as cheerio from 'cheerio';
|
|
8
|
-
import ConfigNotFoundError from '@/errors/types/config-not-found';
|
|
9
|
-
import NotFoundError from '@/errors/types/not-found';
|
|
2
|
+
import { getDataByUsername as getDataByUsernameYoutubei } from './api/youtubei';
|
|
3
|
+
import { getDataByUsername as getDataByUsernameGoogle } from './api/google';
|
|
4
|
+
import { callApi } from './utils';
|
|
10
5
|
|
|
11
6
|
export const route: Route = {
|
|
12
7
|
path: '/user/:username/:routeParams?',
|
|
13
|
-
categories: ['social-media'
|
|
8
|
+
categories: ['social-media'],
|
|
14
9
|
view: ViewType.Videos,
|
|
15
10
|
example: '/youtube/user/@JFlaMusic',
|
|
16
11
|
parameters: {
|
|
@@ -28,6 +23,7 @@ export const route: Route = {
|
|
|
28
23
|
{
|
|
29
24
|
name: 'YOUTUBE_KEY',
|
|
30
25
|
description: ' YouTube API Key, support multiple keys, split them with `,`, [API Key application](https://console.developers.google.com/)',
|
|
26
|
+
optional: true,
|
|
31
27
|
},
|
|
32
28
|
],
|
|
33
29
|
requirePuppeteer: false,
|
|
@@ -38,7 +34,7 @@ export const route: Route = {
|
|
|
38
34
|
},
|
|
39
35
|
radar: [
|
|
40
36
|
{
|
|
41
|
-
source: ['www.youtube.com/user/:username', 'www.youtube.com/:username'],
|
|
37
|
+
source: ['www.youtube.com/user/:username', 'www.youtube.com/:username', 'www.youtube.com/:username/videos'],
|
|
42
38
|
target: '/user/:username',
|
|
43
39
|
},
|
|
44
40
|
],
|
|
@@ -48,9 +44,6 @@ export const route: Route = {
|
|
|
48
44
|
};
|
|
49
45
|
|
|
50
46
|
async function handler(ctx) {
|
|
51
|
-
if (!config.youtube || !config.youtube.key) {
|
|
52
|
-
throw new ConfigNotFoundError('YouTube RSS is disabled due to the lack of <a href="https://docs.rsshub.app/deploy/config#route-specific-configurations">relevant config</a>');
|
|
53
|
-
}
|
|
54
47
|
const username = ctx.req.param('username');
|
|
55
48
|
|
|
56
49
|
// Parse route parameters
|
|
@@ -64,84 +57,11 @@ async function handler(ctx) {
|
|
|
64
57
|
const filterShortsStr = params.get('filterShorts');
|
|
65
58
|
const filterShorts = filterShortsStr === null || filterShortsStr === '' || filterShortsStr === 'true';
|
|
66
59
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
const $ = cheerio.load(response);
|
|
73
|
-
const ytInitialData = JSON.parse(
|
|
74
|
-
$('script')
|
|
75
|
-
.text()
|
|
76
|
-
.match(/ytInitialData = ({.*?});/)?.[1] || '{}'
|
|
77
|
-
);
|
|
78
|
-
const metadataRenderer = ytInitialData.metadata.channelMetadataRenderer;
|
|
60
|
+
const data = await callApi({
|
|
61
|
+
googleApi: getDataByUsernameGoogle,
|
|
62
|
+
youtubeiApi: getDataByUsernameYoutubei,
|
|
63
|
+
params: { username, embed, filterShorts },
|
|
64
|
+
});
|
|
79
65
|
|
|
80
|
-
|
|
81
|
-
const channelName = metadataRenderer.title;
|
|
82
|
-
const image = metadataRenderer.avatar?.thumbnails?.[0]?.url;
|
|
83
|
-
const description = metadataRenderer.description;
|
|
84
|
-
const playlistId = (await utils.getChannelWithId(channelId, 'contentDetails', cache)).data.items[0].contentDetails.relatedPlaylists.uploads;
|
|
85
|
-
|
|
86
|
-
return {
|
|
87
|
-
channelName,
|
|
88
|
-
image,
|
|
89
|
-
description,
|
|
90
|
-
playlistId,
|
|
91
|
-
};
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// Get the appropriate playlist ID based on filterShorts setting
|
|
96
|
-
const playlistId = await (async () => {
|
|
97
|
-
if (userHandleData?.playlistId) {
|
|
98
|
-
const origPlaylistId = userHandleData.playlistId;
|
|
99
|
-
|
|
100
|
-
return utils.getPlaylistWithShortsFilter(origPlaylistId, filterShorts);
|
|
101
|
-
} else {
|
|
102
|
-
const channelData = await utils.getChannelWithUsername(username, 'contentDetails', cache);
|
|
103
|
-
const items = channelData.data.items;
|
|
104
|
-
|
|
105
|
-
if (!items) {
|
|
106
|
-
throw new NotFoundError(`The channel https://www.youtube.com/user/${username} does not exist.`);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
const channelId = items[0].id;
|
|
110
|
-
|
|
111
|
-
return filterShorts ? utils.getPlaylistWithShortsFilter(channelId, filterShorts) : items[0].contentDetails.relatedPlaylists.uploads;
|
|
112
|
-
}
|
|
113
|
-
})();
|
|
114
|
-
|
|
115
|
-
const playlistItems = await utils.getPlaylistItems(playlistId, 'snippet', cache);
|
|
116
|
-
if (!playlistItems) {
|
|
117
|
-
throw new NotFoundError("This channel doesn't have any content.");
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
return {
|
|
121
|
-
title: `${userHandleData?.channelName || username} - YouTube`,
|
|
122
|
-
link: username.startsWith('@') ? `https://www.youtube.com/${username}` : `https://www.youtube.com/user/${username}`,
|
|
123
|
-
description: userHandleData?.description || `YouTube user ${username}`,
|
|
124
|
-
image: userHandleData?.image,
|
|
125
|
-
item: playlistItems.data.items
|
|
126
|
-
.filter((d) => d.snippet.title !== 'Private video' && d.snippet.title !== 'Deleted video')
|
|
127
|
-
.map((item) => {
|
|
128
|
-
const snippet = item.snippet;
|
|
129
|
-
const videoId = snippet.resourceId.videoId;
|
|
130
|
-
const img = utils.getThumbnail(snippet.thumbnails);
|
|
131
|
-
return {
|
|
132
|
-
title: snippet.title,
|
|
133
|
-
description: utils.renderDescription(embed, videoId, img, utils.formatDescription(snippet.description)),
|
|
134
|
-
pubDate: parseDate(snippet.publishedAt),
|
|
135
|
-
link: `https://www.youtube.com/watch?v=${videoId}`,
|
|
136
|
-
author: snippet.videoOwnerChannelTitle,
|
|
137
|
-
image: img.url,
|
|
138
|
-
attachments: [
|
|
139
|
-
{
|
|
140
|
-
url: getVideoUrl(videoId),
|
|
141
|
-
mime_type: 'text/html',
|
|
142
|
-
},
|
|
143
|
-
],
|
|
144
|
-
};
|
|
145
|
-
}),
|
|
146
|
-
};
|
|
66
|
+
return data;
|
|
147
67
|
}
|
|
@@ -1,46 +1,8 @@
|
|
|
1
1
|
import { google } from 'googleapis';
|
|
2
|
-
const { OAuth2 } = google.auth;
|
|
3
2
|
import { art } from '@/utils/render';
|
|
4
3
|
import path from 'node:path';
|
|
5
4
|
import { config } from '@/config';
|
|
6
|
-
|
|
7
|
-
let count = 0;
|
|
8
|
-
const youtube = {};
|
|
9
|
-
if (config.youtube && config.youtube.key) {
|
|
10
|
-
const keys = config.youtube.key.split(',');
|
|
11
|
-
|
|
12
|
-
for (const [index, key] of keys.entries()) {
|
|
13
|
-
if (key) {
|
|
14
|
-
youtube[index] = google.youtube({
|
|
15
|
-
version: 'v3',
|
|
16
|
-
auth: key,
|
|
17
|
-
});
|
|
18
|
-
count = index + 1;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
let index = -1;
|
|
24
|
-
const exec = async (func) => {
|
|
25
|
-
let result;
|
|
26
|
-
for (let i = 0; i < count; i++) {
|
|
27
|
-
index++;
|
|
28
|
-
try {
|
|
29
|
-
// eslint-disable-next-line no-await-in-loop
|
|
30
|
-
result = await func(youtube[index % count]);
|
|
31
|
-
break;
|
|
32
|
-
} catch {
|
|
33
|
-
// console.error(error);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return result;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
let youtubeOAuth2Client;
|
|
40
|
-
if (config.youtube && config.youtube.clientId && config.youtube.clientSecret && config.youtube.refreshToken) {
|
|
41
|
-
youtubeOAuth2Client = new OAuth2(config.youtube.clientId, config.youtube.clientSecret, 'https://developers.google.com/oauthplayground');
|
|
42
|
-
youtubeOAuth2Client.setCredentials({ refresh_token: config.youtube.refreshToken });
|
|
43
|
-
}
|
|
5
|
+
import { youtubeOAuth2Client, exec } from './api/google';
|
|
44
6
|
|
|
45
7
|
export const getPlaylistItems = (id, part, cache) =>
|
|
46
8
|
cache.tryGet(
|
|
@@ -88,16 +50,16 @@ export const getChannelWithUsername = (username, part, cache) =>
|
|
|
88
50
|
);
|
|
89
51
|
return res;
|
|
90
52
|
});
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
53
|
+
export const getVideos = (id, part, cache) =>
|
|
54
|
+
cache.tryGet(`youtube:getVideos:${id}`, async () => {
|
|
55
|
+
const res = await exec((youtube) =>
|
|
56
|
+
youtube.videos.list({
|
|
57
|
+
part,
|
|
58
|
+
id,
|
|
59
|
+
})
|
|
60
|
+
);
|
|
61
|
+
return res;
|
|
62
|
+
});
|
|
101
63
|
export const getThumbnail = (thumbnails) => thumbnails.maxres || thumbnails.standard || thumbnails.high || thumbnails.medium || thumbnails.default;
|
|
102
64
|
export const formatDescription = (description) => description.replaceAll(/\r\n|\r|\n/g, '<br>');
|
|
103
65
|
export const renderDescription = (embed, videoId, img, description) =>
|
|
@@ -131,7 +93,9 @@ export async function getSubscriptionsRecusive(part, nextPageToken?) {
|
|
|
131
93
|
// recursively get next page
|
|
132
94
|
if (res.data.nextPageToken) {
|
|
133
95
|
const next = await getSubscriptionsRecusive(part, res.data.nextPageToken);
|
|
134
|
-
|
|
96
|
+
if (next.data.items) {
|
|
97
|
+
res.data.items = [...(res.data.items || []), ...next.data.items];
|
|
98
|
+
}
|
|
135
99
|
}
|
|
136
100
|
return res;
|
|
137
101
|
}
|
|
@@ -167,11 +131,23 @@ export const getPlaylistWithShortsFilter = (id: string, filterShorts = true): st
|
|
|
167
131
|
return id;
|
|
168
132
|
};
|
|
169
133
|
|
|
170
|
-
const
|
|
134
|
+
export const callApi = async <T>({ googleApi, youtubeiApi, params }: { googleApi: (params: any) => Promise<T>; youtubeiApi: (params: any) => Promise<T>; params: any }): Promise<T> => {
|
|
135
|
+
if (config.youtube?.key) {
|
|
136
|
+
try {
|
|
137
|
+
return await googleApi(params);
|
|
138
|
+
} catch {
|
|
139
|
+
return await youtubeiApi(params);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return await youtubeiApi(params);
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
export default {
|
|
171
146
|
getPlaylistItems,
|
|
172
147
|
getPlaylist,
|
|
173
148
|
getChannelWithId,
|
|
174
149
|
getChannelWithUsername,
|
|
150
|
+
getVideos,
|
|
175
151
|
getThumbnail,
|
|
176
152
|
formatDescription,
|
|
177
153
|
renderDescription,
|
|
@@ -182,4 +158,3 @@ const youtubeUtils = {
|
|
|
182
158
|
getVideoUrl,
|
|
183
159
|
getPlaylistWithShortsFilter,
|
|
184
160
|
};
|
|
185
|
-
export default youtubeUtils;
|
|
@@ -0,0 +1,218 @@
|
|
|
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
|
+
export const handler = async (ctx: Context): Promise<Data> => {
|
|
10
|
+
const { tag } = ctx.req.param();
|
|
11
|
+
const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10);
|
|
12
|
+
|
|
13
|
+
const baseUrl: string = 'https://yuanliao.info';
|
|
14
|
+
const apiUrl: string = new URL('api/discussions', baseUrl).href;
|
|
15
|
+
const targetUrl: string = new URL(tag ? `t/${tag}` : '', baseUrl).href;
|
|
16
|
+
|
|
17
|
+
const targetResponse = await ofetch(targetUrl);
|
|
18
|
+
const $: CheerioAPI = load(targetResponse);
|
|
19
|
+
const language = $('html').attr('lang') ?? 'zh';
|
|
20
|
+
|
|
21
|
+
const response = await ofetch(apiUrl, {
|
|
22
|
+
query: {
|
|
23
|
+
include: 'user,firstPost,tags',
|
|
24
|
+
'filter[q]': tag ? `tag:${tag}` : '',
|
|
25
|
+
sort: '',
|
|
26
|
+
'page[offset]': '',
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
const includedMap = new Map<string, any>();
|
|
31
|
+
for (const item of response.included) {
|
|
32
|
+
includedMap.set(`${item.type}-${item.id}`, item);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const items: DataItem[] = response.data.slice(0, limit).map((item): DataItem => {
|
|
36
|
+
const attributes = item.attributes;
|
|
37
|
+
const relationships = item.relationships;
|
|
38
|
+
|
|
39
|
+
const title: string = attributes.title;
|
|
40
|
+
|
|
41
|
+
const firstPostData = relationships?.firstPost?.data;
|
|
42
|
+
|
|
43
|
+
const description: string | undefined = firstPostData?.type && firstPostData?.id ? includedMap.get(`${firstPostData.type}-${firstPostData.id}`)?.attributes?.contentHtml : undefined;
|
|
44
|
+
const pubDate: number | string = attributes.createdAt;
|
|
45
|
+
const linkUrl: string | undefined = item.id ? `d/${item.id}` : undefined;
|
|
46
|
+
const categories: string[] = [...new Set(relationships?.tags?.data?.map((tag) => `${tag.type}-${tag.id}`)?.map((key) => includedMap.get(key)?.attributes?.name))].filter(Boolean);
|
|
47
|
+
|
|
48
|
+
const userData = relationships?.user?.data;
|
|
49
|
+
const userAttributes = userData && userData.type && userData.id ? includedMap.get(`${userData.type}-${userData.id}`)?.attributes : undefined;
|
|
50
|
+
|
|
51
|
+
const authors: DataItem['author'] = userAttributes
|
|
52
|
+
? [
|
|
53
|
+
{
|
|
54
|
+
name: userAttributes.displayName,
|
|
55
|
+
url: userAttributes.username ? new URL(`u/${userAttributes.username}`, baseUrl).href : undefined,
|
|
56
|
+
avatar: userAttributes.avatarUrl,
|
|
57
|
+
},
|
|
58
|
+
]
|
|
59
|
+
: undefined;
|
|
60
|
+
const guid: string = `yuanliao-${item.id}`;
|
|
61
|
+
const updated: number | string = attributes.lastPostedAt ?? pubDate;
|
|
62
|
+
|
|
63
|
+
const processedItem: DataItem = {
|
|
64
|
+
title,
|
|
65
|
+
description,
|
|
66
|
+
pubDate: pubDate ? parseDate(pubDate) : undefined,
|
|
67
|
+
link: linkUrl ? new URL(linkUrl, baseUrl).href : undefined,
|
|
68
|
+
category: categories,
|
|
69
|
+
author: authors,
|
|
70
|
+
guid,
|
|
71
|
+
id: guid,
|
|
72
|
+
content: {
|
|
73
|
+
html: description,
|
|
74
|
+
text: description,
|
|
75
|
+
},
|
|
76
|
+
updated: updated ? parseDate(updated) : undefined,
|
|
77
|
+
language,
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
return processedItem;
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
return {
|
|
84
|
+
title: $('title').text(),
|
|
85
|
+
description: $('meta[name="description"]').attr('content'),
|
|
86
|
+
link: targetUrl,
|
|
87
|
+
item: items,
|
|
88
|
+
allowEmpty: true,
|
|
89
|
+
image: $('img.Header-logo').attr('src'),
|
|
90
|
+
author: $('img.Header-logo').attr('alt'),
|
|
91
|
+
language,
|
|
92
|
+
id: targetUrl,
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export const route: Route = {
|
|
97
|
+
path: '/:tag?',
|
|
98
|
+
name: '主题',
|
|
99
|
+
url: 'yuanliao.info',
|
|
100
|
+
maintainers: ['nczitzk'],
|
|
101
|
+
handler,
|
|
102
|
+
example: '/yuanliao',
|
|
103
|
+
parameters: {
|
|
104
|
+
tag: {
|
|
105
|
+
description: '标签,默认为全部,可在对应标签页 URL 中找到',
|
|
106
|
+
options: [
|
|
107
|
+
{
|
|
108
|
+
label: '问题反馈',
|
|
109
|
+
value: 'bug-report',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
label: 'Windows',
|
|
113
|
+
value: 'windows',
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
label: 'macOS',
|
|
117
|
+
value: 'macos',
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
label: 'Linux',
|
|
121
|
+
value: 'linux',
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
label: '意见建议',
|
|
125
|
+
value: 'suggestions',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
label: '插件发布',
|
|
129
|
+
value: 'plugins',
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
label: '插件需求',
|
|
133
|
+
value: 'plugin-needs',
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
label: '开发者',
|
|
137
|
+
value: 'developers',
|
|
138
|
+
},
|
|
139
|
+
],
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
description: `:::tip
|
|
143
|
+
订阅 [问题反馈](https://yuanliao.info/t/bug-report),其源网址为 \`https://yuanliao.info/t/bug-report\`,请参考该 URL 指定部分构成参数,此时路由为 [\`/yuanliao/bug-report\`](https://rsshub.app/yuanliao/bug-report)。
|
|
144
|
+
:::
|
|
145
|
+
|
|
146
|
+
| 标签 | id |
|
|
147
|
+
| ------------------------------------------------ | -------------------------------------------------------- |
|
|
148
|
+
| [问题反馈](https://yuanliao.info/t/bug-report) | [bug-report](https://rsshub.app/yuanliao/bug-report) |
|
|
149
|
+
| [Windows](https://yuanliao.info/t/windows) | [windows](https://rsshub.app/yuanliao/windows) |
|
|
150
|
+
| [macOS](https://yuanliao.info/t/macos) | [macos](https://rsshub.app/yuanliao/macos) |
|
|
151
|
+
| [Linux](https://yuanliao.info/t/linux) | [linux](https://rsshub.app/yuanliao/linux) |
|
|
152
|
+
| [意见建议](https://yuanliao.info/t/suggestions) | [suggestions](https://rsshub.app/yuanliao/suggestions) |
|
|
153
|
+
| [插件发布](https://yuanliao.info/t/plugins) | [plugins](https://rsshub.app/yuanliao/plugins) |
|
|
154
|
+
| [插件需求](https://yuanliao.info/t/plugin-needs) | [plugin-needs](https://rsshub.app/yuanliao/plugin-needs) |
|
|
155
|
+
| [开发者](https://yuanliao.info/t/developers) | [developers](https://rsshub.app/yuanliao/developers) |
|
|
156
|
+
`,
|
|
157
|
+
categories: ['bbs'],
|
|
158
|
+
features: {
|
|
159
|
+
requireConfig: false,
|
|
160
|
+
requirePuppeteer: false,
|
|
161
|
+
antiCrawler: false,
|
|
162
|
+
supportRadar: true,
|
|
163
|
+
supportBT: false,
|
|
164
|
+
supportPodcast: false,
|
|
165
|
+
supportScihub: false,
|
|
166
|
+
},
|
|
167
|
+
radar: [
|
|
168
|
+
{
|
|
169
|
+
source: ['yuanliao.info', 'yuanliao.info/t/:tag'],
|
|
170
|
+
target: (params) => {
|
|
171
|
+
const tag: string = params.tag;
|
|
172
|
+
|
|
173
|
+
return `/yuanliao${tag ? `/${tag}` : ''}`;
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
title: '问题反馈',
|
|
178
|
+
source: ['yuanliao.info/t/bug-report'],
|
|
179
|
+
target: '/bug-report',
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
title: 'Windows',
|
|
183
|
+
source: ['yuanliao.info/t/windows'],
|
|
184
|
+
target: '/windows',
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
title: 'macOS',
|
|
188
|
+
source: ['yuanliao.info/t/macos'],
|
|
189
|
+
target: '/macos',
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
title: 'Linux',
|
|
193
|
+
source: ['yuanliao.info/t/linux'],
|
|
194
|
+
target: '/linux',
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
title: '意见建议',
|
|
198
|
+
source: ['yuanliao.info/t/suggestions'],
|
|
199
|
+
target: '/suggestions',
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
title: '插件发布',
|
|
203
|
+
source: ['yuanliao.info/t/plugins'],
|
|
204
|
+
target: '/plugins',
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
title: '插件需求',
|
|
208
|
+
source: ['yuanliao.info/t/plugin-needs'],
|
|
209
|
+
target: '/plugin-needs',
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
title: '开发者',
|
|
213
|
+
source: ['yuanliao.info/t/developers'],
|
|
214
|
+
target: '/developers',
|
|
215
|
+
},
|
|
216
|
+
],
|
|
217
|
+
view: ViewType.Articles,
|
|
218
|
+
};
|