rsshub 1.0.0-master.c48ca6b → 1.0.0-master.c49b558
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/README.md +5 -4
- package/lib/config.js +4 -0
- package/lib/middleware/cache/index.js +3 -3
- package/lib/middleware/cache/memory.js +5 -11
- package/lib/middleware/onerror.js +8 -0
- package/lib/middleware/template.js +8 -2
- package/lib/router.js +37 -35
- package/lib/routes/amd/graphicsdrivers.js +1 -1
- 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/gov/customs/list.js +2 -2
- package/lib/routes/hkej/index.js +2 -2
- package/lib/routes/instagram/utils.js +1 -1
- package/lib/routes/ipsw/index.js +2 -2
- 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/nhentai/util.js +1 -1
- package/lib/routes/pixiv/bookmarks.js +1 -1
- package/lib/routes/pixiv/illustfollow.js +1 -1
- package/lib/routes/pixiv/ranking.js +1 -1
- package/lib/routes/pixiv/search.js +1 -1
- package/lib/routes/pixiv/user.js +1 -1
- package/lib/routes/telecompaper/news.js +1 -1
- package/lib/routes/tencent/wechat/_README +1 -0
- package/lib/routes/tencent/wechat/feeds.js +8 -32
- package/lib/routes/tencent/wechat/mp.js +8 -26
- package/lib/routes/tencent/wechat/msgalbum.js +7 -25
- package/lib/routes/tencent/wechat/tgchannel.js +6 -26
- package/lib/routes/twitter/keyword.js +9 -4
- package/lib/routes/twitter/likes.js +1 -1
- package/lib/routes/twitter/list.js +1 -1
- package/lib/routes/twitter/trends.js +1 -1
- package/lib/routes/twitter/user.js +9 -4
- package/lib/routes/twitter/web-api/media.js +5 -2
- package/lib/routes/twitter/web-api/twitter-api.js +105 -20
- package/lib/routes/twitter/web-api/twitter-got.js +4 -0
- package/lib/routes/twitter/web-api/user.js +5 -4
- package/lib/routes/weibo/keyword.js +18 -10
- package/lib/routes/weibo/super_index.js +24 -15
- package/lib/routes/weibo/timeline.js +38 -19
- package/lib/routes/weibo/user.js +47 -21
- package/lib/routes/weibo/utils.js +81 -12
- package/lib/routes/youtube/channel.js +1 -1
- package/lib/routes/youtube/playlist.js +1 -1
- package/lib/routes/youtube/user.js +1 -1
- package/lib/routes/zcool/top.js +3 -3
- package/lib/utils/common-utils.js +14 -0
- package/lib/utils/parse-date.js +171 -17
- package/lib/utils/torrent.js +9 -1
- package/lib/utils/wechat-mp.js +164 -0
- package/lib/v2/95mm/utils.js +1 -1
- package/lib/v2/agirls/index.js +2 -2
- package/lib/v2/agirls/topic.js +2 -2
- package/lib/v2/agirls/topic_list.js +1 -1
- package/lib/v2/asus/bios.js +38 -0
- package/lib/v2/asus/maintainer.js +3 -0
- package/lib/v2/asus/radar.js +13 -0
- package/lib/v2/asus/router.js +3 -0
- package/lib/v2/asus/templates/bios.art +6 -0
- package/lib/v2/bilibili/liveArea.js +2 -12
- package/lib/v2/brooklynmuseum/exhibitions.js +27 -0
- package/lib/v2/brooklynmuseum/maintainer.js +3 -0
- package/lib/v2/brooklynmuseum/radar.js +11 -0
- package/lib/v2/brooklynmuseum/router.js +3 -0
- package/lib/v2/cbirc/index.js +1 -1
- package/lib/v2/dbmv/index.js +64 -0
- package/lib/v2/dbmv/maintainer.js +3 -0
- package/lib/v2/dbmv/radar.js +13 -0
- package/lib/v2/dbmv/router.js +3 -0
- package/lib/v2/douban/people/status.js +10 -2
- package/lib/v2/douban/people/wish.js +55 -43
- package/lib/v2/firefox/index.js +3 -3
- package/lib/v2/fortunechina/index.js +3 -3
- package/lib/{routes → v2}/gamer/gnn_index.js +6 -7
- package/lib/v2/gamer/hot.js +1 -1
- package/lib/v2/gamer/maintainer.js +1 -0
- package/lib/v2/gamer/radar.js +16 -0
- package/lib/v2/gamer/router.js +1 -0
- package/lib/v2/gaze/maintainer.js +3 -0
- package/lib/v2/gaze/radar.js +13 -0
- package/lib/v2/gaze/router.js +3 -0
- package/lib/v2/gaze/templates/update.art +4 -0
- package/lib/v2/gaze/update.js +27 -0
- package/lib/v2/github/issue.js +6 -2
- package/lib/v2/github/pulls.js +1 -1
- package/lib/v2/gov/anhui/kjt.js +56 -0
- package/lib/v2/gov/maintainer.js +4 -1
- package/lib/v2/gov/mfa/wjdt.js +67 -0
- package/lib/v2/gov/radar.js +95 -70
- package/lib/v2/gov/router.js +4 -1
- package/lib/v2/gov/sichuan/deyang/govpulicinfo.js +54 -74
- package/lib/v2/gov/sichuan/deyang/templates/govPublicInfo.art +1 -0
- package/lib/v2/guggenheim/exhibitions.js +29 -0
- package/lib/v2/guggenheim/maintainer.js +3 -0
- package/lib/v2/guggenheim/radar.js +11 -0
- package/lib/v2/guggenheim/router.js +3 -0
- package/lib/v2/gzh360/_README +1 -0
- package/lib/v2/gzh360/category.js +8 -0
- package/lib/v2/gzh360/gzh.js +18 -0
- package/lib/v2/gzh360/maintainer.js +4 -0
- package/lib/v2/gzh360/radar.js +19 -0
- package/lib/v2/gzh360/router.js +4 -0
- package/lib/v2/gzh360/universal.js +53 -0
- package/lib/v2/gzh360/utils.js +62 -0
- package/lib/v2/hameln/chapter.js +59 -0
- package/lib/v2/hameln/maintainer.js +3 -0
- package/lib/v2/hameln/radar.js +13 -0
- package/lib/v2/hameln/router.js +1 -0
- package/lib/v2/hkej/index.js +2 -2
- package/lib/v2/hket/index.js +2 -2
- package/lib/v2/hnrb/index.js +85 -0
- package/lib/v2/hnrb/maintainer.js +3 -0
- package/lib/v2/hnrb/radar.js +13 -0
- package/lib/v2/hnrb/router.js +3 -0
- package/lib/v2/hupu/all.js +73 -0
- package/lib/v2/hupu/bbs.js +64 -0
- package/lib/v2/hupu/index.js +72 -0
- package/lib/v2/hupu/maintainer.js +7 -0
- package/lib/v2/hupu/radar.js +35 -0
- package/lib/v2/hupu/router.js +7 -0
- package/lib/v2/hupu/templates/description.art +6 -0
- package/lib/v2/hyqss/index.js +89 -0
- package/lib/v2/hyqss/maintainer.js +4 -0
- package/lib/v2/hyqss/radar.js +22 -0
- package/lib/v2/hyqss/router.js +3 -0
- package/lib/{routes → v2}/ifeng/feng.js +7 -5
- package/lib/v2/ifeng/maintainer.js +3 -0
- package/lib/v2/ifeng/radar.js +11 -0
- package/lib/v2/ifeng/router.js +3 -0
- package/lib/{routes → v2}/ifeng/utils.js +0 -0
- package/lib/v2/jewishmuseum/exhibitions.js +16 -0
- package/lib/v2/jewishmuseum/maintainer.js +3 -0
- package/lib/v2/jewishmuseum/radar.js +11 -0
- package/lib/v2/jewishmuseum/router.js +3 -0
- package/lib/v2/kakuyomu/episode.js +54 -0
- package/lib/v2/kakuyomu/maintainer.js +3 -0
- package/lib/v2/kakuyomu/radar.js +13 -0
- package/lib/v2/kakuyomu/router.js +1 -0
- package/lib/v2/kyodonews/index.js +123 -0
- package/lib/v2/kyodonews/maintainer.js +3 -0
- package/lib/v2/kyodonews/radar.js +33 -0
- package/lib/v2/kyodonews/router.js +3 -0
- package/lib/v2/kyodonews/templates/article.art +4 -0
- package/lib/v2/mcachicago/exhibitions.js +17 -0
- package/lib/v2/mcachicago/maintainer.js +3 -0
- package/lib/v2/mcachicago/radar.js +11 -0
- package/lib/v2/mcachicago/router.js +3 -0
- package/lib/v2/metmuseum/exhibitions.js +31 -0
- package/lib/v2/metmuseum/maintainer.js +3 -0
- package/lib/v2/metmuseum/radar.js +11 -0
- package/lib/v2/metmuseum/router.js +3 -0
- package/lib/v2/mihoyo/bbs.js +62 -0
- package/lib/v2/mihoyo/maintainer.js +3 -0
- package/lib/v2/mihoyo/radar.js +31 -0
- package/lib/v2/mihoyo/router.js +3 -0
- package/lib/v2/mihoyo/templates/description.art +6 -0
- package/lib/{routes → v2}/mpaypass/main.js +23 -27
- package/lib/v2/mpaypass/maintainer.js +4 -0
- package/lib/v2/mpaypass/news.js +39 -0
- package/lib/v2/mpaypass/radar.js +19 -0
- package/lib/v2/mpaypass/router.js +4 -0
- package/lib/v2/mtime/maintainer.js +3 -0
- package/lib/v2/mtime/news.js +48 -0
- package/lib/v2/mtime/radar.js +13 -0
- package/lib/v2/mtime/router.js +3 -0
- package/lib/v2/natgeo/dailyphoto.js +32 -0
- package/lib/v2/natgeo/dailyselection.js +41 -0
- package/lib/v2/natgeo/maintainer.js +5 -0
- package/lib/{routes → v2}/natgeo/natgeo.js +18 -32
- package/lib/v2/natgeo/radar.js +24 -0
- package/lib/v2/natgeo/router.js +5 -0
- package/lib/v2/natgeo/templates/dailyPhoto.art +5 -0
- package/lib/v2/newmuseum/exhibitions.js +27 -0
- package/lib/v2/newmuseum/maintainer.js +3 -0
- package/lib/v2/newmuseum/radar.js +11 -0
- package/lib/v2/newmuseum/router.js +3 -0
- package/lib/v2/npm/maintainer.js +3 -0
- package/lib/v2/npm/package.js +45 -0
- package/lib/v2/npm/radar.js +13 -0
- package/lib/v2/npm/router.js +3 -0
- package/lib/v2/npm/templates/package.art +10 -0
- package/lib/v2/nuaa/cs/index.js +87 -0
- package/lib/v2/nuaa/jwc/jwc.js +82 -0
- package/lib/v2/nuaa/maintainer.js +5 -0
- package/lib/v2/nuaa/radar.js +23 -0
- package/lib/v2/nuaa/router.js +5 -0
- package/lib/{routes/universities → v2}/nuaa/utils/pypasswaf.js +1 -1
- package/lib/{routes/universities → v2}/nuaa/yjsy/yjsy.js +16 -22
- package/lib/v2/nytimes/author.js +43 -0
- package/lib/{routes → v2}/nytimes/book.js +1 -1
- package/lib/{routes → v2}/nytimes/daily_briefing_chinese.js +0 -0
- package/lib/{routes → v2}/nytimes/index.js +3 -4
- package/lib/v2/nytimes/maintainer.js +6 -0
- package/lib/v2/nytimes/radar.js +31 -0
- package/lib/v2/nytimes/router.js +6 -0
- package/lib/{routes → v2}/nytimes/utils.js +0 -0
- package/lib/v2/picuki/profile.js +12 -3
- package/lib/v2/pubmed/maintainer.js +3 -0
- package/lib/v2/pubmed/radar.js +13 -0
- package/lib/v2/pubmed/router.js +3 -0
- package/lib/v2/pubmed/templates/description.art +7 -0
- package/lib/v2/pubmed/trending.js +58 -0
- package/lib/v2/quicker/maintainer.js +7 -0
- package/lib/v2/quicker/qa.js +65 -0
- package/lib/v2/quicker/radar.js +31 -0
- package/lib/v2/quicker/router.js +7 -0
- package/lib/v2/quicker/share.js +61 -0
- package/lib/v2/quicker/user.js +62 -0
- package/lib/v2/quicker/versions.js +36 -0
- package/lib/v2/qweather/3days.js +46 -0
- package/lib/v2/qweather/maintainer.js +4 -0
- package/lib/v2/qweather/now.js +46 -0
- package/lib/v2/qweather/router.js +4 -0
- package/lib/v2/qweather/util/3days.art +20 -0
- package/lib/v2/qweather/util/now.art +16 -0
- package/lib/v2/rsshub/sponsors.js +1 -0
- package/lib/v2/telegram/channel.js +10 -6
- package/lib/v2/telegram/stickerpack.js +1 -1
- package/lib/v2/test/index.js +1 -1
- package/lib/{routes → v2}/thepaper/839studio/category.js +0 -0
- package/lib/{routes → v2}/thepaper/839studio/studio.js +0 -0
- package/lib/{routes → v2}/thepaper/channel.js +0 -0
- package/lib/v2/thepaper/factpaper.js +61 -0
- package/lib/{routes → v2}/thepaper/featured.js +0 -0
- package/lib/{routes → v2}/thepaper/list.js +0 -0
- package/lib/v2/thepaper/maintainer.js +8 -0
- package/lib/v2/thepaper/radar.js +42 -0
- package/lib/v2/thepaper/router.js +8 -0
- package/lib/v2/thepaper/templates/factpaper.art +12 -0
- package/lib/v2/thepaper/utils.js +55 -0
- package/lib/v2/wechat/_README +1 -0
- package/lib/v2/wechat/feeddd.js +3 -46
- package/lib/v2/zooTeam/blog.js +32 -0
- package/lib/v2/zooTeam/maintainer.js +4 -0
- package/lib/v2/zooTeam/radar.js +21 -0
- package/lib/v2/zooTeam/router.js +4 -0
- package/lib/v2/zooTeam/weekly.js +34 -0
- package/lib/views/atom.art +4 -2
- package/lib/views/error.art +1 -0
- package/package.json +16 -14
- package/lib/routes/dbmv/index.js +0 -45
- package/lib/routes/gov/fmprc/fyrbt.js +0 -24
- package/lib/routes/gov/fmprc/utils.js +0 -50
- package/lib/routes/hupu/all.js +0 -53
- package/lib/routes/hupu/bbs.js +0 -83
- package/lib/routes/hupu/dept.js +0 -66
- package/lib/routes/mpaypass/news.js +0 -43
- package/lib/routes/natgeo/dailyphoto.js +0 -27
- package/lib/routes/pubmed/trending.js +0 -65
- package/lib/routes/quicker/person.js +0 -32
- package/lib/routes/quicker/qa.js +0 -41
- package/lib/routes/quicker/update.js +0 -30
- package/lib/routes/tencent/wechat/csm.js +0 -59
- package/lib/routes/tencent/wechat/wjdn.js +0 -28
- package/lib/routes/thepaper/utils.js +0 -48
- package/lib/routes/universities/nuaa/cs/index.js +0 -84
- package/lib/routes/universities/nuaa/jwc/jwc.js +0 -105
package/README.md
CHANGED
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
> 🍰 Everything is RSSible
|
|
7
7
|
|
|
8
|
-
[](https://t.me/rsshub)
|
|
9
|
-
[](https://t.me/rsshub)
|
|
9
|
+
[](https://www.npmjs.com/package/rsshub)
|
|
10
|
+
[](https://hub.docker.com/r/diygod/rsshub)
|
|
11
|
+
[](https://github.com/DIYgod/RSSHub/actions/workflows/test.yml?query=event%3Apush+branch%3Amaster)
|
|
11
12
|
|
|
12
13
|
## Introduction
|
|
13
14
|
|
|
@@ -37,7 +38,7 @@ RSSHub 是一个开源、简单易用、易于扩展的 RSS 生成器,可以
|
|
|
37
38
|
|
|
38
39
|
### Sponsors
|
|
39
40
|
|
|
40
|
-
[Sayori Studio](https://t.me/SayoriStudio) . [Sion Kazama](https://blog.sion.moe) . [琚致远](https://wineso.me/) . [Rolly RSS 阅读器](https://www.coolapk.com/apk/239500) . [mokeyjay](https://www.mokeyjay.com/) . [萌开源联盟](https://www.moeunion.com) . [hooke007](https://github.com/hooke007/MPV_lazy) . [feeds.pub](https://feeds.pub)
|
|
41
|
+
[Sayori Studio](https://t.me/SayoriStudio) . [Sion Kazama](https://blog.sion.moe) . [琚致远](https://wineso.me/) . [Rolly RSS 阅读器](https://www.coolapk.com/apk/239500) . [mokeyjay](https://www.mokeyjay.com/) . [萌开源联盟](https://www.moeunion.com) . [hooke007](https://github.com/hooke007/MPV_lazy) . [feeds.pub](https://feeds.pub) . [KINGX@安全引擎](http://cve.today/)
|
|
41
42
|
|
|
42
43
|
[](https://docs.rsshub.app/en/support/)
|
|
43
44
|
|
package/lib/config.js
CHANGED
|
@@ -27,10 +27,10 @@ if (config.cache.type === 'redis') {
|
|
|
27
27
|
globalCache.set = cacheModule.set;
|
|
28
28
|
} else if (config.cache.type === 'memory') {
|
|
29
29
|
cacheModule = require('./memory');
|
|
30
|
-
const {
|
|
30
|
+
const { memoryCache } = cacheModule.clients;
|
|
31
31
|
globalCache.get = (key) => {
|
|
32
32
|
if (key && cacheModule.status.available) {
|
|
33
|
-
return
|
|
33
|
+
return memoryCache.get(key, { updateAgeOnGet: false });
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
globalCache.set = (key, value, maxAge) => {
|
|
@@ -41,7 +41,7 @@ if (config.cache.type === 'redis') {
|
|
|
41
41
|
value = JSON.stringify(value);
|
|
42
42
|
}
|
|
43
43
|
if (key) {
|
|
44
|
-
return
|
|
44
|
+
return memoryCache.set(key, value, { ttl: maxAge * 1000 });
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
} else {
|
|
@@ -3,30 +3,24 @@ const config = require('@/config').value;
|
|
|
3
3
|
|
|
4
4
|
const status = { available: false };
|
|
5
5
|
|
|
6
|
-
const
|
|
6
|
+
const memoryCache = new Lru({
|
|
7
7
|
ttl: config.cache.routeExpire * 1000,
|
|
8
8
|
max: config.memory.max,
|
|
9
9
|
});
|
|
10
10
|
|
|
11
|
-
const routeCache = new Lru({
|
|
12
|
-
ttl: config.cache.routeExpire * 1000,
|
|
13
|
-
max: config.memory.max,
|
|
14
|
-
updateAgeOnGet: true,
|
|
15
|
-
});
|
|
16
|
-
|
|
17
11
|
status.available = true;
|
|
18
12
|
|
|
19
13
|
module.exports = {
|
|
20
14
|
get: (key, refresh = true) => {
|
|
21
15
|
if (key && status.available) {
|
|
22
|
-
let value = (
|
|
16
|
+
let value = memoryCache.get(key, { updateAgeOnGet: refresh });
|
|
23
17
|
if (value) {
|
|
24
18
|
value = value + '';
|
|
25
19
|
}
|
|
26
20
|
return value;
|
|
27
21
|
}
|
|
28
22
|
},
|
|
29
|
-
set: (key, value, maxAge = config.cache.contentExpire
|
|
23
|
+
set: (key, value, maxAge = config.cache.contentExpire) => {
|
|
30
24
|
if (!value || value === 'undefined') {
|
|
31
25
|
value = '';
|
|
32
26
|
}
|
|
@@ -34,9 +28,9 @@ module.exports = {
|
|
|
34
28
|
value = JSON.stringify(value);
|
|
35
29
|
}
|
|
36
30
|
if (key && status.available) {
|
|
37
|
-
return
|
|
31
|
+
return memoryCache.set(key, value, { ttl: maxAge * 1000 });
|
|
38
32
|
}
|
|
39
33
|
},
|
|
40
|
-
clients: {
|
|
34
|
+
clients: { memoryCache },
|
|
41
35
|
status,
|
|
42
36
|
};
|
|
@@ -6,6 +6,7 @@ const path = require('path');
|
|
|
6
6
|
const { RequestInProgressError } = require('@/errors');
|
|
7
7
|
|
|
8
8
|
let Sentry;
|
|
9
|
+
let gitHash;
|
|
9
10
|
|
|
10
11
|
if (config.sentry.dsn) {
|
|
11
12
|
Sentry = Sentry || require('@sentry/node');
|
|
@@ -19,6 +20,12 @@ if (config.sentry.dsn) {
|
|
|
19
20
|
logger.info('Sentry inited.');
|
|
20
21
|
}
|
|
21
22
|
|
|
23
|
+
try {
|
|
24
|
+
gitHash = require('git-rev-sync').short();
|
|
25
|
+
} catch (e) {
|
|
26
|
+
gitHash = (process.env.HEROKU_SLUG_COMMIT && process.env.HEROKU_SLUG_COMMIT.slice(0, 7)) || (process.env.VERCEL_GITHUB_COMMIT_SHA && process.env.VERCEL_GITHUB_COMMIT_SHA.slice(0, 7)) || 'unknown';
|
|
27
|
+
}
|
|
28
|
+
|
|
22
29
|
module.exports = async (ctx, next) => {
|
|
23
30
|
try {
|
|
24
31
|
const time = +new Date();
|
|
@@ -68,6 +75,7 @@ module.exports = async (ctx, next) => {
|
|
|
68
75
|
message,
|
|
69
76
|
errorPath: ctx.path,
|
|
70
77
|
nodeVersion: process.version,
|
|
78
|
+
gitHash,
|
|
71
79
|
});
|
|
72
80
|
}
|
|
73
81
|
|
|
@@ -2,7 +2,7 @@ const art = require('art-template');
|
|
|
2
2
|
const path = require('path');
|
|
3
3
|
const config = require('@/config').value;
|
|
4
4
|
const typeRegex = /\.(atom|rss|debug\.json)$/;
|
|
5
|
-
const { collapseWhitespace } = require('@/utils/common-utils');
|
|
5
|
+
const { collapseWhitespace, convertDateToISO8601 } = require('@/utils/common-utils');
|
|
6
6
|
|
|
7
7
|
module.exports = async (ctx, next) => {
|
|
8
8
|
if (ctx.headers['user-agent'] && ctx.headers['user-agent'].includes('Reeder')) {
|
|
@@ -28,7 +28,8 @@ module.exports = async (ctx, next) => {
|
|
|
28
28
|
if (!ctx.body) {
|
|
29
29
|
let template;
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
const outputType = ctx.state.type[1];
|
|
32
|
+
switch (outputType) {
|
|
32
33
|
case 'atom':
|
|
33
34
|
template = path.resolve(__dirname, '../views/atom.art');
|
|
34
35
|
break;
|
|
@@ -66,6 +67,11 @@ module.exports = async (ctx, next) => {
|
|
|
66
67
|
item.itunes_duration =
|
|
67
68
|
Math.floor(item.itunes_duration / 3600) + ':' + (Math.floor((item.itunes_duration % 3600) / 60) / 100).toFixed(2).slice(-2) + ':' + (((item.itunes_duration % 3600) % 60) / 100).toFixed(2).slice(-2);
|
|
68
69
|
}
|
|
70
|
+
|
|
71
|
+
if (outputType === 'atom') {
|
|
72
|
+
item.pubDate = convertDateToISO8601(item.pubDate);
|
|
73
|
+
item.updated = convertDateToISO8601(item.updated);
|
|
74
|
+
}
|
|
69
75
|
});
|
|
70
76
|
}
|
|
71
77
|
|
package/lib/router.js
CHANGED
|
@@ -25,10 +25,10 @@ const lazyloadRouteHandler = (routeHandlerPath) => (ctx) => {
|
|
|
25
25
|
router.get('/1draw', lazyloadRouteHandler('./routes/1draw/index'));
|
|
26
26
|
|
|
27
27
|
// quicker
|
|
28
|
-
router.get('/quicker/qa', lazyloadRouteHandler('./routes/quicker/qa.js'));
|
|
29
|
-
router.get('/quicker/update', lazyloadRouteHandler('./routes/quicker/update.js'));
|
|
30
|
-
router.get('/quicker/user/action/:uid/:person', lazyloadRouteHandler('./routes/quicker/person.js'));
|
|
31
|
-
router.get('/quicker/user/:uid/:person', lazyloadRouteHandler('./routes/quicker/person.js'));
|
|
28
|
+
// router.get('/quicker/qa', lazyloadRouteHandler('./routes/quicker/qa.js'));
|
|
29
|
+
// router.get('/quicker/update', lazyloadRouteHandler('./routes/quicker/update.js'));
|
|
30
|
+
// router.get('/quicker/user/action/:uid/:person', lazyloadRouteHandler('./routes/quicker/person.js'));
|
|
31
|
+
// router.get('/quicker/user/:uid/:person', lazyloadRouteHandler('./routes/quicker/person.js'));
|
|
32
32
|
|
|
33
33
|
// Benedict Evans
|
|
34
34
|
router.get('/benedictevans', lazyloadRouteHandler('./routes/benedictevans/recent.js'));
|
|
@@ -234,10 +234,11 @@ router.get('/prestige-av/series/:mid/:sort?', lazyloadRouteHandler('./routes/pre
|
|
|
234
234
|
router.get('/yande.re/post/popular_recent', lazyloadRouteHandler('./routes/yande.re/post_popular_recent'));
|
|
235
235
|
router.get('/yande.re/post/popular_recent/:period', lazyloadRouteHandler('./routes/yande.re/post_popular_recent'));
|
|
236
236
|
|
|
237
|
-
// 纽约时报
|
|
238
|
-
router.get('/nytimes/daily_briefing_chinese', lazyloadRouteHandler('./routes/nytimes/daily_briefing_chinese'));
|
|
239
|
-
router.get('/nytimes/book/:category?', lazyloadRouteHandler('./routes/nytimes/book.js'));
|
|
240
|
-
router.get('/nytimes/:
|
|
237
|
+
// 纽约时报 migrated to v2
|
|
238
|
+
// router.get('/nytimes/daily_briefing_chinese', lazyloadRouteHandler('./routes/nytimes/daily_briefing_chinese'));
|
|
239
|
+
// router.get('/nytimes/book/:category?', lazyloadRouteHandler('./routes/nytimes/book.js'));
|
|
240
|
+
// router.get('/nytimes/author/:byline', lazyloadRouteHandler('./routes/nytimes/author.js'));
|
|
241
|
+
// router.get('/nytimes/:lang?', lazyloadRouteHandler('./routes/nytimes/index'));
|
|
241
242
|
|
|
242
243
|
// 3dm
|
|
243
244
|
router.get('/3dm/:name/:type', lazyloadRouteHandler('./routes/3dm/game'));
|
|
@@ -300,9 +301,10 @@ router.get('/t66y/:id/:type?', lazyloadRouteHandler('./routes/t66y/index'));
|
|
|
300
301
|
// 色中色
|
|
301
302
|
router.get('/sexinsex/:id/:type?', lazyloadRouteHandler('./routes/sexinsex/index'));
|
|
302
303
|
|
|
303
|
-
// 国家地理
|
|
304
|
-
router.get('/natgeo/
|
|
305
|
-
router.get('/natgeo
|
|
304
|
+
// 国家地理 migrated to v2
|
|
305
|
+
// router.get('/natgeo/dailyselection', lazyloadRouteHandler('./routes/natgeo/dailyselection'));
|
|
306
|
+
// router.get('/natgeo/dailyphoto', lazyloadRouteHandler('./routes/natgeo/dailyphoto'));
|
|
307
|
+
// router.get('/natgeo/:cat/:type?', lazyloadRouteHandler('./routes/natgeo/natgeo'));
|
|
306
308
|
|
|
307
309
|
// 一个
|
|
308
310
|
router.get('/one', lazyloadRouteHandler('./routes/one/index'));
|
|
@@ -518,10 +520,10 @@ router.get('/seu/cse/:type?', lazyloadRouteHandler('./routes/universities/seu/cs
|
|
|
518
520
|
// 南京工业大学
|
|
519
521
|
router.get('/njtech/jwc', lazyloadRouteHandler('./routes/universities/njtech/jwc'));
|
|
520
522
|
|
|
521
|
-
// 南京航空航天大学
|
|
522
|
-
router.get('/nuaa/jwc/:type?', lazyloadRouteHandler('./routes/universities/nuaa/jwc/jwc'));
|
|
523
|
-
router.get('/nuaa/cs/:type?', lazyloadRouteHandler('./routes/universities/nuaa/cs/index'));
|
|
524
|
-
router.get('/nuaa/yjsy/:type?', lazyloadRouteHandler('./routes/universities/nuaa/yjsy/yjsy'));
|
|
523
|
+
// 南京航空航天大学 migrated to v2
|
|
524
|
+
// router.get('/nuaa/jwc/:type/:getDescription?', lazyloadRouteHandler('./routes/universities/nuaa/jwc/jwc'));
|
|
525
|
+
// router.get('/nuaa/cs/:type/:getDescription?', lazyloadRouteHandler('./routes/universities/nuaa/cs/index'));
|
|
526
|
+
// router.get('/nuaa/yjsy/:type?', lazyloadRouteHandler('./routes/universities/nuaa/yjsy/yjsy'));
|
|
525
527
|
|
|
526
528
|
// 河海大学
|
|
527
529
|
router.get('/hhu/libNews', lazyloadRouteHandler('./routes/universities/hhu/libNews'));
|
|
@@ -847,13 +849,13 @@ router.get('/xclient/app/:name', lazyloadRouteHandler('./routes/xclient/app'));
|
|
|
847
849
|
router.get('/embassy/:country/:city?', lazyloadRouteHandler('./routes/embassy/index'));
|
|
848
850
|
|
|
849
851
|
// 澎湃新闻
|
|
850
|
-
router.get('/thepaper/featured', lazyloadRouteHandler('./routes/thepaper/featured'));
|
|
851
|
-
router.get('/thepaper/channel/:id', lazyloadRouteHandler('./routes/thepaper/channel'));
|
|
852
|
-
router.get('/thepaper/list/:id', lazyloadRouteHandler('./routes/thepaper/list'));
|
|
852
|
+
// router.get('/thepaper/featured', lazyloadRouteHandler('./routes/thepaper/featured'));
|
|
853
|
+
// router.get('/thepaper/channel/:id', lazyloadRouteHandler('./routes/thepaper/channel'));
|
|
854
|
+
// router.get('/thepaper/list/:id', lazyloadRouteHandler('./routes/thepaper/list'));
|
|
853
855
|
|
|
854
856
|
// 澎湃美数课
|
|
855
|
-
router.get('/thepaper/839studio', lazyloadRouteHandler('./routes/thepaper/839studio/studio.js'));
|
|
856
|
-
router.get('/thepaper/839studio/:id', lazyloadRouteHandler('./routes/thepaper/839studio/category.js'));
|
|
857
|
+
// router.get('/thepaper/839studio', lazyloadRouteHandler('./routes/thepaper/839studio/studio.js'));
|
|
858
|
+
// router.get('/thepaper/839studio/:id', lazyloadRouteHandler('./routes/thepaper/839studio/category.js'));
|
|
857
859
|
|
|
858
860
|
// 电影首发站
|
|
859
861
|
router.get('/dysfz', lazyloadRouteHandler('./routes/dysfz/index'));
|
|
@@ -1111,8 +1113,8 @@ router.get('/anigamer/anime/:sn', lazyloadRouteHandler('./routes/anigamer/anime'
|
|
|
1111
1113
|
// Apkpure
|
|
1112
1114
|
router.get('/apkpure/versions/:region/:pkg', lazyloadRouteHandler('./routes/apkpure/versions'));
|
|
1113
1115
|
|
|
1114
|
-
// 豆瓣美女
|
|
1115
|
-
router.get('/dbmv/:category?', lazyloadRouteHandler('./routes/dbmv/index'));
|
|
1116
|
+
// 豆瓣美女 migrated to v2
|
|
1117
|
+
// router.get('/dbmv/:category?', lazyloadRouteHandler('./routes/dbmv/index'));
|
|
1116
1118
|
|
|
1117
1119
|
// 中国药科大学
|
|
1118
1120
|
router.get('/cpu/home', lazyloadRouteHandler('./routes/universities/cpu/home'));
|
|
@@ -1225,7 +1227,7 @@ router.get('/gov/customs/list/:gchannel', lazyloadRouteHandler('./routes/gov/cus
|
|
|
1225
1227
|
router.get('/gov/moe/:type', lazyloadRouteHandler('./routes/gov/moe/moe'));
|
|
1226
1228
|
|
|
1227
1229
|
// 中华人民共和国外交部
|
|
1228
|
-
router.get('/gov/fmprc/fyrbt', lazyloadRouteHandler('./routes/gov/fmprc/fyrbt'));
|
|
1230
|
+
// router.get('/gov/fmprc/fyrbt', lazyloadRouteHandler('./routes/gov/fmprc/fyrbt'));
|
|
1229
1231
|
|
|
1230
1232
|
// 中华人民共和国住房和城乡建设部
|
|
1231
1233
|
router.get('/gov/mohurd/policy', lazyloadRouteHandler('./routes/gov/mohurd/policy'));
|
|
@@ -1263,9 +1265,9 @@ router.get('/xiaoheihe/discount/:platform?', lazyloadRouteHandler('./routes/xiao
|
|
|
1263
1265
|
// 惠誉评级
|
|
1264
1266
|
router.get('/fitchratings/site/:type', lazyloadRouteHandler('./routes/fitchratings/site'));
|
|
1265
1267
|
|
|
1266
|
-
// 移动支付
|
|
1267
|
-
router.get('/mpaypass/news', lazyloadRouteHandler('./routes/mpaypass/news'));
|
|
1268
|
-
router.get('/mpaypass/main/:type?', lazyloadRouteHandler('./routes/mpaypass/main'));
|
|
1268
|
+
// 移动支付 migrated to v2
|
|
1269
|
+
// router.get('/mpaypass/news', lazyloadRouteHandler('./routes/mpaypass/news'));
|
|
1270
|
+
// router.get('/mpaypass/main/:type?', lazyloadRouteHandler('./routes/mpaypass/main'));
|
|
1269
1271
|
|
|
1270
1272
|
// 新浪科技探索
|
|
1271
1273
|
router.get('/sina/discovery/:type', lazyloadRouteHandler('./routes/sina/discovery'));
|
|
@@ -1331,10 +1333,10 @@ router.get('/leetcode/submission/us/:user', lazyloadRouteHandler('./routes/leetc
|
|
|
1331
1333
|
router.get('/leetcode/submission/cn/:user', lazyloadRouteHandler('./routes/leetcode/check-cn'));
|
|
1332
1334
|
|
|
1333
1335
|
// 虎扑
|
|
1334
|
-
router.get('/hupu/bxj/:id/:order?', lazyloadRouteHandler('./routes/hupu/bbs'));
|
|
1335
|
-
router.get('/hupu/bbs/:id/:order?', lazyloadRouteHandler('./routes/hupu/bbs'));
|
|
1336
|
-
router.get('/hupu/all/:caty', lazyloadRouteHandler('./routes/hupu/all'));
|
|
1337
|
-
router.get('/hupu/dept/:dept', lazyloadRouteHandler('./routes/hupu/dept'));
|
|
1336
|
+
// router.get('/hupu/bxj/:id/:order?', lazyloadRouteHandler('./routes/hupu/bbs'));
|
|
1337
|
+
// router.get('/hupu/bbs/:id/:order?', lazyloadRouteHandler('./routes/hupu/bbs'));
|
|
1338
|
+
// router.get('/hupu/all/:caty', lazyloadRouteHandler('./routes/hupu/all'));
|
|
1339
|
+
// router.get('/hupu/dept/:dept', lazyloadRouteHandler('./routes/hupu/dept'));
|
|
1338
1340
|
|
|
1339
1341
|
// 牛客网 migrated to v2
|
|
1340
1342
|
// router.get('/nowcoder/discuss/:type/:order', lazyloadRouteHandler('./routes/nowcoder/discuss'));
|
|
@@ -2180,7 +2182,7 @@ router.get('/kaggle/competitions/:category?', lazyloadRouteHandler('./routes/kag
|
|
|
2180
2182
|
router.get('/kaggle/user/:user', lazyloadRouteHandler('./routes/kaggle/user'));
|
|
2181
2183
|
|
|
2182
2184
|
// PubMed Trending
|
|
2183
|
-
router.get('/pubmed/trending', lazyloadRouteHandler('./routes/pubmed/trending'));
|
|
2185
|
+
// router.get('/pubmed/trending', lazyloadRouteHandler('./routes/pubmed/trending'));
|
|
2184
2186
|
|
|
2185
2187
|
// 领科 (linkresearcher.com)
|
|
2186
2188
|
router.get('/linkresearcher/:params', lazyloadRouteHandler('./routes/linkresearcher/index'));
|
|
@@ -2456,8 +2458,8 @@ router.get('/lastfm/top/:country?', lazyloadRouteHandler('./routes/lastfm/top'))
|
|
|
2456
2458
|
router.get('/piapro/user/:pid', lazyloadRouteHandler('./routes/piapro/user'));
|
|
2457
2459
|
router.get('/piapro/public/:type/:tag?/:category?', lazyloadRouteHandler('./routes/piapro/public'));
|
|
2458
2460
|
|
|
2459
|
-
// 凤凰网
|
|
2460
|
-
router.get('/ifeng/feng/:id/:type', lazyloadRouteHandler('./routes/ifeng/feng'));
|
|
2461
|
+
// 凤凰网 migrated to v2
|
|
2462
|
+
// router.get('/ifeng/feng/:id/:type', lazyloadRouteHandler('./routes/ifeng/feng'));
|
|
2461
2463
|
|
|
2462
2464
|
// 第一版主
|
|
2463
2465
|
router.get('/novel/d1bz/:category/:id', lazyloadRouteHandler('./routes/d1bz/novel'));
|
|
@@ -3301,8 +3303,8 @@ router.get('/gov/taiwan/mnd', lazyloadRouteHandler('./routes/gov/taiwan/mnd'));
|
|
|
3301
3303
|
router.get('/yomiuri/:category', lazyloadRouteHandler('./routes/yomiuri/news'));
|
|
3302
3304
|
|
|
3303
3305
|
// 巴哈姆特
|
|
3304
|
-
// GNN新闻
|
|
3305
|
-
router.get('/gamer/gnn/:category?', lazyloadRouteHandler('./routes/gamer/gnn_index'));
|
|
3306
|
+
// GNN新闻 migrated to v2
|
|
3307
|
+
// router.get('/gamer/gnn/:category?', lazyloadRouteHandler('./routes/gamer/gnn_index'));
|
|
3306
3308
|
|
|
3307
3309
|
// 中国人大网
|
|
3308
3310
|
router.get('/npc/:caty', lazyloadRouteHandler('./routes/npc/index'));
|
|
@@ -27,7 +27,7 @@ module.exports = async (ctx) => {
|
|
|
27
27
|
if (!data) {
|
|
28
28
|
const res = await got.get(url);
|
|
29
29
|
data = res.data;
|
|
30
|
-
ctx.cache.set(url, data, config.cache.contentExpire
|
|
30
|
+
ctx.cache.set(url, data, config.cache.contentExpire);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
const $ = cheerio.load(data, { xmlMode: true });
|
|
@@ -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
|
|
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>';
|
|
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/#bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>';
|
|
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>';
|
|
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/#bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>';
|
|
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>';
|
|
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/#bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>';
|
|
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>';
|
|
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/#bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>';
|
|
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>';
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
const uid = ctx.params.uid;
|
|
@@ -23,7 +23,7 @@ module.exports = async (ctx) => {
|
|
|
23
23
|
const response = await got({
|
|
24
24
|
method: 'get',
|
|
25
25
|
url: link,
|
|
26
|
-
|
|
26
|
+
headers: {
|
|
27
27
|
Referer: host,
|
|
28
28
|
},
|
|
29
29
|
});
|
|
@@ -51,7 +51,7 @@ module.exports = async (ctx) => {
|
|
|
51
51
|
const response = await got({
|
|
52
52
|
method: 'get',
|
|
53
53
|
url: itemUrl,
|
|
54
|
-
|
|
54
|
+
headers: {
|
|
55
55
|
Referer: host,
|
|
56
56
|
},
|
|
57
57
|
});
|
package/lib/routes/hkej/index.js
CHANGED
|
@@ -62,7 +62,7 @@ module.exports = async (ctx) => {
|
|
|
62
62
|
const response = await got({
|
|
63
63
|
method: 'get',
|
|
64
64
|
url: baseUrl + cat.link,
|
|
65
|
-
|
|
65
|
+
headers: {
|
|
66
66
|
Referer: baseUrl,
|
|
67
67
|
},
|
|
68
68
|
});
|
|
@@ -86,7 +86,7 @@ module.exports = async (ctx) => {
|
|
|
86
86
|
const article = await got({
|
|
87
87
|
method: 'get',
|
|
88
88
|
url: item.link,
|
|
89
|
-
|
|
89
|
+
headers: {
|
|
90
90
|
Referer: cat.link,
|
|
91
91
|
},
|
|
92
92
|
});
|
|
@@ -21,7 +21,7 @@ async function login(ig) {
|
|
|
21
21
|
logger.error('Instagram login fail: ' + error);
|
|
22
22
|
}
|
|
23
23
|
} else {
|
|
24
|
-
throw Error('Instagram
|
|
24
|
+
throw Error('Instagram 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>');
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
|
package/lib/routes/ipsw/index.js
CHANGED
|
@@ -23,7 +23,7 @@ module.exports = async (ctx) => {
|
|
|
23
23
|
const response = await got({
|
|
24
24
|
method: 'get',
|
|
25
25
|
url: link,
|
|
26
|
-
|
|
26
|
+
headers: {
|
|
27
27
|
Referer: host,
|
|
28
28
|
},
|
|
29
29
|
});
|
|
@@ -77,7 +77,7 @@ module.exports = async (ctx) => {
|
|
|
77
77
|
const response = await got({
|
|
78
78
|
method: 'get',
|
|
79
79
|
url: itemUrl,
|
|
80
|
-
|
|
80
|
+
headers: {
|
|
81
81
|
Referer: host,
|
|
82
82
|
},
|
|
83
83
|
});
|
|
@@ -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/#bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>';
|
|
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>';
|
|
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/#bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>';
|
|
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>';
|
|
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/#bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>';
|
|
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>';
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
const country = ctx.params.country;
|
|
@@ -77,7 +77,7 @@ exports.getDetails = (cache, simples) => Promise.all(simples.slice(0, MAX_DETAIL
|
|
|
77
77
|
const MAX_TORRENT = 5;
|
|
78
78
|
exports.getTorrents = async (cache, simples) => {
|
|
79
79
|
if (!config.nhentai || !config.nhentai.username || !config.nhentai.password) {
|
|
80
|
-
throw 'nhentai RSS with torrents is disabled due to the lack of <a href="https://docs.rsshub.app/install/#bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>';
|
|
80
|
+
throw 'nhentai RSS with torrents 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>';
|
|
81
81
|
}
|
|
82
82
|
const cookie = await getCookie(config.nhentai.username, config.nhentai.password, cache);
|
|
83
83
|
if (!cookie) {
|
|
@@ -6,7 +6,7 @@ const pixivUtils = require('./utils');
|
|
|
6
6
|
|
|
7
7
|
module.exports = async (ctx) => {
|
|
8
8
|
if (!config.pixiv || !config.pixiv.refreshToken) {
|
|
9
|
-
throw 'pixiv RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install
|
|
9
|
+
throw 'pixiv 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>';
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
const id = ctx.params.id;
|
|
@@ -5,7 +5,7 @@ const pixivUtils = require('./utils');
|
|
|
5
5
|
|
|
6
6
|
module.exports = async (ctx) => {
|
|
7
7
|
if (!config.pixiv || !config.pixiv.refreshToken) {
|
|
8
|
-
throw 'pixiv RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install
|
|
8
|
+
throw 'pixiv 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 token = await getToken();
|
|
@@ -50,7 +50,7 @@ const alias = {
|
|
|
50
50
|
|
|
51
51
|
module.exports = async (ctx) => {
|
|
52
52
|
if (!config.pixiv || !config.pixiv.refreshToken) {
|
|
53
|
-
throw 'pixiv RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install
|
|
53
|
+
throw 'pixiv 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>';
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
const mode = alias[ctx.params.mode] ? alias[ctx.params.mode] : ctx.params.mode;
|
|
@@ -6,7 +6,7 @@ const pixivUtils = require('./utils');
|
|
|
6
6
|
|
|
7
7
|
module.exports = async (ctx) => {
|
|
8
8
|
if (!config.pixiv || !config.pixiv.refreshToken) {
|
|
9
|
-
throw 'pixiv RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install
|
|
9
|
+
throw 'pixiv 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>';
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
const keyword = ctx.params.keyword;
|
package/lib/routes/pixiv/user.js
CHANGED
|
@@ -5,7 +5,7 @@ const pixivUtils = require('./utils');
|
|
|
5
5
|
|
|
6
6
|
module.exports = async (ctx) => {
|
|
7
7
|
if (!config.pixiv || !config.pixiv.refreshToken) {
|
|
8
|
-
throw 'pixiv RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install
|
|
8
|
+
throw 'pixiv 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 @@
|
|
|
1
|
+
Make sure you read lib/utils/wechat-mp.js before adding a new route.
|
|
@@ -1,42 +1,18 @@
|
|
|
1
1
|
const parser = require('@/utils/rss-parser');
|
|
2
|
-
const
|
|
3
|
-
const cheerio = require('cheerio');
|
|
2
|
+
const { finishArticleItem } = require('@/utils/wechat-mp');
|
|
4
3
|
|
|
5
4
|
module.exports = async (ctx) => {
|
|
6
5
|
const { id } = ctx.params;
|
|
7
6
|
const link = `https://github.com/hellodword/wechat-feeds/raw/feeds/${id}.xml`;
|
|
8
7
|
const feed = await parser.parseURL(link);
|
|
9
8
|
|
|
10
|
-
const items =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const response = await got.get(item.link);
|
|
18
|
-
|
|
19
|
-
const $ = cheerio.load(response.data);
|
|
20
|
-
const post = $('#js_content');
|
|
21
|
-
|
|
22
|
-
post.find('img').each((_, img) => {
|
|
23
|
-
const dataSrc = $(img).attr('data-src');
|
|
24
|
-
if (dataSrc) {
|
|
25
|
-
$(img).attr('src', dataSrc);
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
const single = {
|
|
30
|
-
title: item.title,
|
|
31
|
-
description: post.html(),
|
|
32
|
-
pubDate: new Date(item.pubDate),
|
|
33
|
-
link: item.link,
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
ctx.cache.set(item.link, JSON.stringify(single));
|
|
37
|
-
return Promise.resolve(single);
|
|
38
|
-
})
|
|
39
|
-
);
|
|
9
|
+
const items = feed.items.map((item) => ({
|
|
10
|
+
title: item.title,
|
|
11
|
+
pubDate: new Date(item.pubDate),
|
|
12
|
+
link: item.link,
|
|
13
|
+
guid: item.link,
|
|
14
|
+
}));
|
|
15
|
+
await Promise.all(items.map(async (item) => await finishArticleItem(ctx, item)));
|
|
40
16
|
|
|
41
17
|
ctx.state.data = {
|
|
42
18
|
title: feed.title,
|