rsshub 1.0.0-master.fe4f650 → 1.0.0-master.fe560d2
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 +3 -3
- package/lib/config.js +1 -1
- package/lib/middleware/parameter.js +3 -3
- package/lib/radar-rules.js +0 -46
- package/lib/router.js +28 -28
- package/lib/routes/v2ex/post.js +3 -0
- package/lib/utils/puppeteer-utils.js +63 -0
- package/lib/utils/puppeteer.js +13 -8
- package/lib/utils/request-wrapper.js +38 -100
- package/lib/utils/unify-proxy.js +116 -0
- package/lib/utils/wechat-mp.js +2 -0
- package/lib/v2/18comic/utils.js +2 -2
- package/lib/v2/36kr/index.js +29 -24
- package/lib/v2/agora0/maintainer.js +1 -0
- package/lib/v2/agora0/pen0.js +43 -0
- package/lib/v2/agora0/radar.js +12 -1
- package/lib/v2/agora0/router.js +1 -0
- package/lib/v2/aiea/index.js +39 -0
- package/lib/v2/aiea/maintainer.js +3 -0
- package/lib/v2/aiea/radar.js +13 -0
- package/lib/v2/aiea/router.js +3 -0
- package/lib/v2/baidu/radar.js +6 -6
- package/lib/v2/bangumi/online/online.js +4 -2
- package/lib/v2/bangumi/tv/group/reply.js +13 -1
- package/lib/v2/bangumi/tv/group/topic.js +22 -9
- package/lib/v2/bilibili/cache.js +34 -1
- package/lib/v2/bilibili/userCollection.js +1 -2
- package/lib/v2/bilibili/utils.js +10 -0
- package/lib/v2/bilibili/video-all.js +5 -2
- package/lib/v2/bilibili/video.js +3 -1
- package/lib/v2/bytes/bytes.js +25 -0
- package/lib/v2/bytes/maintainer.js +4 -0
- package/lib/v2/bytes/radar.js +13 -0
- package/lib/v2/bytes/router.js +3 -0
- package/lib/v2/caijing/maintainer.js +3 -0
- package/lib/v2/caijing/radar.js +13 -0
- package/lib/v2/caijing/roll.js +46 -0
- package/lib/v2/caijing/router.js +3 -0
- package/lib/v2/cdzjryb/maintainer.js +3 -0
- package/lib/v2/cdzjryb/projectList.js +49 -0
- package/lib/v2/cdzjryb/radar.js +13 -0
- package/lib/v2/cdzjryb/router.js +3 -0
- package/lib/v2/cdzjryb/templates/projectList.art +23 -0
- package/lib/v2/chsi/kydt.js +51 -0
- package/lib/v2/chsi/maintainer.js +3 -0
- package/lib/v2/chsi/radar.js +13 -0
- package/lib/v2/chsi/router.js +3 -0
- package/lib/v2/cnbeta/radar.js +6 -6
- package/lib/v2/cnbeta/router.js +1 -1
- package/lib/v2/cnbeta/type.js +6 -12
- package/lib/v2/cnbeta/utils.js +5 -8
- package/lib/v2/cngal/entry.js +25 -0
- package/lib/v2/cngal/maintainer.js +4 -0
- package/lib/v2/cngal/radar.js +19 -0
- package/lib/v2/cngal/router.js +4 -0
- package/lib/v2/cngal/templates/entry-description.art +4 -0
- package/lib/v2/cngal/templates/weekly-description.art +4 -0
- package/lib/v2/cngal/weekly.js +20 -0
- package/lib/v2/cnki/author.js +45 -0
- package/lib/v2/cnki/journals.js +2 -23
- package/lib/v2/cnki/maintainer.js +1 -0
- package/lib/v2/cnki/radar.js +8 -0
- package/lib/v2/cnki/router.js +1 -0
- package/lib/v2/cnki/utils.js +26 -0
- package/lib/v2/codeforces/maintainer.js +1 -0
- package/lib/v2/codeforces/radar.js +8 -0
- package/lib/v2/codeforces/recent_actions.js +47 -0
- package/lib/v2/codeforces/router.js +1 -0
- package/lib/v2/curius/links.js +43 -0
- package/lib/v2/curius/maintainer.js +3 -0
- package/lib/v2/curius/radar.js +13 -0
- package/lib/v2/curius/router.js +3 -0
- package/lib/v2/curius/templates/description.art +16 -0
- package/lib/v2/douyin/hashtag.js +20 -19
- package/lib/v2/douyin/live.js +2 -21
- package/lib/v2/douyin/user.js +2 -17
- package/lib/v2/douyin/utils.js +85 -0
- package/lib/v2/{acm-ecnu → ecnu}/contest.js +1 -4
- package/lib/v2/ecnu/maintainer.js +4 -0
- package/lib/v2/ecnu/radar.js +30 -0
- package/lib/v2/ecnu/router.js +4 -0
- package/lib/v2/{acm-ecnu → ecnu}/templates/description.art +0 -0
- package/lib/v2/ecnu/yjs.js +37 -0
- package/lib/v2/ehentai/ehapi.js +23 -12
- package/lib/v2/foresightnews/index.js +8 -11
- package/lib/v2/foreverblog/feeds.js +36 -0
- package/lib/v2/foreverblog/maintainer.js +3 -0
- package/lib/v2/foreverblog/radar.js +13 -0
- package/lib/v2/foreverblog/router.js +3 -0
- package/lib/v2/freewechat/maintainer.js +3 -0
- package/lib/v2/freewechat/profile.js +61 -0
- package/lib/v2/freewechat/radar.js +13 -0
- package/lib/v2/freewechat/router.js +3 -0
- package/lib/v2/gcores/category.js +16 -6
- package/lib/v2/good/index.js +15 -14
- package/lib/v2/gov/customs/list.js +1 -1
- package/lib/v2/gov/dianbai/dianbai.js +18 -0
- package/lib/v2/gov/gaozhou/gaozhou.js +19 -0
- package/lib/v2/gov/general/general.js +250 -0
- package/lib/v2/gov/general/templates/zcjdpt.art +128 -0
- package/lib/v2/gov/gz/index.js +38 -0
- package/lib/v2/gov/huazhou/huazhou.js +19 -0
- package/lib/v2/gov/hunan/changsha/major-email.js +52 -0
- package/lib/v2/gov/maintainer.js +19 -2
- package/lib/v2/gov/maoming/maoming.js +417 -0
- package/lib/v2/gov/maonan/maonan.js +100 -0
- package/lib/v2/gov/mgs/mgs.js +19 -0
- package/lib/v2/gov/mmht/mmht.js +19 -0
- package/lib/v2/gov/nmpa/generic.js +1 -1
- package/lib/v2/gov/radar.js +197 -0
- package/lib/v2/gov/router.js +18 -2
- package/lib/v2/gov/sasac/generic.js +42 -0
- package/lib/v2/gov/sdb/sdb.js +19 -0
- package/lib/v2/gov/shanghai/yjj/index.js +3 -1
- package/lib/v2/gov/xinyi/xinyi.js +19 -0
- package/lib/v2/gov/zhengce/govall.js +55 -0
- package/lib/v2/gov/zhengce/wenjian.js +47 -0
- package/lib/v2/gov/zhengce/zhengceku.js +22 -0
- package/lib/v2/gov/zhengce/zuixin.js +39 -0
- package/lib/v2/guanhai/index.js +47 -0
- package/lib/v2/guanhai/maintainer.js +4 -0
- package/lib/v2/guanhai/radar.js +13 -0
- package/lib/v2/guanhai/router.js +3 -0
- package/lib/v2/hackernews/index.js +6 -0
- package/lib/v2/hellogithub/volume.js +15 -32
- package/lib/v2/{heu → hrbeu}/gx/card.js +5 -10
- package/lib/v2/{heu → hrbeu}/gx/list.js +12 -20
- package/lib/v2/hrbeu/job/bigemploy.js +25 -0
- package/lib/v2/{heu → hrbeu}/job/calendar.js +8 -16
- package/lib/v2/{heu → hrbeu}/job/list.js +11 -16
- package/lib/v2/{heu → hrbeu}/maintainer.js +2 -1
- package/lib/v2/{heu → hrbeu}/radar.js +18 -10
- package/lib/v2/{heu → hrbeu}/router.js +3 -2
- package/lib/v2/{heu → hrbeu}/uae/list.js +12 -17
- package/lib/v2/hrbeu/ugs/news.js +98 -0
- package/lib/v2/{heu → hrbeu}/yjsy/list.js +8 -16
- package/lib/v2/ieee-security/maintainer.js +3 -0
- package/lib/v2/ieee-security/radar.js +13 -0
- package/lib/v2/ieee-security/router.js +3 -0
- package/lib/v2/ieee-security/sp.js +36 -0
- package/lib/v2/javbus/index.js +8 -2
- package/lib/v2/javbus/templates/description.art +12 -1
- package/lib/v2/jike/user.js +1 -0
- package/lib/v2/lang/maintainer.js +3 -0
- package/lib/v2/lang/radar.js +13 -0
- package/lib/v2/lang/room.js +40 -0
- package/lib/v2/lang/router.js +3 -0
- package/lib/v2/lang/templates/room.art +1 -0
- package/lib/v2/liulinblog/utils.js +7 -4
- package/lib/v2/luogu/daily.js +1 -1
- package/lib/v2/mangadex/index.js +73 -0
- package/lib/v2/mangadex/maintainer.js +3 -0
- package/lib/v2/mangadex/radar.js +13 -0
- package/lib/v2/mangadex/router.js +3 -0
- package/lib/v2/mihoyo/ys/news.js +3 -2
- package/lib/v2/mirror/index.js +15 -8
- package/lib/v2/mrdx/daily.js +79 -0
- package/lib/v2/mrdx/maintainer.js +3 -0
- package/lib/v2/mrdx/radar.js +13 -0
- package/lib/v2/mrdx/router.js +3 -0
- package/lib/v2/mrdx/utils.js +17 -0
- package/lib/v2/mtime/news.js +1 -1
- package/lib/v2/nautil/maintainer.js +3 -0
- package/lib/v2/nautil/radar.js +13 -0
- package/lib/v2/nautil/router.js +3 -0
- package/lib/v2/nautil/templates/description.art +6 -0
- package/lib/v2/nautil/topics.js +57 -0
- package/lib/v2/ndss-symposium/maintainer.js +3 -0
- package/lib/v2/ndss-symposium/ndss.js +80 -0
- package/lib/v2/ndss-symposium/radar.js +13 -0
- package/lib/v2/ndss-symposium/router.js +3 -0
- package/lib/v2/nextapple/realtime.js +1 -1
- package/lib/v2/nintendo/direct.js +31 -0
- package/lib/v2/nintendo/eshop_cn.js +44 -0
- package/lib/v2/nintendo/eshop_hk.js +79 -0
- package/lib/v2/nintendo/eshop_jp.js +34 -0
- package/lib/v2/nintendo/eshop_us.js +32 -0
- package/lib/v2/nintendo/maintainer.js +7 -0
- package/lib/v2/nintendo/news.js +23 -0
- package/lib/v2/nintendo/news_china.js +35 -0
- package/lib/v2/nintendo/radar.js +70 -0
- package/lib/v2/nintendo/router.js +10 -0
- package/lib/{routes → v2}/nintendo/system-update.js +2 -2
- package/lib/v2/nintendo/templates/direct.art +6 -0
- package/lib/v2/nintendo/templates/eshop_cn.art +21 -0
- package/lib/v2/nintendo/templates/eshop_hk.art +61 -0
- package/lib/v2/nintendo/templates/eshop_jp.art +3 -0
- package/lib/v2/nintendo/templates/eshop_us.art +24 -0
- package/lib/{routes → v2}/nintendo/utils.js +34 -50
- package/lib/v2/njxzc/home.js +13 -9
- package/lib/v2/nmtv/column.js +53 -0
- package/lib/v2/nmtv/maintainer.js +3 -0
- package/lib/v2/nmtv/radar.js +13 -0
- package/lib/v2/nmtv/router.js +3 -0
- package/lib/v2/nmtv/templates/description.art +9 -0
- package/lib/v2/nua/lib.js +39 -0
- package/lib/v2/nua/maintainer.js +1 -0
- package/lib/v2/nua/radar.js +8 -0
- package/lib/v2/nua/router.js +1 -0
- package/lib/v2/nua/utils.js +7 -12
- package/lib/v2/nuaa/utils/pypasswaf.js +3 -2
- package/lib/v2/nyaa/main.js +16 -23
- package/lib/v2/nyaa/maintainer.js +7 -4
- package/lib/v2/nyaa/radar.js +27 -29
- package/lib/v2/nyaa/router.js +4 -2
- package/lib/v2/odaily/post.js +15 -20
- package/lib/v2/odaily/utils.js +1 -1
- package/lib/v2/paradigm/maintainer.js +3 -0
- package/lib/v2/paradigm/radar.js +13 -0
- package/lib/v2/paradigm/router.js +3 -0
- package/lib/v2/paradigm/writing.js +44 -0
- package/lib/v2/picuki/maintainer.js +1 -1
- package/lib/v2/picuki/profile.js +10 -8
- package/lib/v2/picuki/utils.js +21 -0
- package/lib/v2/pixiv/api/getRanking.js +1 -1
- package/lib/v2/pixiv/ranking.js +3 -0
- package/lib/v2/producthunt/templates/descImg.art +2 -2
- package/lib/v2/qlu/maintainer.js +3 -0
- package/lib/v2/qlu/notice.js +54 -0
- package/lib/v2/qlu/radar.js +13 -0
- package/lib/v2/qlu/router.js +3 -0
- package/lib/v2/reactnewsletter/maintainer.js +4 -0
- package/lib/v2/reactnewsletter/radar.js +13 -0
- package/lib/v2/reactnewsletter/reactnewsletter.js +25 -0
- package/lib/v2/reactnewsletter/router.js +3 -0
- package/lib/v2/researchgate/maintainer.js +3 -0
- package/lib/v2/researchgate/publications.js +70 -0
- package/lib/v2/researchgate/radar.js +13 -0
- package/lib/v2/researchgate/router.js +3 -0
- package/lib/v2/saraba1st/digest.js +79 -0
- package/lib/v2/saraba1st/maintainer.js +1 -0
- package/lib/v2/saraba1st/radar.js +12 -3
- package/lib/v2/saraba1st/router.js +1 -0
- package/lib/v2/saraba1st/templates/digest.art +5 -0
- package/lib/v2/sctv/maintainer.js +1 -1
- package/lib/v2/sctv/programme.js +39 -17
- package/lib/v2/sctv/router.js +1 -1
- package/lib/v2/shmtu/jwc.js +57 -0
- package/lib/v2/shmtu/maintainer.js +5 -0
- package/lib/v2/shmtu/portal.js +81 -0
- package/lib/v2/shmtu/radar.js +29 -0
- package/lib/v2/shmtu/router.js +5 -0
- package/lib/v2/shmtu/templates/portal.art +30 -0
- package/lib/v2/shmtu/www.js +58 -0
- package/lib/v2/sigsac/ccs.js +57 -0
- package/lib/v2/sigsac/maintainer.js +3 -0
- package/lib/v2/sigsac/radar.js +13 -0
- package/lib/v2/sigsac/router.js +3 -0
- package/lib/v2/simpleinfo/index.js +50 -0
- package/lib/v2/simpleinfo/maintainer.js +3 -0
- package/lib/v2/simpleinfo/radar.js +19 -0
- package/lib/v2/simpleinfo/router.js +3 -0
- package/lib/v2/simpleinfo/templates/description.art +6 -0
- package/lib/v2/sse/maintainer.js +1 -1
- package/lib/v2/telegram/channel.js +54 -38
- package/lib/v2/tencent/maintainer.js +2 -0
- package/lib/v2/tencent/news/coronavirus/data.js +71 -0
- package/lib/v2/tencent/news/coronavirus/total.js +34 -0
- package/lib/v2/tencent/news/coronavirus/utils.js +17 -0
- package/lib/v2/tencent/radar.js +8 -0
- package/lib/v2/tencent/router.js +2 -0
- package/lib/v2/tencent/templates/coronavirus/chinaTotal.art +6 -0
- package/lib/v2/tencent/templates/coronavirus/data.art +4 -0
- package/lib/v2/test/index.js +8 -0
- package/lib/v2/theverge/index.js +9 -1
- package/lib/v2/theverge/maintainer.js +1 -1
- package/lib/v2/theverge/radar.js +2 -2
- package/lib/v2/theverge/router.js +1 -1
- package/lib/v2/tingshuitz/changsha.js +43 -0
- package/lib/v2/tingshuitz/maintainer.js +1 -0
- package/lib/v2/tingshuitz/radar.js +10 -0
- package/lib/v2/tingshuitz/router.js +1 -0
- package/lib/v2/twitter/web-api/twitter-api.js +19 -15
- package/lib/v2/twreporter/category.js +17 -8
- package/lib/v2/uber/blog.js +59 -0
- package/lib/v2/uber/maintainer.js +3 -0
- package/lib/v2/uber/radar.js +13 -0
- package/lib/v2/uber/router.js +3 -0
- package/lib/v2/usenix/maintainer.js +3 -0
- package/lib/v2/usenix/radar.js +13 -0
- package/lib/v2/usenix/router.js +3 -0
- package/lib/v2/usenix/usenix.js +63 -0
- package/lib/v2/usepanda/index.js +26 -0
- package/lib/v2/usepanda/maintainer.js +3 -0
- package/lib/v2/usepanda/radar.js +11 -0
- package/lib/v2/usepanda/router.js +3 -0
- package/lib/v2/uw/gix/news.js +67 -0
- package/lib/v2/uw/maintainer.js +3 -0
- package/lib/v2/uw/radar.js +13 -0
- package/lib/v2/uw/router.js +3 -0
- package/lib/v2/verse/articles.js +42 -0
- package/lib/v2/verse/maintainer.js +3 -0
- package/lib/v2/verse/radar.js +13 -0
- package/lib/v2/verse/router.js +3 -0
- package/lib/{routes → v2}/weibo/keyword.js +2 -2
- package/lib/v2/weibo/maintainer.js +8 -0
- package/lib/v2/weibo/oasis/user.js +20 -0
- package/lib/v2/weibo/radar.js +48 -0
- package/lib/v2/weibo/router.js +8 -0
- package/lib/{routes → v2}/weibo/search/hot.js +2 -0
- package/lib/{routes → v2}/weibo/super_index.js +2 -2
- package/lib/{routes → v2}/weibo/timeline.js +2 -2
- package/lib/{routes → v2}/weibo/user.js +2 -2
- package/lib/{routes → v2}/weibo/utils.js +49 -14
- package/lib/v2/ymgal/article.js +61 -0
- package/lib/v2/ymgal/game.js +41 -0
- package/lib/v2/ymgal/maintainer.js +4 -0
- package/lib/v2/ymgal/radar.js +31 -0
- package/lib/v2/ymgal/router.js +4 -0
- package/lib/v2/ymgal/templates/description.art +7 -0
- package/lib/v2/zhihu/pin/utils.js +49 -41
- package/package.json +26 -27
- package/lib/routes/blogs/foreverblog.js +0 -33
- package/lib/routes/gov/zhengce/govall.js +0 -59
- package/lib/routes/gov/zhengce/wenjian.js +0 -53
- package/lib/routes/gov/zhengce/zuixin.js +0 -42
- package/lib/routes/langlive/room.js +0 -33
- package/lib/routes/nautilus/topics.js +0 -45
- package/lib/routes/nintendo/direct.js +0 -34
- package/lib/routes/nintendo/eshop_cn.js +0 -51
- package/lib/routes/nintendo/eshop_hk.js +0 -26
- package/lib/routes/nintendo/eshop_jp.js +0 -20
- package/lib/routes/nintendo/eshop_us.js +0 -36
- package/lib/routes/nintendo/news.js +0 -25
- package/lib/routes/nintendo/news_china.js +0 -41
- package/lib/routes/researchgate/publications.js +0 -60
- package/lib/routes/universities/ecnuyjs/ecnuyjs.js +0 -23
- package/lib/routes/universities/shmtu/jwc.js +0 -75
- package/lib/routes/universities/shmtu/www.js +0 -61
- package/lib/routes/weibo/oasis/user.js +0 -17
- package/lib/v2/acm-ecnu/maintainer.js +0 -3
- package/lib/v2/acm-ecnu/radar.js +0 -19
- package/lib/v2/acm-ecnu/router.js +0 -3
- package/lib/v2/cnbeta/index.js +0 -16
- package/lib/v2/heu/job/bigemploy.js +0 -42
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
const { getData } = require('./utils');
|
|
2
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
3
|
+
const { art } = require('@/utils/render');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
|
|
6
|
+
module.exports = async (ctx) => {
|
|
7
|
+
const province = ctx.params.province || '';
|
|
8
|
+
const city = ctx.params.city || '';
|
|
9
|
+
|
|
10
|
+
const link = 'https://news.qq.com/zt2020/page/feiyan.htm#/';
|
|
11
|
+
const item = [];
|
|
12
|
+
|
|
13
|
+
const diseaseh5Shelf = (await getData(['diseaseh5Shelf']))?.data?.diseaseh5Shelf || {};
|
|
14
|
+
const { lastUpdateTime, areaTree } = diseaseh5Shelf;
|
|
15
|
+
const nationalData = areaTree?.[0];
|
|
16
|
+
const provinceList = nationalData?.children;
|
|
17
|
+
|
|
18
|
+
let todayConfirm = 0;
|
|
19
|
+
let totalNowConfirm = 0;
|
|
20
|
+
let totalConfirm = 0;
|
|
21
|
+
let totalDead = 0;
|
|
22
|
+
let coronavirusData = {};
|
|
23
|
+
let placeName = '';
|
|
24
|
+
|
|
25
|
+
if (!province || province === '中国' || province === '全国') {
|
|
26
|
+
// 没有传参则取全国
|
|
27
|
+
coronavirusData = nationalData;
|
|
28
|
+
placeName = '中国';
|
|
29
|
+
} else {
|
|
30
|
+
// 分省份获取
|
|
31
|
+
coronavirusData = provinceList?.find((e) => e.name === province);
|
|
32
|
+
placeName = province;
|
|
33
|
+
if (city) {
|
|
34
|
+
// 继续获取 区县 数据
|
|
35
|
+
coronavirusData = coronavirusData?.children?.find((e) => e.name === city);
|
|
36
|
+
if (coronavirusData) {
|
|
37
|
+
placeName = `${province}-${city}`;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
if (!coronavirusData) {
|
|
42
|
+
throw new Error(`未找到 ${placeName} 的疫情数据,请检查输入的省市名称是否正确`);
|
|
43
|
+
}
|
|
44
|
+
todayConfirm = coronavirusData.today?.confirm;
|
|
45
|
+
totalNowConfirm = coronavirusData.total?.nowConfirm;
|
|
46
|
+
totalConfirm = coronavirusData.total?.confirm;
|
|
47
|
+
totalDead = coronavirusData.total?.dead;
|
|
48
|
+
const pubDate = parseDate(coronavirusData.total?.mtime || lastUpdateTime);
|
|
49
|
+
|
|
50
|
+
const title = `${placeName} - 腾讯新闻 - 新型冠状病毒肺炎疫情实时追踪`;
|
|
51
|
+
|
|
52
|
+
const info = {
|
|
53
|
+
title: `${placeName} - 疫情数据`,
|
|
54
|
+
description: art(path.join(__dirname, '../../templates/coronavirus/data.art'), {
|
|
55
|
+
todayConfirm,
|
|
56
|
+
totalNowConfirm,
|
|
57
|
+
totalConfirm,
|
|
58
|
+
totalDead,
|
|
59
|
+
}),
|
|
60
|
+
pubDate,
|
|
61
|
+
guid: `${link}${placeName}?pubDate=${pubDate.toISOString()}`,
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
item.push(info);
|
|
65
|
+
|
|
66
|
+
ctx.state.data = {
|
|
67
|
+
title,
|
|
68
|
+
link,
|
|
69
|
+
item,
|
|
70
|
+
};
|
|
71
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const { getData } = require('./utils');
|
|
2
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
3
|
+
const { art } = require('@/utils/render');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
|
|
6
|
+
module.exports = async (ctx) => {
|
|
7
|
+
const title = '腾讯新闻 - 新型冠状病毒肺炎疫情实时追踪';
|
|
8
|
+
const link = 'https://news.qq.com/zt2020/page/feiyan.htm#/';
|
|
9
|
+
const item = [];
|
|
10
|
+
|
|
11
|
+
const chinaTotal = (await getData(['diseaseh5Shelf']))?.data?.diseaseh5Shelf?.chinaTotal || {};
|
|
12
|
+
const { localConfirmH5, localWzzAdd, confirmAdd, localConfirm, nowLocalWzz, highRiskAreaNum, mtime } = chinaTotal;
|
|
13
|
+
const pubDate = parseDate(mtime);
|
|
14
|
+
const info = {
|
|
15
|
+
title: '中国本土数据统计',
|
|
16
|
+
description: art(path.join(__dirname, '../../templates/coronavirus/chinaTotal.art'), {
|
|
17
|
+
localConfirmH5,
|
|
18
|
+
localWzzAdd,
|
|
19
|
+
confirmAdd,
|
|
20
|
+
localConfirm,
|
|
21
|
+
nowLocalWzz,
|
|
22
|
+
highRiskAreaNum,
|
|
23
|
+
}),
|
|
24
|
+
pubDate,
|
|
25
|
+
guid: `${link}total?pubDate=${pubDate.toISOString()}`,
|
|
26
|
+
};
|
|
27
|
+
item.push(info);
|
|
28
|
+
|
|
29
|
+
ctx.state.data = {
|
|
30
|
+
title,
|
|
31
|
+
link,
|
|
32
|
+
item,
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
* @author CaoMeiYouRen
|
|
7
|
+
* @date 2022-12-18
|
|
8
|
+
* @param {string[]} [modules=[]] localCityNCOVDataList,diseaseh5Shelf,nowConfirmStatis,provinceCompare,FAutoforeignList,FAutoCountryConfirmAdd,WomWorld,WomAboard,VaccineTopData
|
|
9
|
+
*/
|
|
10
|
+
const getData = async (modules = []) => {
|
|
11
|
+
const response = await got('https://api.inews.qq.com/newsqa/v1/query/inner/publish/modules/list?modules=' + modules.join(','));
|
|
12
|
+
return response.data;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
module.exports = {
|
|
16
|
+
getData,
|
|
17
|
+
};
|
package/lib/v2/tencent/radar.js
CHANGED
|
@@ -27,6 +27,14 @@ module.exports = {
|
|
|
27
27
|
target: (params, url) => `/wechat/mp/msgalbum/${new URL(url).searchParams.get('__biz')}/${new URL(url).searchParams.get('album_id')}`,
|
|
28
28
|
},
|
|
29
29
|
],
|
|
30
|
+
news: [
|
|
31
|
+
{
|
|
32
|
+
title: '腾讯新闻 - 新型冠状病毒肺炎疫情实时追踪',
|
|
33
|
+
docs: 'https://docs.rsshub.app/other.html#xin-guan-fei-yan-yi-qing-xin-wen-dong-tai',
|
|
34
|
+
source: ['/zt2020/page/feiyan.htm#/'],
|
|
35
|
+
target: '/tencent/news/coronavirus/total',
|
|
36
|
+
},
|
|
37
|
+
],
|
|
30
38
|
pvp: [
|
|
31
39
|
{
|
|
32
40
|
title: '王者荣耀 - 新闻中心',
|
package/lib/v2/tencent/router.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
module.exports = (router) => {
|
|
2
2
|
router.get('/cloud/column/:id?/:tag?', require('./cloud/column'));
|
|
3
|
+
router.get('/news/coronavirus/data/:province?/:city?', require('./news/coronavirus/data'));
|
|
4
|
+
router.get('/news/coronavirus/total', require('./news/coronavirus/total'));
|
|
3
5
|
router.get('/pvp/newsindex/:type', require('./pvp/newsindex'));
|
|
4
6
|
router.get('/qq/sdk/changelog/:platform', require('./qq/sdk/changelog'));
|
|
5
7
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<p>本土确诊:</p><p>+{{@localConfirmH5}}</p></br>
|
|
2
|
+
<p>本土无症状:</p><p>+{{@localWzzAdd}}</p></br>
|
|
3
|
+
<p>确诊病例:</p><p>+{{@confirmAdd}}</p></br>
|
|
4
|
+
<p>现有本土确诊:</p><p>{{@localConfirm}}</p></br>
|
|
5
|
+
<p>现有本土无症状:</p><p>{{@nowLocalWzz}}</p></br>
|
|
6
|
+
<p>高风险地区:</p><p>{{@highRiskAreaNum}}</p></br>
|
package/lib/v2/test/index.js
CHANGED
|
@@ -33,6 +33,14 @@ module.exports = async (ctx) => {
|
|
|
33
33
|
author: `DIYgod0`,
|
|
34
34
|
category: ['Category0', 'Category1', 'Category2'],
|
|
35
35
|
},
|
|
36
|
+
{
|
|
37
|
+
title: 'Filter Title3',
|
|
38
|
+
description: 'Description3',
|
|
39
|
+
pubDate: new Date(`2019-3-1`).toUTCString(),
|
|
40
|
+
link: `https://github.com/DIYgod/RSSHub/issues/1`,
|
|
41
|
+
author: `DIYgod0`,
|
|
42
|
+
category: 'Category3',
|
|
43
|
+
},
|
|
36
44
|
];
|
|
37
45
|
} else if (ctx.params.id === 'long') {
|
|
38
46
|
item.push({
|
package/lib/v2/theverge/index.js
CHANGED
|
@@ -3,7 +3,15 @@ const parser = require('@/utils/rss-parser');
|
|
|
3
3
|
const cheerio = require('cheerio');
|
|
4
4
|
|
|
5
5
|
module.exports = async (ctx) => {
|
|
6
|
-
|
|
6
|
+
let link;
|
|
7
|
+
|
|
8
|
+
if (ctx.params.hub) {
|
|
9
|
+
link = `https://www.theverge.com/${ctx.params.hub}/rss/index.xml`;
|
|
10
|
+
} else {
|
|
11
|
+
link = 'https://www.theverge.com/rss/index.xml';
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const feed = await parser.parseURL(link);
|
|
7
15
|
|
|
8
16
|
const items = await Promise.all(
|
|
9
17
|
feed.items.map((item) =>
|
package/lib/v2/theverge/radar.js
CHANGED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
4
|
+
const baseUrl = 'http://www.supplywater.com';
|
|
5
|
+
|
|
6
|
+
module.exports = async (ctx) => {
|
|
7
|
+
const { channelId = 78 } = ctx.params;
|
|
8
|
+
const listPage = await got('http://www.supplywater.com/tstz-' + channelId + '.aspx');
|
|
9
|
+
const $ = cheerio.load(listPage.data);
|
|
10
|
+
const pageName = $('.mainRightBox .news-title').text();
|
|
11
|
+
const list = $('.mainRightBox .announcements-title a')
|
|
12
|
+
.map((_, item) => {
|
|
13
|
+
item = $(item);
|
|
14
|
+
|
|
15
|
+
return {
|
|
16
|
+
title: item.text().trim(),
|
|
17
|
+
link: baseUrl + item.attr('href').trim(),
|
|
18
|
+
};
|
|
19
|
+
})
|
|
20
|
+
.get();
|
|
21
|
+
|
|
22
|
+
const items = await Promise.all(
|
|
23
|
+
list.map(async (item) => {
|
|
24
|
+
const postPage = await got(item.link);
|
|
25
|
+
const $ = cheerio.load(postPage.data);
|
|
26
|
+
|
|
27
|
+
const data = {
|
|
28
|
+
title: item.title,
|
|
29
|
+
description: $('.mainRightBox div:last').html().trim(),
|
|
30
|
+
pubDate: parseDate($('.mainRightBox .gxsj span:first').text() + ' +0800', 'YYYY/M/D H:m:s ZZ'),
|
|
31
|
+
link: item.link,
|
|
32
|
+
author: $('.mainRightBox .gxsj span:last').text(),
|
|
33
|
+
};
|
|
34
|
+
return data;
|
|
35
|
+
})
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
ctx.state.data = {
|
|
39
|
+
title: `${pageName}通知 - 长沙水业集团`,
|
|
40
|
+
link: `${baseUrl}/fuwuzhinan.aspx`,
|
|
41
|
+
item: items,
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -32,6 +32,16 @@ module.exports = {
|
|
|
32
32
|
},
|
|
33
33
|
],
|
|
34
34
|
},
|
|
35
|
+
'supplywater.com': {
|
|
36
|
+
_name: '停水通知',
|
|
37
|
+
www: [
|
|
38
|
+
{
|
|
39
|
+
title: '长沙市',
|
|
40
|
+
docs: 'https://docs.rsshub.app/forecast.html#ting-shui-tong-zhi',
|
|
41
|
+
source: ['/*'],
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
},
|
|
35
45
|
'whwater.com': {
|
|
36
46
|
_name: '停水通知',
|
|
37
47
|
'.': [
|
|
@@ -115,24 +115,28 @@ function gatherLegacyFromData(entries, filter = 'tweet-') {
|
|
|
115
115
|
const tweets = [];
|
|
116
116
|
entries.forEach((entry) => {
|
|
117
117
|
if (entry.entryId && entry.entryId.includes(filter)) {
|
|
118
|
-
const tweet = entry.content.itemContent.tweet_results
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
118
|
+
const tweet = entry.content.itemContent.tweet_results?.result;
|
|
119
|
+
if (tweet) {
|
|
120
|
+
const retweet = tweet.legacy?.retweeted_status_result?.result;
|
|
121
|
+
for (const t of [tweet, retweet]) {
|
|
122
|
+
if (!t?.legacy) {
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
t.legacy.user = t.core.user_results.result.legacy;
|
|
126
|
+
const quote = t.quoted_status_result?.result;
|
|
127
|
+
if (quote) {
|
|
128
|
+
t.legacy.quoted_status = quote.legacy;
|
|
129
|
+
t.legacy.quoted_status.user = quote.core.user_results.result.legacy;
|
|
130
|
+
}
|
|
123
131
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
132
|
+
const legacy = tweet.legacy;
|
|
133
|
+
if (legacy) {
|
|
134
|
+
if (retweet) {
|
|
135
|
+
legacy.retweeted_status = retweet.legacy;
|
|
136
|
+
}
|
|
137
|
+
tweets.push(legacy);
|
|
129
138
|
}
|
|
130
139
|
}
|
|
131
|
-
const legacy = tweet.legacy;
|
|
132
|
-
if (retweet) {
|
|
133
|
-
legacy.retweeted_status = retweet.legacy;
|
|
134
|
-
}
|
|
135
|
-
tweets.push(legacy);
|
|
136
140
|
}
|
|
137
141
|
});
|
|
138
142
|
return tweets;
|
|
@@ -8,16 +8,25 @@ module.exports = async (ctx) => {
|
|
|
8
8
|
const url = baseURL + `/categories/${ctx.params.cid}`;
|
|
9
9
|
const res = await got(url);
|
|
10
10
|
const $ = cheerio.load(res.data);
|
|
11
|
-
const
|
|
12
|
-
const
|
|
11
|
+
const regexp = /^window\.__REDUX_STATE__=(.*);$/gm;
|
|
12
|
+
const raw = $('script[charset="UTF-8"]').html().replace(regexp, '$1');
|
|
13
|
+
const list = JSON.parse(raw);
|
|
14
|
+
const ids = list.entities.posts.allIds;
|
|
15
|
+
|
|
16
|
+
const links = [];
|
|
17
|
+
const titles = [];
|
|
18
|
+
const category = list.entities.posts.byId[ids[0]].categories[0].name;
|
|
19
|
+
|
|
20
|
+
for (const id of ids) {
|
|
21
|
+
links.push(baseURL + '/a/' + list.entities.posts.byId[id].slug);
|
|
22
|
+
titles.push(list.entities.posts.byId[id].title);
|
|
23
|
+
}
|
|
13
24
|
|
|
14
25
|
const out = await Promise.all(
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return ctx.cache.tryGet(address, async () => {
|
|
20
|
-
const single = await fetch(address);
|
|
26
|
+
links.map((item, index) => {
|
|
27
|
+
const title = titles[index];
|
|
28
|
+
return ctx.cache.tryGet(item, async () => {
|
|
29
|
+
const single = await fetch(item);
|
|
21
30
|
single.title = title;
|
|
22
31
|
return single;
|
|
23
32
|
});
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
3
|
+
|
|
4
|
+
const rootURL = 'https://www.uber.com';
|
|
5
|
+
const apiURL = 'https://blogapi.uber.com';
|
|
6
|
+
|
|
7
|
+
module.exports = async (ctx) => {
|
|
8
|
+
let maxPage = Number(ctx.params.maxPage);
|
|
9
|
+
if (Number.isNaN(maxPage)) {
|
|
10
|
+
maxPage = 1;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
let pages = await Promise.all(
|
|
14
|
+
[...Array(maxPage).keys()].map((pageIdx) =>
|
|
15
|
+
got(`${apiURL}/wp-json/blog/v1/data`, {
|
|
16
|
+
searchParams: {
|
|
17
|
+
page: pageIdx + 1,
|
|
18
|
+
parent: 'pittsburgh',
|
|
19
|
+
slug: 'engineering',
|
|
20
|
+
},
|
|
21
|
+
})
|
|
22
|
+
)
|
|
23
|
+
);
|
|
24
|
+
pages = pages.map((page) => page.data);
|
|
25
|
+
|
|
26
|
+
const result = await Promise.all(
|
|
27
|
+
pages.map(
|
|
28
|
+
async (page) =>
|
|
29
|
+
await Promise.all(
|
|
30
|
+
page.posts.map((post) =>
|
|
31
|
+
ctx.cache.tryGet(`${rootURL}${post.link}`, async () => {
|
|
32
|
+
let { data: article } = await got(`${apiURL}/wp-json/blog/v1/data`, {
|
|
33
|
+
searchParams: {
|
|
34
|
+
slug: post.link.replace(/\//g, '').replace('blog', ''),
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
article = article.article;
|
|
38
|
+
|
|
39
|
+
return {
|
|
40
|
+
link: article.link,
|
|
41
|
+
title: article.title,
|
|
42
|
+
description: article.content,
|
|
43
|
+
pubDate: parseDate(article.created),
|
|
44
|
+
author: article.author,
|
|
45
|
+
category: article.categories.map((category) => category.category_name),
|
|
46
|
+
};
|
|
47
|
+
})
|
|
48
|
+
)
|
|
49
|
+
)
|
|
50
|
+
)
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
ctx.state.data = {
|
|
54
|
+
title: `Uber Engineering Blog`,
|
|
55
|
+
link: rootURL + '/blog/engineering',
|
|
56
|
+
description: 'The technology behind Uber Engineering',
|
|
57
|
+
item: result.flat(),
|
|
58
|
+
};
|
|
59
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'usenix.org': {
|
|
3
|
+
_name: 'USENIX',
|
|
4
|
+
'.': [
|
|
5
|
+
{
|
|
6
|
+
title: 'Security Symposia',
|
|
7
|
+
docs: 'https://docs.rsshub.app/journal.html#usenix',
|
|
8
|
+
source: ['/conferences/all', '/conferences', '/'],
|
|
9
|
+
target: '/usenix/usenix-security-sympoium',
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
|
+
},
|
|
13
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const url = 'https://www.usenix.org';
|
|
4
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
5
|
+
|
|
6
|
+
const seasons = ['spring', 'summer', 'fall', 'winter'];
|
|
7
|
+
|
|
8
|
+
module.exports = async (ctx) => {
|
|
9
|
+
const last = new Date().getFullYear() + 1;
|
|
10
|
+
const urlList = Array.from({ length: last - 2020 }, (_, v) => `${url}/conference/usenixsecurity${v + 20}`)
|
|
11
|
+
.map((url) => seasons.map((season) => `${url}/${season}-accepted-papers`))
|
|
12
|
+
.flat();
|
|
13
|
+
const responses = await got.all(
|
|
14
|
+
urlList.map(async (url) => {
|
|
15
|
+
let res;
|
|
16
|
+
try {
|
|
17
|
+
res = await got(url);
|
|
18
|
+
} catch (e) {
|
|
19
|
+
// ignore 404
|
|
20
|
+
}
|
|
21
|
+
return res;
|
|
22
|
+
})
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
const list = responses
|
|
26
|
+
.filter((element) => element)
|
|
27
|
+
.map((response) => {
|
|
28
|
+
const $ = cheerio.load(response.data);
|
|
29
|
+
const pubDate = parseDate($('meta[property=article:modified_time]').attr('content'));
|
|
30
|
+
return $('article.node-paper')
|
|
31
|
+
.toArray()
|
|
32
|
+
.map((item) => {
|
|
33
|
+
item = $(item);
|
|
34
|
+
return {
|
|
35
|
+
title: item.find('h2.node-title > a').text().trim(),
|
|
36
|
+
link: `${url}${item.find('h2.node-title > a').attr('href')}`,
|
|
37
|
+
author: item.find('div.field.field-name-field-paper-people-text.field-type-text-long.field-label-hidden p').text().trim(),
|
|
38
|
+
pubDate,
|
|
39
|
+
};
|
|
40
|
+
});
|
|
41
|
+
})
|
|
42
|
+
.flat();
|
|
43
|
+
|
|
44
|
+
const items = await Promise.all(
|
|
45
|
+
list.map((item) =>
|
|
46
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
47
|
+
const response = await got(item.link);
|
|
48
|
+
const $ = cheerio.load(response.data);
|
|
49
|
+
item.description = $('.content').html();
|
|
50
|
+
|
|
51
|
+
return item;
|
|
52
|
+
})
|
|
53
|
+
)
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
ctx.state.data = {
|
|
57
|
+
title: 'USENIX',
|
|
58
|
+
link: url,
|
|
59
|
+
description: 'USENIX Security Symposium Accpeted Papers',
|
|
60
|
+
allowEmpty: true,
|
|
61
|
+
item: items,
|
|
62
|
+
};
|
|
63
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
3
|
+
|
|
4
|
+
module.exports = async (ctx) => {
|
|
5
|
+
const feedId = ctx.params.id;
|
|
6
|
+
const limit = ctx.query.limit ?? 30; // 默认30条
|
|
7
|
+
|
|
8
|
+
const rootUrl = 'https://api-panda.com/v4/';
|
|
9
|
+
const apiUrl = `${rootUrl}articles?feeds=${feedId}&limit=${limit}&page=1&sort=popular`;
|
|
10
|
+
|
|
11
|
+
const { data } = await got(apiUrl);
|
|
12
|
+
|
|
13
|
+
const items = data.map((item) => ({
|
|
14
|
+
title: `${item.title} 🌟 ${item.source.likesCount}`,
|
|
15
|
+
author: item.source.username,
|
|
16
|
+
pubDate: parseDate(item.source.createdAt),
|
|
17
|
+
link: item.source.targetUrl,
|
|
18
|
+
description: item.description,
|
|
19
|
+
}));
|
|
20
|
+
|
|
21
|
+
ctx.state.data = {
|
|
22
|
+
title: 'Panda Feeds',
|
|
23
|
+
link: 'https://usepanda.com/',
|
|
24
|
+
item: items,
|
|
25
|
+
};
|
|
26
|
+
};
|