rsshub 1.0.0-master.cdb6f6f → 1.0.0-master.cdc36d3
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.js +6 -0
- package/lib/middleware/anti-hotlink.js +1 -0
- package/lib/middleware/parameter.js +2 -1
- package/lib/router.js +8 -8
- package/lib/routes/disqus/posts.js +1 -1
- package/lib/routes/fanfou/favorites.js +1 -1
- package/lib/routes/fanfou/home-timeline.js +1 -1
- package/lib/routes/fanfou/public-timeline.js +1 -1
- package/lib/routes/fanfou/user-timeline.js +1 -1
- package/lib/routes/gocomics/index.js +1 -1
- package/lib/routes/lastfm/loved.js +1 -1
- package/lib/routes/lastfm/recent.js +1 -1
- package/lib/routes/lastfm/top.js +1 -1
- package/lib/routes/miniflux/get-entries.js +1 -1
- package/lib/routes/miniflux/get-feeds.js +1 -1
- package/lib/routes/us/supremecourt/argument-audio.js +9 -6
- package/lib/v2/12306/index.js +1 -1
- package/lib/v2/163/music/playlist.js +1 -1
- package/lib/v2/4gamers/category.js +31 -0
- package/lib/v2/4gamers/maintainer.js +6 -0
- package/lib/v2/4gamers/radar.js +31 -0
- package/lib/v2/4gamers/router.js +6 -0
- package/lib/v2/4gamers/tag.js +23 -0
- package/lib/v2/4gamers/templates/description.art +3 -0
- package/lib/v2/4gamers/templates/image.art +3 -0
- package/lib/v2/4gamers/topic.js +22 -0
- package/lib/v2/4gamers/utils.js +73 -0
- package/lib/v2/56kog/class.js +10 -0
- package/lib/v2/56kog/maintainer.js +4 -0
- package/lib/v2/56kog/radar.js +85 -0
- package/lib/v2/56kog/router.js +4 -0
- package/lib/v2/56kog/templates/description.art +32 -0
- package/lib/v2/56kog/top.js +10 -0
- package/lib/v2/56kog/util.js +111 -0
- package/lib/v2/591/list.js +1 -1
- package/lib/v2/acfun/article.js +3 -3
- package/lib/v2/aisixiang/thinktank.js +1 -1
- package/lib/v2/alistapart/radar.js +2 -2
- package/lib/v2/auto-stats/index.js +65 -0
- package/lib/v2/auto-stats/maintainer.js +3 -0
- package/lib/v2/auto-stats/radar.js +35 -0
- package/lib/v2/auto-stats/router.js +3 -0
- package/lib/v2/brooklynmuseum/radar.js +1 -1
- package/lib/v2/bsky/posts.js +1 -1
- package/lib/v2/bulianglin/bulianglin.js +32 -0
- package/lib/v2/bulianglin/maintainer.js +3 -0
- package/lib/v2/bulianglin/radar.js +13 -0
- package/lib/v2/bulianglin/router.js +3 -0
- package/lib/v2/bytes/radar.js +1 -1
- package/lib/v2/caam/index.js +64 -0
- package/lib/v2/caam/maintainer.js +3 -0
- package/lib/v2/caam/radar.js +2677 -0
- package/lib/v2/caam/router.js +3 -0
- package/lib/v2/caixin/weekly.js +8 -2
- package/lib/v2/cas/genetics/index.js +63 -0
- package/lib/v2/cas/maintainer.js +1 -1
- package/lib/v2/cas/radar.js +3 -3
- package/lib/v2/cas/router.js +1 -1
- package/lib/v2/cfmmc/index.js +72 -0
- package/lib/v2/cfmmc/maintainer.js +3 -0
- package/lib/v2/cfmmc/radar.js +17 -0
- package/lib/v2/cfmmc/router.js +3 -0
- package/lib/v2/chinamoney/channels.js +57 -0
- package/lib/v2/chinamoney/maintainer.js +3 -0
- package/lib/v2/chinamoney/notice.js +61 -0
- package/lib/v2/chinamoney/radar.js +11 -0
- package/lib/v2/chinamoney/router.js +3 -0
- package/lib/v2/chuanliu/maintainer.js +3 -0
- package/lib/v2/chuanliu/nice.js +76 -0
- package/lib/v2/chuanliu/radar.js +13 -0
- package/lib/v2/chuanliu/router.js +3 -0
- package/lib/v2/chuanliu/templates/description.art +23 -0
- package/lib/v2/cna/web/index.js +1 -1
- package/lib/v2/cntheory/maintainer.js +3 -0
- package/lib/v2/cntheory/paper.js +87 -0
- package/lib/v2/cntheory/radar.js +13 -0
- package/lib/v2/cntheory/router.js +3 -0
- package/lib/v2/cntheory/templates/description.art +2 -0
- package/lib/v2/comicskingdom/index.js +1 -1
- package/lib/v2/cs/index.js +83 -0
- package/lib/v2/cs/maintainer.js +5 -0
- package/lib/v2/cs/radar.js +229 -0
- package/lib/v2/cs/router.js +13 -0
- package/lib/v2/cs/video.js +70 -0
- package/lib/v2/curiouscat/radar.js +1 -1
- package/lib/v2/daily/radar.js +3 -3
- package/lib/v2/deadline/radar.js +1 -1
- package/lib/v2/discord/radar.js +1 -1
- package/lib/v2/dnaindia/radar.js +2 -2
- package/lib/v2/douban/other/list.js +46 -32
- package/lib/v2/ehentai/favorites.js +1 -1
- package/lib/v2/fansly/maintainer.js +4 -0
- package/lib/v2/fansly/post.js +29 -0
- package/lib/v2/fansly/radar.js +19 -0
- package/lib/v2/fansly/router.js +4 -0
- package/lib/v2/fansly/tag.js +30 -0
- package/lib/v2/fansly/templates/media.art +8 -0
- package/lib/v2/fansly/templates/poll.art +4 -0
- package/lib/v2/fansly/templates/tip-goal.art +2 -0
- package/lib/v2/fansly/utils.js +176 -0
- package/lib/v2/firefox/release.js +13 -7
- package/lib/v2/firefox/router.js +1 -1
- package/lib/v2/fisher-spb/radar.js +1 -1
- package/lib/v2/foresightnews/util.js +1 -1
- package/lib/v2/free/maintainer.js +3 -0
- package/lib/v2/free/radar.js +13 -0
- package/lib/v2/free/router.js +3 -0
- package/lib/v2/free/rss.js +19 -0
- package/lib/v2/freecomputerbooks/radar.js +2 -2
- package/lib/v2/freewechat/profile.js +4 -2
- package/lib/v2/ft/radar.js +1 -1
- package/lib/v2/gdut/news.js +2 -2
- package/lib/v2/github/follower.js +1 -1
- package/lib/v2/github/star.js +1 -1
- package/lib/v2/github/starred-repos.js +1 -1
- package/lib/v2/gov/beijing/bjedu/gh.js +48 -0
- package/lib/v2/gov/maintainer.js +1 -0
- package/lib/v2/gov/radar.js +12 -1
- package/lib/v2/gov/router.js +1 -0
- package/lib/v2/gov/suzhou/news.js +1 -1
- package/lib/v2/guanhai/index.js +15 -10
- package/lib/v2/guokr/channel.js +1 -1
- package/lib/v2/hitwh/today.js +10 -2
- package/lib/v2/huanqiu/index.js +5 -5
- package/lib/v2/huggingface/daily-papers.js +10 -7
- package/lib/v2/huxiu/util.js +1 -1
- package/lib/v2/indiansinkuwait/radar.js +1 -1
- package/lib/v2/indienova/article.js +24 -0
- package/lib/v2/indienova/column.js +20 -0
- package/lib/v2/indienova/gamedb.js +55 -0
- package/lib/v2/indienova/maintainer.js +6 -0
- package/lib/v2/indienova/radar.js +37 -0
- package/lib/v2/indienova/router.js +6 -0
- package/lib/v2/indienova/usergames.js +42 -0
- package/lib/v2/indienova/utils.js +43 -0
- package/lib/v2/instagram/common-utils.js +1 -1
- package/lib/v2/iresearch/weekly.js +2 -2
- package/lib/v2/javlibrary/utils.js +1 -1
- package/lib/v2/jewishmuseum/radar.js +1 -1
- package/lib/v2/jiemian/lists.js +1 -1
- package/lib/v2/jike/topic.js +3 -0
- package/lib/v2/jinse/catalogue.js +101 -0
- package/lib/v2/jinse/lives.js +87 -0
- package/lib/v2/jinse/maintainer.js +5 -0
- package/lib/v2/jinse/radar.js +187 -0
- package/lib/v2/jinse/router.js +5 -0
- package/lib/v2/jinse/templates/description.art +34 -0
- package/lib/v2/jinse/timeline.js +96 -0
- package/lib/v2/jjwxc/author.js +68 -0
- package/lib/v2/jjwxc/book.js +106 -0
- package/lib/v2/jjwxc/maintainer.js +4 -0
- package/lib/v2/jjwxc/radar.js +29 -0
- package/lib/v2/jjwxc/router.js +4 -0
- package/lib/v2/jjwxc/templates/author.art +28 -0
- package/lib/v2/jjwxc/templates/book.art +44 -0
- package/lib/v2/kcna/news.js +2 -3
- package/lib/v2/keepass/maintainer.js +3 -0
- package/lib/v2/keepass/news.js +46 -0
- package/lib/v2/keepass/radar.js +13 -0
- package/lib/v2/keepass/router.js +3 -0
- package/lib/v2/konghq/blog-posts.js +52 -0
- package/lib/v2/konghq/maintainer.js +3 -0
- package/lib/v2/konghq/radar.js +13 -0
- package/lib/v2/konghq/router.js +3 -0
- package/lib/v2/kuwaitlocal/radar.js +2 -2
- package/lib/v2/laimanhua/index.js +41 -0
- package/lib/v2/laimanhua/maintainer.js +3 -0
- package/lib/v2/laimanhua/radar.js +13 -0
- package/lib/v2/laimanhua/router.js +3 -0
- package/lib/v2/layoffs/radar.js +1 -1
- package/lib/v2/linkedin/radar.js +1 -1
- package/lib/v2/lofter/tag.js +69 -34
- package/lib/v2/lofter/user.js +1 -1
- package/lib/v2/lxixsxa/radar.js +4 -4
- package/lib/v2/manhuagui/subscribe.js +1 -1
- package/lib/v2/mastodon/utils.js +1 -1
- package/lib/v2/metacritic/index.js +1 -1
- package/lib/v2/metmuseum/radar.js +1 -1
- package/lib/v2/mihoyo/bbs/cache.js +40 -0
- package/lib/v2/mihoyo/bbs/follow-list.js +50 -0
- package/lib/v2/mihoyo/bbs/img-ranking.js +2 -27
- package/lib/v2/mihoyo/bbs/official.js +3 -20
- package/lib/v2/mihoyo/bbs/timeline.js +41 -0
- package/lib/v2/mihoyo/bbs/user-post.js +32 -0
- package/lib/v2/mihoyo/bbs/utils.js +34 -0
- package/lib/v2/mihoyo/maintainer.js +3 -0
- package/lib/v2/mihoyo/radar.js +61 -32
- package/lib/v2/mihoyo/router.js +3 -0
- package/lib/v2/modrinth/api.d.ts +101 -0
- package/lib/v2/modrinth/maintainer.js +3 -0
- package/lib/v2/modrinth/radar.js +13 -0
- package/lib/v2/modrinth/router.js +3 -0
- package/lib/v2/modrinth/templates/version.art +8 -0
- package/lib/v2/modrinth/versions.js +75 -0
- package/lib/v2/mrm/index.js +42 -0
- package/lib/v2/mrm/maintainer.js +3 -0
- package/lib/v2/mrm/radar.js +13 -0
- package/lib/v2/mrm/router.js +3 -0
- package/lib/v2/nautil/radar.js +1 -1
- package/lib/v2/nber/radar.js +2 -2
- package/lib/v2/newmuseum/radar.js +1 -1
- package/lib/v2/news/maintainer.js +1 -1
- package/lib/v2/news/radar.js +2 -2
- package/lib/v2/news/router.js +2 -1
- package/lib/v2/news/templates/description.art +21 -0
- package/lib/v2/news/xhsxw.js +81 -0
- package/lib/v2/nju/radar.js +4 -4
- package/lib/v2/njust/cwc.js +1 -1
- package/lib/v2/njust/dgxg.js +1 -1
- package/lib/v2/njust/eo.js +1 -1
- package/lib/v2/njust/eoe.js +1 -1
- package/lib/v2/njust/jwc.js +1 -1
- package/lib/v2/notion/database.js +1 -1
- package/lib/v2/onehu/common.js +28 -0
- package/lib/v2/onehu/maintainer.js +3 -0
- package/lib/v2/onehu/radar.js +11 -0
- package/lib/v2/onehu/router.js +3 -0
- package/lib/v2/openai/radar.js +3 -3
- package/lib/v2/parliament/maintainer.js +3 -0
- package/lib/v2/parliament/radar.js +22 -0
- package/lib/v2/parliament/router.js +3 -0
- package/lib/v2/parliament/section77.js +161 -0
- package/lib/v2/pianyuan/search.js +1 -1
- package/lib/v2/pianyuan/utils.js +2 -2
- package/lib/v2/picnob/radar.js +1 -1
- package/lib/v2/pikabu/radar.js +3 -3
- package/lib/v2/pixabay/radar.js +1 -1
- package/lib/v2/pixiv/bookmarks.js +2 -2
- package/lib/v2/pixiv/illustfollow.js +2 -2
- package/lib/v2/pixiv/ranking.js +2 -2
- package/lib/v2/pixiv/search.js +2 -2
- package/lib/v2/pixiv/user.js +2 -2
- package/lib/v2/playpcesor/maintainer.js +3 -0
- package/lib/v2/playpcesor/radar.js +13 -0
- package/lib/v2/playpcesor/router.js +3 -0
- package/lib/v2/playpcesor/rss.js +32 -0
- package/lib/v2/pwc/maintainer.js +3 -0
- package/lib/v2/pwc/radar.js +13 -0
- package/lib/v2/pwc/router.js +3 -0
- package/lib/v2/pwc/sustainability.js +58 -0
- package/lib/v2/qdu/houqin.js +63 -0
- package/lib/v2/qdu/maintainer.js +1 -0
- package/lib/v2/qdu/radar.js +8 -0
- package/lib/v2/qdu/router.js +1 -0
- package/lib/v2/rarehistoricalphotos/radar.js +1 -1
- package/lib/v2/rattibha/radar.js +1 -1
- package/lib/v2/reactnewsletter/radar.js +1 -1
- package/lib/v2/scmp/index.js +2 -31
- package/lib/v2/scmp/maintainer.js +2 -0
- package/lib/v2/scmp/radar.js +7 -1
- package/lib/v2/scmp/router.js +2 -0
- package/lib/v2/scmp/topic.js +66 -0
- package/lib/v2/scmp/utils.js +32 -0
- package/lib/v2/secrss/author.js +18 -7
- package/lib/v2/secrss/category.js +19 -8
- package/lib/v2/secrss/maintainer.js +2 -2
- package/lib/v2/seekingalpha/radar.js +1 -1
- package/lib/v2/sehuatang/user.js +1 -1
- package/lib/v2/shoac/maintainer.js +3 -0
- package/lib/v2/shoac/radar.js +13 -0
- package/lib/v2/shoac/recent-show.js +72 -0
- package/lib/v2/shoac/router.js +3 -0
- package/lib/v2/shoac/templates/detail.art +25 -0
- package/lib/v2/smashingmagazine/radar.js +2 -2
- package/lib/v2/spotify/top.js +1 -1
- package/lib/v2/spotify/utils.js +2 -2
- package/lib/v2/sspai/author.js +1 -1
- package/lib/v2/stockedge/radar.js +1 -1
- package/lib/v2/stratechery/radar.js +1 -1
- package/lib/v2/tass/maintainer.js +3 -0
- package/lib/v2/tass/news.js +58 -0
- package/lib/v2/tass/radar.js +13 -0
- package/lib/v2/tass/router.js +3 -0
- package/lib/v2/techpowerup/radar.js +2 -2
- package/lib/v2/telegram/channel.js +1 -1
- package/lib/v2/telegram/stickerpack.js +1 -1
- package/lib/v2/tencent/news/author.js +34 -26
- package/lib/v2/tencent/templates/news/image.art +1 -1
- package/lib/v2/test/index.js +11 -0
- package/lib/v2/thehindu/radar.js +1 -1
- package/lib/v2/thepaper/utils.js +1 -1
- package/lib/v2/threads/radar.js +1 -1
- package/lib/v2/tiktok/radar.js +1 -1
- package/lib/v2/tradingview/pine.js +54 -0
- package/lib/v2/tradingview/radar.js +6 -0
- package/lib/v2/tradingview/router.js +1 -0
- package/lib/v2/transcriptforest/index.js +116 -0
- package/lib/v2/transcriptforest/maintainer.js +3 -0
- package/lib/v2/transcriptforest/radar.js +307 -0
- package/lib/v2/transcriptforest/router.js +3 -0
- package/lib/v2/transcriptforest/templates/description.art +23 -0
- package/lib/v2/twitter/likes.js +1 -1
- package/lib/v2/twitter/list.js +1 -1
- package/lib/v2/twitter/trends.js +1 -1
- package/lib/v2/twitter/utils.js +13 -4
- package/lib/v2/twitter/web-api/constants.js +6 -0
- package/lib/v2/twitter/web-api/login.js +183 -0
- package/lib/v2/twitter/web-api/media.js +2 -0
- package/lib/v2/twitter/web-api/search.js +2 -0
- package/lib/v2/twitter/web-api/token.js +44 -0
- package/lib/v2/twitter/web-api/tweet.js +2 -0
- package/lib/v2/twitter/web-api/twitter-api.js +13 -17
- package/lib/v2/twitter/web-api/user.js +2 -0
- package/lib/v2/unusualwhales/radar.js +1 -1
- package/lib/v2/urbandictionary/radar.js +1 -1
- package/lib/v2/ustc/eeis.js +1 -1
- package/lib/v2/ustc/gs.js +1 -1
- package/lib/v2/ustc/sist.js +1 -1
- package/lib/v2/verfghbw/radar.js +1 -1
- package/lib/v2/weibo/friends.js +122 -0
- package/lib/v2/weibo/group.js +1 -1
- package/lib/v2/weibo/maintainer.js +1 -0
- package/lib/v2/weibo/radar.js +7 -1
- package/lib/v2/weibo/router.js +1 -0
- package/lib/v2/weibo/user.js +3 -1
- package/lib/v2/weibo/utils.js +4 -1
- package/lib/v2/wmc-bj/maintainer.js +3 -0
- package/lib/v2/wmc-bj/publish.js +58 -0
- package/lib/v2/wmc-bj/radar.js +17 -0
- package/lib/v2/wmc-bj/router.js +3 -0
- package/lib/v2/wmc-bj/templates/description.art +5 -0
- package/lib/v2/xueqiu/hots.js +2 -1
- package/lib/v2/xueqiu/router.js +1 -1
- package/lib/v2/xueqiu/stock-comments.js +2 -2
- package/lib/v2/xueqiu/stock-info.js +2 -1
- package/lib/v2/xueqiu/user.js +2 -1
- package/lib/v2/yoasobi-music/radar.js +4 -4
- package/lib/v2/youtube/custom.js +1 -1
- package/lib/v2/youtube/playlist.js +1 -1
- package/lib/v2/youtube/subscriptions.js +1 -1
- package/lib/v2/zhihu/maintainer.js +1 -1
- package/lib/v2/zhihu/router.js +1 -1
- package/lib/v2/zhihu/topic.js +93 -50
- package/lib/v2/zhihu/utils.js +0 -1
- package/package.json +26 -24
- package/lib/routes/4gamers/category.js +0 -20
- package/lib/routes/4gamers/tag.js +0 -20
- package/lib/routes/4gamers/topic.js +0 -20
- package/lib/routes/cs/news.js +0 -69
- package/lib/routes/indienova/article.js +0 -53
- package/lib/routes/jinse/catalogue.js +0 -20
- package/lib/routes/jinse/lives.js +0 -20
- package/lib/routes/jinse/timeline.js +0 -21
- package/lib/v2/cas/genetics/xshd.js +0 -29
- package/lib/v2/news/whxw.js +0 -68
package/lib/config.js
CHANGED
|
@@ -234,6 +234,9 @@ const calculateValue = () => {
|
|
|
234
234
|
cookies: medium_cookies,
|
|
235
235
|
articleCookie: envs.MEDIUM_ARTICLE_COOKIE || '',
|
|
236
236
|
},
|
|
237
|
+
mihoyo: {
|
|
238
|
+
cookie: envs.MIHOYO_COOKIE,
|
|
239
|
+
},
|
|
237
240
|
miniflux: {
|
|
238
241
|
instance: envs.MINIFLUX_INSTANCE || 'https://reader.miniflux.app',
|
|
239
242
|
token: envs.MINIFLUX_TOKEN || '',
|
|
@@ -297,6 +300,9 @@ const calculateValue = () => {
|
|
|
297
300
|
twitter: {
|
|
298
301
|
oauthTokens: envs.TWITTER_OAUTH_TOKEN?.split(','),
|
|
299
302
|
oauthTokenSecrets: envs.TWITTER_OAUTH_TOKEN_SECRET?.split(','),
|
|
303
|
+
username: envs.TWITTER_USERNAME,
|
|
304
|
+
password: envs.TWITTER_PASSWORD,
|
|
305
|
+
authenticationSecret: envs.TWITTER_AUTHENTICATION_SECRET,
|
|
300
306
|
},
|
|
301
307
|
weibo: {
|
|
302
308
|
app_key: envs.WEIBO_APP_KEY,
|
|
@@ -70,6 +70,7 @@ const process = (html, image_hotlink_template, multimedia_hotlink_template, wrap
|
|
|
70
70
|
if (image_hotlink_template) {
|
|
71
71
|
replaceUrls($, 'img, picture > source', image_hotlink_template);
|
|
72
72
|
replaceUrls($, 'video[poster]', image_hotlink_template, 'poster');
|
|
73
|
+
replaceUrls($, '*[data-rsshub-image="href"]', image_hotlink_template, 'href');
|
|
73
74
|
}
|
|
74
75
|
if (multimedia_hotlink_template) {
|
|
75
76
|
replaceUrls($, 'video, video > source, audio, audio > source', multimedia_hotlink_template);
|
|
@@ -8,6 +8,7 @@ const md = require('markdown-it')({
|
|
|
8
8
|
html: true,
|
|
9
9
|
});
|
|
10
10
|
const htmlToText = require('html-to-text');
|
|
11
|
+
const sanitizeHtml = require('sanitize-html');
|
|
11
12
|
|
|
12
13
|
let mercury_parser;
|
|
13
14
|
|
|
@@ -353,7 +354,7 @@ module.exports = async (ctx, next) => {
|
|
|
353
354
|
for (const item of ctx.state.data.item) {
|
|
354
355
|
let text;
|
|
355
356
|
if (item.description) {
|
|
356
|
-
text = item.description
|
|
357
|
+
text = sanitizeHtml(item.description, { allowedTags: [], allowedAttributes: {} });
|
|
357
358
|
}
|
|
358
359
|
if (text?.length) {
|
|
359
360
|
item.description = text.length > ctx.query.brief ? `<p>${text.substring(0, ctx.query.brief)}…</p>` : `<p>${text}</p>`;
|
package/lib/router.js
CHANGED
|
@@ -533,7 +533,7 @@ router.get('/xiaoheihe/discount/:platform?', lazyloadRouteHandler('./routes/xiao
|
|
|
533
533
|
router.get('/ebb', lazyloadRouteHandler('./routes/ebb'));
|
|
534
534
|
|
|
535
535
|
// Indienova
|
|
536
|
-
router.get('/indienova/:type', lazyloadRouteHandler('./routes/indienova/article'));
|
|
536
|
+
// router.get('/indienova/:type', lazyloadRouteHandler('./routes/indienova/article'));
|
|
537
537
|
|
|
538
538
|
// JPMorgan Chase Institute
|
|
539
539
|
router.get('/jpmorganchase', lazyloadRouteHandler('./routes/jpmorganchase/research'));
|
|
@@ -900,9 +900,9 @@ router.get('/zhishifenzi/depth', lazyloadRouteHandler('./routes/zhishifenzi/dept
|
|
|
900
900
|
router.get('/zhishifenzi/innovation/:type?', lazyloadRouteHandler('./routes/zhishifenzi/innovation'));
|
|
901
901
|
|
|
902
902
|
// 4Gamers
|
|
903
|
-
router.get('/4gamers/category/:category', lazyloadRouteHandler('./routes/4gamers/category'));
|
|
904
|
-
router.get('/4gamers/tag/:tag', lazyloadRouteHandler('./routes/4gamers/tag'));
|
|
905
|
-
router.get('/4gamers/topic/:topic', lazyloadRouteHandler('./routes/4gamers/topic'));
|
|
903
|
+
// router.get('/4gamers/category/:category', lazyloadRouteHandler('./routes/4gamers/category'));
|
|
904
|
+
// router.get('/4gamers/tag/:tag', lazyloadRouteHandler('./routes/4gamers/tag'));
|
|
905
|
+
// router.get('/4gamers/topic/:topic', lazyloadRouteHandler('./routes/4gamers/topic'));
|
|
906
906
|
|
|
907
907
|
// 大麦网
|
|
908
908
|
// router.get('/damai/activity/:city/:category/:subcategory/:keyword?', lazyloadRouteHandler('./routes/damai/activity'));
|
|
@@ -1170,9 +1170,9 @@ router.get('/ruby-china/jobs', lazyloadRouteHandler('./routes/ruby-china/jobs'))
|
|
|
1170
1170
|
router.get('/adquan/:type?', lazyloadRouteHandler('./routes/adquan/index'));
|
|
1171
1171
|
|
|
1172
1172
|
// 金色财经
|
|
1173
|
-
router.get('/jinse/lives', lazyloadRouteHandler('./routes/jinse/lives'));
|
|
1174
|
-
router.get('/jinse/timeline', lazyloadRouteHandler('./routes/jinse/timeline'));
|
|
1175
|
-
router.get('/jinse/catalogue/:caty', lazyloadRouteHandler('./routes/jinse/catalogue'));
|
|
1173
|
+
// router.get('/jinse/lives', lazyloadRouteHandler('./routes/jinse/lives'));
|
|
1174
|
+
// router.get('/jinse/timeline', lazyloadRouteHandler('./routes/jinse/timeline'));
|
|
1175
|
+
// router.get('/jinse/catalogue/:caty', lazyloadRouteHandler('./routes/jinse/catalogue'));
|
|
1176
1176
|
|
|
1177
1177
|
// deeplearning.ai
|
|
1178
1178
|
// router.get('/deeplearningai/thebatch', lazyloadRouteHandler('./routes/deeplearningai/thebatch'));
|
|
@@ -1244,7 +1244,7 @@ router.get('/gov/caict/qwsj', lazyloadRouteHandler('./routes/gov/caict/qwsj'));
|
|
|
1244
1244
|
router.get('/gov/caict/caictgd', lazyloadRouteHandler('./routes/gov/caict/caictgd'));
|
|
1245
1245
|
|
|
1246
1246
|
// 中证网
|
|
1247
|
-
router.get('/cs/news/:caty', lazyloadRouteHandler('./routes/cs/news'));
|
|
1247
|
+
// router.get('/cs/news/:caty', lazyloadRouteHandler('./routes/cs/news'));
|
|
1248
1248
|
|
|
1249
1249
|
// hentai-cosplays
|
|
1250
1250
|
router.get('/porn-images-xxx/:type?/:name?', lazyloadRouteHandler('./routes/hentai-cosplays/porn-images-xxx'));
|
|
@@ -3,7 +3,7 @@ const config = require('@/config').value;
|
|
|
3
3
|
|
|
4
4
|
module.exports = async (ctx) => {
|
|
5
5
|
if (!config.disqus || !config.disqus.api_key) {
|
|
6
|
-
throw 'Disqus RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>';
|
|
6
|
+
throw new Error('Disqus RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>');
|
|
7
7
|
}
|
|
8
8
|
const forum = ctx.params.forum;
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ const utils = require('./utils');
|
|
|
3
3
|
|
|
4
4
|
module.exports = async (ctx) => {
|
|
5
5
|
if (!config.fanfou || !config.fanfou.consumer_key || !config.fanfou.consumer_secret || !config.fanfou.username || !config.fanfou.password) {
|
|
6
|
-
throw 'Fanfou RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>';
|
|
6
|
+
throw new Error('Fanfou RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>');
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
const uid = ctx.params.uid;
|
|
@@ -3,7 +3,7 @@ const utils = require('./utils');
|
|
|
3
3
|
|
|
4
4
|
module.exports = async (ctx) => {
|
|
5
5
|
if (!config.fanfou || !config.fanfou.consumer_key || !config.fanfou.consumer_secret || !config.fanfou.username || !config.fanfou.password) {
|
|
6
|
-
throw 'Fanfou RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>';
|
|
6
|
+
throw new Error('Fanfou RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>');
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
const fanfou = await utils.getFanfou();
|
|
@@ -3,7 +3,7 @@ const utils = require('./utils');
|
|
|
3
3
|
|
|
4
4
|
module.exports = async (ctx) => {
|
|
5
5
|
if (!config.fanfou || !config.fanfou.consumer_key || !config.fanfou.consumer_secret || !config.fanfou.username || !config.fanfou.password) {
|
|
6
|
-
throw 'Fanfou RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>';
|
|
6
|
+
throw new Error('Fanfou RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>');
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
const keyword = ctx.params.keyword;
|
|
@@ -3,7 +3,7 @@ const utils = require('./utils');
|
|
|
3
3
|
|
|
4
4
|
module.exports = async (ctx) => {
|
|
5
5
|
if (!config.fanfou || !config.fanfou.consumer_key || !config.fanfou.consumer_secret || !config.fanfou.username || !config.fanfou.password) {
|
|
6
|
-
throw 'Fanfou RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>';
|
|
6
|
+
throw new Error('Fanfou RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>');
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
const uid = ctx.params.uid;
|
|
@@ -3,7 +3,7 @@ const config = require('@/config').value;
|
|
|
3
3
|
|
|
4
4
|
module.exports = async (ctx) => {
|
|
5
5
|
if (!config.lastfm || !config.lastfm.api_key) {
|
|
6
|
-
throw 'Last.fm RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>';
|
|
6
|
+
throw new Error('Last.fm RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>');
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
const user = ctx.params.user;
|
|
@@ -3,7 +3,7 @@ const config = require('@/config').value;
|
|
|
3
3
|
|
|
4
4
|
module.exports = async (ctx) => {
|
|
5
5
|
if (!config.lastfm || !config.lastfm.api_key) {
|
|
6
|
-
throw 'Last.fm RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>';
|
|
6
|
+
throw new Error('Last.fm RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>');
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
const user = ctx.params.user;
|
package/lib/routes/lastfm/top.js
CHANGED
|
@@ -3,7 +3,7 @@ const config = require('@/config').value;
|
|
|
3
3
|
|
|
4
4
|
module.exports = async (ctx) => {
|
|
5
5
|
if (!config.lastfm || !config.lastfm.api_key) {
|
|
6
|
-
throw 'Last.fm RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>';
|
|
6
|
+
throw new Error('Last.fm RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>');
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
const country = ctx.params.country;
|
|
@@ -17,7 +17,7 @@ module.exports = async (ctx) => {
|
|
|
17
17
|
const token = config.miniflux.token;
|
|
18
18
|
|
|
19
19
|
if (!token) {
|
|
20
|
-
throw 'This RSS feed is disabled due to its incorrect configuration: the token is missing.';
|
|
20
|
+
throw new Error('This RSS feed is disabled due to its incorrect configuration: the token is missing.');
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
// In this function, var`mark`, `link`, and `limit`, `addFeedName`
|
|
@@ -6,7 +6,7 @@ module.exports = async (ctx) => {
|
|
|
6
6
|
const token = config.miniflux.token;
|
|
7
7
|
|
|
8
8
|
if (!token) {
|
|
9
|
-
throw 'This RSS feed is disabled due to its incorrect configuration: the token is missing.';
|
|
9
|
+
throw new Error('This RSS feed is disabled due to its incorrect configuration: the token is missing.');
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
function set(item) {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
const got = require('@/utils/got');
|
|
2
2
|
const cheerio = require('cheerio');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
4
|
+
const timezone = require('@/utils/timezone');
|
|
3
5
|
|
|
4
6
|
module.exports = async (ctx) => {
|
|
5
7
|
const year = ctx.params.year || new Date().getFullYear();
|
|
@@ -14,15 +16,15 @@ module.exports = async (ctx) => {
|
|
|
14
16
|
|
|
15
17
|
const $ = cheerio.load(response.data);
|
|
16
18
|
|
|
17
|
-
const list = $('.
|
|
18
|
-
.
|
|
19
|
+
const list = $('.card-body table tbody tr td span a')
|
|
20
|
+
.toArray()
|
|
21
|
+
.map((item) => {
|
|
19
22
|
item = $(item);
|
|
20
23
|
return {
|
|
21
24
|
title: item.text(),
|
|
22
|
-
link:
|
|
25
|
+
link: new URL(item.attr('href'), currentUrl).href,
|
|
23
26
|
};
|
|
24
|
-
})
|
|
25
|
-
.get();
|
|
27
|
+
});
|
|
26
28
|
|
|
27
29
|
const items = await Promise.all(
|
|
28
30
|
list.map((item) =>
|
|
@@ -37,7 +39,7 @@ module.exports = async (ctx) => {
|
|
|
37
39
|
|
|
38
40
|
item.description = content('#pagemaindiv').html();
|
|
39
41
|
item.title += ` : ${content('#ctl00_ctl00_MainEditable_mainContent_lblCaseName').text()}`;
|
|
40
|
-
item.pubDate =
|
|
42
|
+
item.pubDate = timezone(parseDate(content('#ctl00_ctl00_MainEditable_mainContent_lblDate').text()), -5);
|
|
41
43
|
|
|
42
44
|
item.itunes_item_image = imageUrl;
|
|
43
45
|
item.enclosure_url = content('audio source').attr('src');
|
|
@@ -54,5 +56,6 @@ module.exports = async (ctx) => {
|
|
|
54
56
|
item: items,
|
|
55
57
|
itunes_author: 'Supreme Court of the United States',
|
|
56
58
|
image: imageUrl,
|
|
59
|
+
allowEmpty: true,
|
|
57
60
|
};
|
|
58
61
|
};
|
package/lib/v2/12306/index.js
CHANGED
|
@@ -62,7 +62,7 @@ module.exports = async (ctx) => {
|
|
|
62
62
|
},
|
|
63
63
|
});
|
|
64
64
|
if (response.data.data === undefined || response.data.data.length === 0) {
|
|
65
|
-
throw '没有找到相关车次,请检查参数是否正确';
|
|
65
|
+
throw new Error('没有找到相关车次,请检查参数是否正确');
|
|
66
66
|
}
|
|
67
67
|
const data = response.data.data.result;
|
|
68
68
|
const map = response.data.data.map;
|
|
@@ -5,7 +5,7 @@ const path = require('path');
|
|
|
5
5
|
|
|
6
6
|
module.exports = async (ctx) => {
|
|
7
7
|
if (!config.ncm || !config.ncm.cookies) {
|
|
8
|
-
throw '163 Music RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>';
|
|
8
|
+
throw new Error('163 Music RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>');
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
const id = ctx.params.id;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const { parseList, parseItem, getCategories } = require('./utils');
|
|
3
|
+
|
|
4
|
+
module.exports = async (ctx) => {
|
|
5
|
+
const { category } = ctx.params;
|
|
6
|
+
const limit = ctx.query.limit ? Number.parseInt(ctx.query.limit) : 25;
|
|
7
|
+
const isLatest = !category;
|
|
8
|
+
|
|
9
|
+
const { data: response } = await got(`https://www.4gamers.com.tw/site/api/news/${isLatest ? 'latest' : `by-category/${category}`}`, {
|
|
10
|
+
searchParams: {
|
|
11
|
+
nextStart: 0,
|
|
12
|
+
pageSize: limit,
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
const list = parseList(response.data.results);
|
|
16
|
+
|
|
17
|
+
const items = await Promise.all(list.map((item) => ctx.cache.tryGet(item.link, () => parseItem(item))));
|
|
18
|
+
|
|
19
|
+
let categories = [];
|
|
20
|
+
let categoryName = '最新消息';
|
|
21
|
+
if (!isLatest) {
|
|
22
|
+
categories = await getCategories(ctx.cache.tryGet);
|
|
23
|
+
categoryName = categories.find((c) => c.id === Number.parseInt(category)).name;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
ctx.state.data = {
|
|
27
|
+
title: `4Gamers - ${categoryName}`,
|
|
28
|
+
link: `https://www.4gamers.com.tw/news${isLatest ? '' : `/category/${category}/${categoryName}`}`,
|
|
29
|
+
item: items,
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'4gamers.com.tw': {
|
|
3
|
+
_name: '4Gamers',
|
|
4
|
+
www: [
|
|
5
|
+
{
|
|
6
|
+
title: '最新消息',
|
|
7
|
+
docs: 'https://docs.rsshub.app/routes/game#4gamers',
|
|
8
|
+
source: ['/news', '/'],
|
|
9
|
+
target: '/4gamers',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
title: '分类',
|
|
13
|
+
docs: 'https://docs.rsshub.app/routes/game#4gamers',
|
|
14
|
+
source: ['/news/category/:category/:categoryName'],
|
|
15
|
+
target: '/4gamers/category/:category',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
title: '标签',
|
|
19
|
+
docs: 'https://docs.rsshub.app/routes/game#4gamers',
|
|
20
|
+
source: ['/news/tag/:tag'],
|
|
21
|
+
target: '/4gamers/tag/:tag',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
title: '主題',
|
|
25
|
+
docs: 'https://docs.rsshub.app/routes/game#4gamers',
|
|
26
|
+
source: ['/news/option-cfg/:topic'],
|
|
27
|
+
target: '/4gamers/topic/:topic',
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const { parseList, parseItem } = require('./utils');
|
|
3
|
+
|
|
4
|
+
module.exports = async (ctx) => {
|
|
5
|
+
const { tag } = ctx.params;
|
|
6
|
+
const limit = ctx.query.limit ? Number.parseInt(ctx.query.limit) : 25;
|
|
7
|
+
|
|
8
|
+
const { data: response } = await got(`https://www.4gamers.com.tw/site/api/news/by-tag`, {
|
|
9
|
+
searchParams: {
|
|
10
|
+
tag,
|
|
11
|
+
pageSize: limit,
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
const list = parseList(response.data.results);
|
|
15
|
+
|
|
16
|
+
const items = await Promise.all(list.map((item) => ctx.cache.tryGet(item.link, () => parseItem(item))));
|
|
17
|
+
|
|
18
|
+
ctx.state.data = {
|
|
19
|
+
title: `4Gamers - #${tag}`,
|
|
20
|
+
link: `https://www.4gamers.com.tw/news/tag/${tag}`,
|
|
21
|
+
item: items,
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const { parseList, parseItem } = require('./utils');
|
|
3
|
+
|
|
4
|
+
module.exports = async (ctx) => {
|
|
5
|
+
const { topic } = ctx.params;
|
|
6
|
+
const limit = ctx.query.limit ? Number.parseInt(ctx.query.limit) : 25;
|
|
7
|
+
|
|
8
|
+
const { data: response } = await got(`https://www.4gamers.com.tw/site/api/news/option-cfg/${topic}`, {
|
|
9
|
+
searchParams: {
|
|
10
|
+
pageSize: limit,
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
const list = parseList(response.data.results);
|
|
14
|
+
|
|
15
|
+
const items = await Promise.all(list.map((item) => ctx.cache.tryGet(item.link, () => parseItem(item))));
|
|
16
|
+
|
|
17
|
+
ctx.state.data = {
|
|
18
|
+
title: `4Gamers - ${topic}`,
|
|
19
|
+
link: `https://www.4gamers.com.tw/news/option-cfg/${topic}`,
|
|
20
|
+
item: items,
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const { art } = require('@/utils/render');
|
|
4
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
5
|
+
|
|
6
|
+
const getCategories = (tryGet) =>
|
|
7
|
+
tryGet('4gamers:categories', async () => {
|
|
8
|
+
const { data: response } = await got('https://www.4gamers.com.tw/site/api/news/category');
|
|
9
|
+
|
|
10
|
+
return response.data.map((category) => ({
|
|
11
|
+
id: category.id,
|
|
12
|
+
name: category.name,
|
|
13
|
+
}));
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const parseList = (results) =>
|
|
17
|
+
results.map((item) => ({
|
|
18
|
+
title: item.title,
|
|
19
|
+
author: item.author.nickname,
|
|
20
|
+
intro: item.intro,
|
|
21
|
+
pubDate: parseDate(item.createPublishedAt, 'x'),
|
|
22
|
+
link: item.canonicalUrl,
|
|
23
|
+
category: [...new Set([item.category.name, ...item.tags])],
|
|
24
|
+
articleId: item.id,
|
|
25
|
+
}));
|
|
26
|
+
|
|
27
|
+
const parseItem = async (item) => {
|
|
28
|
+
const { data: response } = await got('https://www.4gamers.com.tw/site/api/news/find-section', {
|
|
29
|
+
searchParams: {
|
|
30
|
+
sub: item.articleId,
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
item.description = renderDescription(
|
|
35
|
+
item.intro,
|
|
36
|
+
response.data.contentSection.sections
|
|
37
|
+
.map((section) => {
|
|
38
|
+
switch (section['@type']) {
|
|
39
|
+
case 'ContentAdsSection':
|
|
40
|
+
case 'ScrollerAdsSection':
|
|
41
|
+
case 'textScrollerAdsSection':
|
|
42
|
+
return '';
|
|
43
|
+
case 'RawHtmlSection':
|
|
44
|
+
return section.html;
|
|
45
|
+
case 'ImageGroupSection':
|
|
46
|
+
return renderImages(section.items);
|
|
47
|
+
default:
|
|
48
|
+
throw new Error(`Unhandled section type: ${section['@type']} on ${item.link}`);
|
|
49
|
+
}
|
|
50
|
+
})
|
|
51
|
+
.join('')
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
return item;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const renderDescription = (intro, content) =>
|
|
58
|
+
art(path.join(__dirname, 'templates/description.art'), {
|
|
59
|
+
intro,
|
|
60
|
+
content,
|
|
61
|
+
});
|
|
62
|
+
const renderImages = (images) =>
|
|
63
|
+
art(path.join(__dirname, 'templates/image.art'), {
|
|
64
|
+
images,
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
module.exports = {
|
|
68
|
+
getCategories,
|
|
69
|
+
parseList,
|
|
70
|
+
parseItem,
|
|
71
|
+
renderDescription,
|
|
72
|
+
renderImages,
|
|
73
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const { rootUrl, fetchItems } = require('./util');
|
|
2
|
+
|
|
3
|
+
module.exports = async (ctx) => {
|
|
4
|
+
const { category = '1_1' } = ctx.params;
|
|
5
|
+
const limit = ctx.query.limit ? Number.parseInt(ctx.query.limit, 10) : 30;
|
|
6
|
+
|
|
7
|
+
const currentUrl = new URL(`class/${category}.html`, rootUrl).href;
|
|
8
|
+
|
|
9
|
+
ctx.state.data = await fetchItems(limit, currentUrl, ctx.cache.tryGet);
|
|
10
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'56kog.com': {
|
|
3
|
+
_name: '明月中文网',
|
|
4
|
+
'.': [
|
|
5
|
+
{
|
|
6
|
+
title: '玄幻魔法',
|
|
7
|
+
docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-fen-lei',
|
|
8
|
+
source: ['/class/1_1.html'],
|
|
9
|
+
target: '/56kog/class/1_1',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
title: '武侠修真',
|
|
13
|
+
docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-fen-lei',
|
|
14
|
+
source: ['/class/2_1.html'],
|
|
15
|
+
target: '/56kog/class/2_1',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
title: '历史军事',
|
|
19
|
+
docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-fen-lei',
|
|
20
|
+
source: ['/class/4_1.html'],
|
|
21
|
+
target: '/56kog/class/4_1',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
title: '侦探推理',
|
|
25
|
+
docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-fen-lei',
|
|
26
|
+
source: ['/class/5_1.html'],
|
|
27
|
+
target: '/56kog/class/5_1',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
title: '网游动漫',
|
|
31
|
+
docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-fen-lei',
|
|
32
|
+
source: ['/class/6_1.html'],
|
|
33
|
+
target: '/56kog/class/6_1',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
title: '恐怖灵异',
|
|
37
|
+
docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-fen-lei',
|
|
38
|
+
source: ['/class/8_1.html'],
|
|
39
|
+
target: '/56kog/class/8_1',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
title: '都市言情',
|
|
43
|
+
docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-fen-lei',
|
|
44
|
+
source: ['/class/3_1.html'],
|
|
45
|
+
target: '/56kog/class/3_1',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
title: '科幻',
|
|
49
|
+
docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-fen-lei',
|
|
50
|
+
source: ['/class/7_1.html'],
|
|
51
|
+
target: '/56kog/class/7_1',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
title: '女生小说',
|
|
55
|
+
docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-fen-lei',
|
|
56
|
+
source: ['/class/9_1.html'],
|
|
57
|
+
target: '/56kog/class/9_1',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
title: '其他',
|
|
61
|
+
docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-fen-lei',
|
|
62
|
+
source: ['/class/10_1.html'],
|
|
63
|
+
target: '/56kog/class/10_1',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
title: '周点击榜',
|
|
67
|
+
docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-bang-dan',
|
|
68
|
+
source: ['/top/weekvisit_1.html'],
|
|
69
|
+
target: '/56kog/top/weekvisit',
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
title: '总收藏榜',
|
|
73
|
+
docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-bang-dan',
|
|
74
|
+
source: ['/top/goodnum_1.html'],
|
|
75
|
+
target: '/56kog/top/goodnum',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
title: '最新入库',
|
|
79
|
+
docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-bang-dan',
|
|
80
|
+
source: ['/top/postdate_1.html'],
|
|
81
|
+
target: '/56kog/top/postdate',
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
},
|
|
85
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{{ if images }}
|
|
2
|
+
{{ each images image }}
|
|
3
|
+
{{ if image?.src }}
|
|
4
|
+
<figure>
|
|
5
|
+
<img
|
|
6
|
+
{{ if image.alt }}
|
|
7
|
+
alt="{{ image.alt }}"
|
|
8
|
+
{{ /if }}
|
|
9
|
+
src="{{ image.src }}">
|
|
10
|
+
</figure>
|
|
11
|
+
{{ /if }}
|
|
12
|
+
{{ /each }}
|
|
13
|
+
{{ /if }}
|
|
14
|
+
|
|
15
|
+
{{ if details }}
|
|
16
|
+
<table>
|
|
17
|
+
<tbody>
|
|
18
|
+
{{ each details detail }}
|
|
19
|
+
<tr>
|
|
20
|
+
<th>{{ detail.label }}</th>
|
|
21
|
+
<td>
|
|
22
|
+
{{ if detail.value?.href && detail.value?.text }}
|
|
23
|
+
<a href="{{ detail.value.href }}">{{ detail.value.text }}</a>
|
|
24
|
+
{{ else }}
|
|
25
|
+
{{ detail.value }}
|
|
26
|
+
{{ /if }}
|
|
27
|
+
</td>
|
|
28
|
+
</tr>
|
|
29
|
+
{{ /each }}
|
|
30
|
+
</tbody>
|
|
31
|
+
</table>
|
|
32
|
+
{{ /if }}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const { rootUrl, fetchItems } = require('./util');
|
|
2
|
+
|
|
3
|
+
module.exports = async (ctx) => {
|
|
4
|
+
const { category = 'weekvisit' } = ctx.params;
|
|
5
|
+
const limit = ctx.query.limit ? Number.parseInt(ctx.query.limit, 10) : 30;
|
|
6
|
+
|
|
7
|
+
const currentUrl = new URL(`top/${category.split(/_/)[0]}_1.html`, rootUrl).href;
|
|
8
|
+
|
|
9
|
+
ctx.state.data = await fetchItems(limit, currentUrl, ctx.cache.tryGet);
|
|
10
|
+
};
|