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/v2/caixin/weekly.js
CHANGED
|
@@ -27,7 +27,10 @@ module.exports = async (ctx) => {
|
|
|
27
27
|
const { data } = await got(item.link);
|
|
28
28
|
const $ = cheerio.load(data);
|
|
29
29
|
|
|
30
|
-
item.title = $('head title')
|
|
30
|
+
item.title = $('head title')
|
|
31
|
+
.text()
|
|
32
|
+
.replace(/_财新周刊频道_财新网$/, '')
|
|
33
|
+
.trim();
|
|
31
34
|
item.pubDate = parseDate(
|
|
32
35
|
$('.source')
|
|
33
36
|
.text()
|
|
@@ -47,7 +50,10 @@ module.exports = async (ctx) => {
|
|
|
47
50
|
);
|
|
48
51
|
|
|
49
52
|
ctx.state.data = {
|
|
50
|
-
title: $('head title')
|
|
53
|
+
title: $('head title')
|
|
54
|
+
.text()
|
|
55
|
+
.replace(/_财新周刊频道_财新网$/, '')
|
|
56
|
+
.trim(),
|
|
51
57
|
link,
|
|
52
58
|
item: items,
|
|
53
59
|
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
4
|
+
|
|
5
|
+
const baseUrl = 'https://genetics.cas.cn';
|
|
6
|
+
|
|
7
|
+
module.exports = async (ctx) => {
|
|
8
|
+
const { path } = ctx.params;
|
|
9
|
+
|
|
10
|
+
const currentUrl = `${baseUrl}/${path}/`;
|
|
11
|
+
|
|
12
|
+
const { data: response } = await got(currentUrl);
|
|
13
|
+
const $ = cheerio.load(response);
|
|
14
|
+
|
|
15
|
+
let items;
|
|
16
|
+
|
|
17
|
+
if (path.substring(0, 3) === 'edu') {
|
|
18
|
+
items = $('li.box-s.h16')
|
|
19
|
+
.toArray()
|
|
20
|
+
.map((item) => {
|
|
21
|
+
item = $(item);
|
|
22
|
+
const a = item.find('a').first();
|
|
23
|
+
const date = item.find('.box-date').first();
|
|
24
|
+
return {
|
|
25
|
+
title: a.text(),
|
|
26
|
+
link: new URL(a.attr('href'), currentUrl).href,
|
|
27
|
+
pubDate: parseDate(date.text(), 'YYYY-MM-DD'),
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
} else if (path.substring(0, 4) === 'dqyd') {
|
|
31
|
+
items = $('div.list-tab ul li')
|
|
32
|
+
.toArray()
|
|
33
|
+
.map((item) => {
|
|
34
|
+
item = $(item);
|
|
35
|
+
const a = item.find('a').first();
|
|
36
|
+
const date = item.find('.right').first();
|
|
37
|
+
return {
|
|
38
|
+
title: a.text(),
|
|
39
|
+
link: new URL(a.attr('href'), currentUrl).href,
|
|
40
|
+
pubDate: parseDate(date.text(), 'YYYY-MM-DD'),
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
} else {
|
|
44
|
+
items = $('li.row.no-gutters.py-1')
|
|
45
|
+
.toArray()
|
|
46
|
+
.map((item) => {
|
|
47
|
+
item = $(item);
|
|
48
|
+
const a = item.find('a').first();
|
|
49
|
+
const date = item.find('.col-news-date').first();
|
|
50
|
+
return {
|
|
51
|
+
title: a.text(),
|
|
52
|
+
link: new URL(a.attr('href'), currentUrl).href,
|
|
53
|
+
pubDate: parseDate(date.text(), 'YYYY.MM.DD'),
|
|
54
|
+
};
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
ctx.state.data = {
|
|
59
|
+
title: $('head title').text(),
|
|
60
|
+
link: currentUrl,
|
|
61
|
+
item: items,
|
|
62
|
+
};
|
|
63
|
+
};
|
package/lib/v2/cas/maintainer.js
CHANGED
package/lib/v2/cas/radar.js
CHANGED
|
@@ -11,10 +11,10 @@ module.exports = {
|
|
|
11
11
|
],
|
|
12
12
|
'www.genetics': [
|
|
13
13
|
{
|
|
14
|
-
title: '
|
|
14
|
+
title: '遗传与发育生物学研究所',
|
|
15
15
|
docs: 'https://docs.rsshub.app/routes/university#zhong-guo-ke-xue-yuan',
|
|
16
|
-
source: ['
|
|
17
|
-
target: '/cas/genetics
|
|
16
|
+
source: ['/*path'],
|
|
17
|
+
target: '/cas/genetics/*path',
|
|
18
18
|
},
|
|
19
19
|
],
|
|
20
20
|
'www.ia': [
|
package/lib/v2/cas/router.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
module.exports = (router) => {
|
|
2
2
|
router.get('/cg/:caty?', require('./cg/index'));
|
|
3
|
-
router.get('/genetics
|
|
3
|
+
router.get('/genetics/:path+', require('./genetics/index'));
|
|
4
4
|
router.get('/ia/yjs', require('./ia/yjs'));
|
|
5
5
|
router.get('/iee/kydt', require('./iee/kydt'));
|
|
6
6
|
router.get('/is/:path+', require('./is/index'));
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const timezone = require('@/utils/timezone');
|
|
4
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
5
|
+
|
|
6
|
+
module.exports = async (ctx) => {
|
|
7
|
+
const { id = 'main/noticeannouncement/cfmmcnotice' } = ctx.params;
|
|
8
|
+
const limit = ctx.query.limit ? Number.parseInt(ctx.query.limit, 10) : 10;
|
|
9
|
+
|
|
10
|
+
const rootUrl = 'http://www.cfmmc.com';
|
|
11
|
+
const apiUrl = new URL('servlet/json', rootUrl).href;
|
|
12
|
+
const currentUrl = new URL(id.endsWith('/') ? id : `${id}/`, rootUrl).href;
|
|
13
|
+
|
|
14
|
+
const { data: currentResponse } = await got(currentUrl);
|
|
15
|
+
|
|
16
|
+
const $ = cheerio.load(currentResponse);
|
|
17
|
+
|
|
18
|
+
const catalogId = $('#catalogId').prop('value');
|
|
19
|
+
|
|
20
|
+
const { data: response } = await got.post(apiUrl, {
|
|
21
|
+
form: {
|
|
22
|
+
funcNo: 741000,
|
|
23
|
+
catalog_id: catalogId,
|
|
24
|
+
branchNo: '',
|
|
25
|
+
curtPageNo: 1,
|
|
26
|
+
numPerPage: limit,
|
|
27
|
+
key_word: '',
|
|
28
|
+
start_date: '',
|
|
29
|
+
end_date: '',
|
|
30
|
+
},
|
|
31
|
+
headers: {
|
|
32
|
+
referer: currentUrl,
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
let items =
|
|
37
|
+
response.results?.[0].data.slice(0, limit).map((item) => ({
|
|
38
|
+
title: item.title,
|
|
39
|
+
link: new URL(item.url, rootUrl).href,
|
|
40
|
+
pubDate: timezone(parseDate(item.publish_date), +8),
|
|
41
|
+
})) ?? [];
|
|
42
|
+
|
|
43
|
+
items = await Promise.all(
|
|
44
|
+
items.map((item) =>
|
|
45
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
46
|
+
const { data: detailResponse } = await got(item.link);
|
|
47
|
+
|
|
48
|
+
const content = cheerio.load(detailResponse);
|
|
49
|
+
|
|
50
|
+
item.title = content('div.article_title h2').text();
|
|
51
|
+
item.description = content('div.cont_txt').html();
|
|
52
|
+
|
|
53
|
+
return item;
|
|
54
|
+
})
|
|
55
|
+
)
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
const author = '中国期货市场监控中心';
|
|
59
|
+
const image = new URL($('a.logo img').prop('src'), rootUrl).href;
|
|
60
|
+
|
|
61
|
+
ctx.state.data = {
|
|
62
|
+
item: items,
|
|
63
|
+
title: `${author} - ${$('h3.SubPage_t3').text()}`,
|
|
64
|
+
link: currentUrl,
|
|
65
|
+
description: $('meta[name="Description"]').prop('content'),
|
|
66
|
+
language: 'zh',
|
|
67
|
+
image,
|
|
68
|
+
subtitle: $('meta[name="Keywords"]').prop('content'),
|
|
69
|
+
author,
|
|
70
|
+
allowEmpty: true,
|
|
71
|
+
};
|
|
72
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'cfmmc.com': {
|
|
3
|
+
_name: '中国期货市场监控中心',
|
|
4
|
+
'.': [
|
|
5
|
+
{
|
|
6
|
+
title: '栏目',
|
|
7
|
+
docs: 'https://docs.rsshub.app/routes/finance#zhong-guo-qi-huo-shi-chang-jian-kong-zhong-xin-lan-mu',
|
|
8
|
+
source: ['/:id*'],
|
|
9
|
+
target: (params) => {
|
|
10
|
+
const id = params.id.replace(/\/index\.shtml/, '');
|
|
11
|
+
|
|
12
|
+
return `/cfmmc${id ? `/${id}` : ''}`;
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
],
|
|
16
|
+
},
|
|
17
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
const channels = {
|
|
2
|
+
2834: {
|
|
3
|
+
title: '最新 - 外汇市场公告 - 市场公告',
|
|
4
|
+
urlPath: '/chinese/scgg-whscgg/',
|
|
5
|
+
},
|
|
6
|
+
2835: {
|
|
7
|
+
title: '市场公告通知 - 外汇市场公告 - 市场公告',
|
|
8
|
+
urlPath: '/chinese/scgg-whscgg/',
|
|
9
|
+
},
|
|
10
|
+
2836: {
|
|
11
|
+
title: '中心会员公告 - 外汇市场公告 - 市场公告',
|
|
12
|
+
urlPath: '/chinese/scgg-whscgg/',
|
|
13
|
+
},
|
|
14
|
+
2837: {
|
|
15
|
+
title: '会员信息公告 - 外汇市场公告 - 市场公告',
|
|
16
|
+
urlPath: '/chinese/scgg-whscgg/',
|
|
17
|
+
},
|
|
18
|
+
//
|
|
19
|
+
'2839,2840,2841': {
|
|
20
|
+
title: '最新 - 本币市场公告 - 市场公告',
|
|
21
|
+
urlPath: '/chinese/scggbbscgg/',
|
|
22
|
+
},
|
|
23
|
+
2839: {
|
|
24
|
+
title: '市场公告通知 - 本币市场公告 - 市场公告',
|
|
25
|
+
urlPath: '/chinese/scggbbscgg/',
|
|
26
|
+
},
|
|
27
|
+
2840: {
|
|
28
|
+
title: '中心成员公告 - 本币市场公告 - 市场公告',
|
|
29
|
+
urlPath: '/chinese/scggbbscgg/',
|
|
30
|
+
},
|
|
31
|
+
2841: {
|
|
32
|
+
title: '成员信息公告 - 本币市场公告 - 市场公告',
|
|
33
|
+
urlPath: '/chinese/scggbbscgg/',
|
|
34
|
+
},
|
|
35
|
+
//
|
|
36
|
+
'2845,2846': {
|
|
37
|
+
title: '最新 - 央行业务公告 - 市场公告',
|
|
38
|
+
urlPath: '/chinese/scggyhywgg/',
|
|
39
|
+
},
|
|
40
|
+
2845: {
|
|
41
|
+
title: '公开市场操作 - 央行业务公告 - 市场公告',
|
|
42
|
+
urlPath: '/chinese/scggyhywgg/',
|
|
43
|
+
},
|
|
44
|
+
2846: {
|
|
45
|
+
title: '中央国库现金管理 - 央行业务公告 - 市场公告',
|
|
46
|
+
urlPath: '/chinese/scggyhywgg/',
|
|
47
|
+
},
|
|
48
|
+
//
|
|
49
|
+
3686: {
|
|
50
|
+
title: 'LPR市场公告 - 贷款市场报价利率 - 本币市场',
|
|
51
|
+
urlPath: '/chinese/bklpr/',
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
module.exports = {
|
|
56
|
+
channels,
|
|
57
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
4
|
+
const timezone = require('@/utils/timezone');
|
|
5
|
+
const { channels } = require('./channels');
|
|
6
|
+
|
|
7
|
+
module.exports = async (ctx) => {
|
|
8
|
+
const { channelId = 2834 } = ctx.params;
|
|
9
|
+
const baseUrl = 'https://www.chinamoney.com.cn';
|
|
10
|
+
|
|
11
|
+
const { data: contents } = await got.post(`${baseUrl}/ags/ms/cm-s-notice-query/contents`, {
|
|
12
|
+
form: {
|
|
13
|
+
pageNo: 1,
|
|
14
|
+
pageSize: 15,
|
|
15
|
+
channelId,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
const list = contents.records.map((item) => ({
|
|
20
|
+
title: item.title,
|
|
21
|
+
link: `${baseUrl}${item.draftPath}`,
|
|
22
|
+
pubDate: timezone(parseDate(item.releaseDate, 'YYYY-MM-DD'), +8),
|
|
23
|
+
contentId: item.contentId,
|
|
24
|
+
}));
|
|
25
|
+
|
|
26
|
+
const items = await Promise.all(
|
|
27
|
+
list.map((item) =>
|
|
28
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
29
|
+
const { data: response } = await got(item.link);
|
|
30
|
+
const $ = cheerio.load(response);
|
|
31
|
+
|
|
32
|
+
const article = $('.article-a-body');
|
|
33
|
+
article.find('*').removeAttr('style');
|
|
34
|
+
article.find('font').each((_, ele) => {
|
|
35
|
+
$(ele).replaceWith($(ele).html());
|
|
36
|
+
});
|
|
37
|
+
article.find('span').each((_, ele) => {
|
|
38
|
+
$(ele).replaceWith($(ele).html());
|
|
39
|
+
});
|
|
40
|
+
article.find('.article-a-attach-body a').each((i, ele) => {
|
|
41
|
+
ele = $(ele);
|
|
42
|
+
if (ele.attr('onclick')?.startsWith("location.href=encodeURI($('#fileDownUrl').val()+'fileDownLoad.do")) {
|
|
43
|
+
ele.attr('href', `${baseUrl}/dqs/cm-s-notice-query/fileDownLoad.do?mode=open&contentId=${item.contentId}&priority=${i}`);
|
|
44
|
+
ele.removeAttr('onclick');
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
item.description = article.html();
|
|
49
|
+
item.pubDate = timezone(parseDate($('.AC-l span').text().trim(), 'YYYY-MM-DD HH:mm'), +8);
|
|
50
|
+
|
|
51
|
+
return item;
|
|
52
|
+
})
|
|
53
|
+
)
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
ctx.state.data = {
|
|
57
|
+
title: `${channels[channelId] ? channels[channelId].title + ' - ' : ''}中国货币网`,
|
|
58
|
+
link: `${baseUrl}${channels[channelId]?.urlPath ?? ''}`,
|
|
59
|
+
item: items,
|
|
60
|
+
};
|
|
61
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
4
|
+
const { art } = require('@/utils/render');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
const md = require('markdown-it')({
|
|
7
|
+
html: true,
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
module.exports = async (ctx) => {
|
|
11
|
+
const limit = ctx.query.limit ? Number.parseInt(ctx.query.limit, 10) : 100;
|
|
12
|
+
|
|
13
|
+
const rootUrl = 'https://chuanliu.org';
|
|
14
|
+
const apiRootUrl = 'https://s.chuanliu.org';
|
|
15
|
+
const currentUrl = new URL('nice/', rootUrl).href;
|
|
16
|
+
const apiUrl = new URL('api/dis/api/v1/memo', apiRootUrl).href;
|
|
17
|
+
|
|
18
|
+
const { data: response } = await got(apiUrl, {
|
|
19
|
+
searchParams: {
|
|
20
|
+
creatorId: 1,
|
|
21
|
+
offset: 0,
|
|
22
|
+
limit,
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const items = response.slice(0, limit).map((item) => {
|
|
27
|
+
const contents = item.content.split(/\n/);
|
|
28
|
+
|
|
29
|
+
const category = contents?.[0].replace(/^#/, '') ?? undefined;
|
|
30
|
+
const title = contents?.[1] ?? undefined;
|
|
31
|
+
const link = contents?.[2] ?? undefined;
|
|
32
|
+
const author = contents?.[3] ?? undefined;
|
|
33
|
+
const isStar = (contents?.[5] && contents[5] === 'star') ?? false;
|
|
34
|
+
|
|
35
|
+
if (isStar) {
|
|
36
|
+
contents.splice(5, 1);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return {
|
|
40
|
+
title: `${isStar ? '[STAR] ' : ''}${title}`,
|
|
41
|
+
link,
|
|
42
|
+
description: art(path.join(__dirname, 'templates/description.art'), {
|
|
43
|
+
description: md.render(contents?.join('\n\n') ?? ''),
|
|
44
|
+
images: item.resourceList.map((i) => ({
|
|
45
|
+
src: i.externalLink,
|
|
46
|
+
alt: i.filename,
|
|
47
|
+
type: i.type,
|
|
48
|
+
})),
|
|
49
|
+
}),
|
|
50
|
+
author,
|
|
51
|
+
category: [category, isStar ? 'STAR' : undefined].filter(Boolean),
|
|
52
|
+
guid: `chuanliu-nice#${item.id}`,
|
|
53
|
+
pubDate: parseDate(item.createdTs, 'X'),
|
|
54
|
+
updated: parseDate(item.updatedTs, 'X'),
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
const { data: currentResponse } = await got(currentUrl);
|
|
59
|
+
|
|
60
|
+
const $ = cheerio.load(currentResponse);
|
|
61
|
+
|
|
62
|
+
const icon = new URL($('link[rel="shortcut icon"]').prop('href'), currentUrl).href;
|
|
63
|
+
|
|
64
|
+
ctx.state.data = {
|
|
65
|
+
item: items,
|
|
66
|
+
title: $('title').text(),
|
|
67
|
+
link: currentUrl,
|
|
68
|
+
description: $('span.rainbow-text').first().text(),
|
|
69
|
+
language: $('html').prop('lang'),
|
|
70
|
+
icon,
|
|
71
|
+
logo: icon,
|
|
72
|
+
subtitle: $('title').text(),
|
|
73
|
+
author: $('meta[name="author"]').prop('content'),
|
|
74
|
+
allowEmpty: true,
|
|
75
|
+
};
|
|
76
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
{{ if image.width }}
|
|
10
|
+
alt="{{ image.width }}"
|
|
11
|
+
{{ /if }}
|
|
12
|
+
{{ if image.height }}
|
|
13
|
+
alt="{{ image.height }}"
|
|
14
|
+
{{ /if }}
|
|
15
|
+
src="{{ image.src }}">
|
|
16
|
+
</figure>
|
|
17
|
+
{{ /if }}
|
|
18
|
+
{{ /each }}
|
|
19
|
+
{{ /if }}
|
|
20
|
+
|
|
21
|
+
{{ if description }}
|
|
22
|
+
{{@ description }}
|
|
23
|
+
{{ /if }}
|
package/lib/v2/cna/web/index.js
CHANGED
|
@@ -20,7 +20,7 @@ module.exports = async (ctx) => {
|
|
|
20
20
|
item = $(item);
|
|
21
21
|
return {
|
|
22
22
|
title: item.text(),
|
|
23
|
-
link: item.parents('a').attr('href'),
|
|
23
|
+
link: new URL(item.parents('a').attr('href'), 'https://www.cna.com.tw').href,
|
|
24
24
|
pubDate: timezone(parseDate(item.next().text()), +8),
|
|
25
25
|
};
|
|
26
26
|
});
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
4
|
+
const { art } = require('@/utils/render');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
|
|
7
|
+
module.exports = async (ctx) => {
|
|
8
|
+
const id = ctx.params.id;
|
|
9
|
+
|
|
10
|
+
const rootUrl = 'https://paper.cntheory.com';
|
|
11
|
+
|
|
12
|
+
let response = await got({
|
|
13
|
+
method: 'get',
|
|
14
|
+
url: rootUrl,
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
response = await got({
|
|
18
|
+
method: 'get',
|
|
19
|
+
url: `${rootUrl}/${response.data.match(/URL=(.*)"/)[1]}`,
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const $ = cheerio.load(response.data);
|
|
23
|
+
|
|
24
|
+
const matches = response.data.match(/images\/(\d{4}-\d{2}\/\d{2})\/\w+\/\w+_brief/);
|
|
25
|
+
const link = `${rootUrl}/html/${matches[1]}`;
|
|
26
|
+
|
|
27
|
+
let items = [];
|
|
28
|
+
|
|
29
|
+
await Promise.all(
|
|
30
|
+
$('#pageLink')
|
|
31
|
+
.toArray()
|
|
32
|
+
.filter((p) => (id ? $(p).text().split(':').pop() === id : true))
|
|
33
|
+
.map((p) => `${link}/${$(p).attr('href').replace(/\.\//, '')}`)
|
|
34
|
+
.map(async (p) => {
|
|
35
|
+
const pageResponse = await got({
|
|
36
|
+
method: 'get',
|
|
37
|
+
url: p,
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
const page = cheerio.load(pageResponse.data);
|
|
41
|
+
|
|
42
|
+
items.push(
|
|
43
|
+
...page('table')
|
|
44
|
+
.last()
|
|
45
|
+
.find('a')
|
|
46
|
+
.toArray()
|
|
47
|
+
.map((a) => `${link}/${$(a).attr('href')}`)
|
|
48
|
+
);
|
|
49
|
+
})
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
items = await Promise.all(
|
|
53
|
+
items.map((item) =>
|
|
54
|
+
ctx.cache.tryGet(item, async () => {
|
|
55
|
+
const detailResponse = await got({
|
|
56
|
+
method: 'get',
|
|
57
|
+
url: item,
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
const content = cheerio.load(detailResponse.data);
|
|
61
|
+
|
|
62
|
+
return {
|
|
63
|
+
link: item,
|
|
64
|
+
title: content('h1').text(),
|
|
65
|
+
pubDate: parseDate(matches[1], 'YYYY-MM/DD'),
|
|
66
|
+
enclosure_url: `${rootUrl}${
|
|
67
|
+
content('.ban_t a')
|
|
68
|
+
.first()
|
|
69
|
+
.attr('href')
|
|
70
|
+
.match(/(\/images.*)/)[1]
|
|
71
|
+
}`,
|
|
72
|
+
description: art(path.join(__dirname, 'templates/description.art'), {
|
|
73
|
+
resource: content('#reslist').html().replaceAll('display:none;', ''),
|
|
74
|
+
description: content('founder-content').html(),
|
|
75
|
+
}),
|
|
76
|
+
};
|
|
77
|
+
})
|
|
78
|
+
)
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
ctx.state.data = {
|
|
82
|
+
title: `学习时报${id ? ` - ${id}` : ''}`,
|
|
83
|
+
link: rootUrl,
|
|
84
|
+
item: items,
|
|
85
|
+
allowEmpty: true,
|
|
86
|
+
};
|
|
87
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'cntheory.com': {
|
|
3
|
+
_name: '理论网',
|
|
4
|
+
paper: [
|
|
5
|
+
{
|
|
6
|
+
title: '学习时报',
|
|
7
|
+
docs: 'https://docs.rsshub.app/routes/traditional-media#li-lun-wang-xue-xi-shi-bao',
|
|
8
|
+
source: ['/'],
|
|
9
|
+
target: (params, url) => `/cntheory/paper/${new URL(url).toString().match(/-(\w+)\.htm/)[1]}`,
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
|
+
},
|
|
13
|
+
};
|
|
@@ -22,7 +22,7 @@ module.exports = async (ctx) => {
|
|
|
22
22
|
.map((el) => $(el).find('a').first().attr('href'));
|
|
23
23
|
|
|
24
24
|
if (links.length === 0) {
|
|
25
|
-
throw `Comic Not Found - ${name}
|
|
25
|
+
throw new Error(`Comic Not Found - ${name}`);
|
|
26
26
|
}
|
|
27
27
|
const items = await Promise.all(
|
|
28
28
|
links.map((link) =>
|