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,57 @@
|
|
|
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 host = 'https://jwc.shmtu.edu.cn';
|
|
6
|
+
|
|
7
|
+
async function load(link) {
|
|
8
|
+
const response = await got(link, { https: { rejectUnauthorized: false } });
|
|
9
|
+
const $ = cheerio.load(response.data);
|
|
10
|
+
|
|
11
|
+
return $('.wp_articlecontent').html();
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const ProcessFeed = (list, caches) =>
|
|
15
|
+
Promise.all(
|
|
16
|
+
list.map((item) =>
|
|
17
|
+
caches.tryGet(item.link, async () => {
|
|
18
|
+
item.description = await load(item.link);
|
|
19
|
+
return item;
|
|
20
|
+
})
|
|
21
|
+
)
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
module.exports = async (ctx) => {
|
|
25
|
+
const type = ctx.params.type;
|
|
26
|
+
const info = type === 'jwgg' ? '教务公告' : '教务新闻';
|
|
27
|
+
|
|
28
|
+
const response = await got(`${host}/${type}/list.htm`, {
|
|
29
|
+
headers: {
|
|
30
|
+
Referer: host,
|
|
31
|
+
},
|
|
32
|
+
https: { rejectUnauthorized: false },
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
const $ = cheerio.load(response.data);
|
|
36
|
+
const list = $('tbody tr')
|
|
37
|
+
.toArray()
|
|
38
|
+
.map((item) => {
|
|
39
|
+
item = $(item);
|
|
40
|
+
return {
|
|
41
|
+
title: item.find('.views-field-nothing a').attr('title').trim(),
|
|
42
|
+
link: new URL(item.find('a').attr('href'), host).href,
|
|
43
|
+
pubDate: timezone(parseDate(item.find('.pubdate').text()), 8),
|
|
44
|
+
category: item.find('.views-field-field-xxlb').text(),
|
|
45
|
+
author: item.find('.views-field-field-xxly').text(),
|
|
46
|
+
};
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
const result = await ProcessFeed(list, ctx.cache);
|
|
50
|
+
|
|
51
|
+
ctx.state.data = {
|
|
52
|
+
title: `上海海事大学 ${info}`,
|
|
53
|
+
link: `${host}/${type}`,
|
|
54
|
+
description: '上海海事大学 教务信息',
|
|
55
|
+
item: result,
|
|
56
|
+
};
|
|
57
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
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 path = require('path');
|
|
6
|
+
const { art } = require('@/utils/render');
|
|
7
|
+
|
|
8
|
+
const bootstrapHost = 'https://weixin.shmtu.edu.cn/dynamic/shmtuHttps';
|
|
9
|
+
const host = 'https://portal.shmtu.edu.cn/api';
|
|
10
|
+
|
|
11
|
+
const loadDetail = async (link) => {
|
|
12
|
+
const response = await got.post(bootstrapHost, {
|
|
13
|
+
form: {
|
|
14
|
+
interfaceUrl: link,
|
|
15
|
+
},
|
|
16
|
+
https: { rejectUnauthorized: false },
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
return JSON.parse(response.data);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const processFeed = (list, caches) =>
|
|
23
|
+
Promise.all(
|
|
24
|
+
list.map((item) =>
|
|
25
|
+
caches.tryGet(item.link, async () => {
|
|
26
|
+
const detail = await loadDetail(item.link);
|
|
27
|
+
const files = detail.field_file;
|
|
28
|
+
const images = detail.field_image;
|
|
29
|
+
item.description = art(path.join(__dirname, 'templates/portal.art'), {
|
|
30
|
+
body: detail.body.und[0].safe_value,
|
|
31
|
+
images: images.length !== 0 && Object.keys(images).length !== 0 ? images.und : null,
|
|
32
|
+
files: files.length !== 0 && Object.keys(files).length !== 0 ? files.und : null,
|
|
33
|
+
});
|
|
34
|
+
item.link = detail.path;
|
|
35
|
+
return item;
|
|
36
|
+
})
|
|
37
|
+
)
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
module.exports = async (ctx) => {
|
|
41
|
+
const type = ctx.params.type;
|
|
42
|
+
let info;
|
|
43
|
+
switch (type) {
|
|
44
|
+
case 'bmtzgg':
|
|
45
|
+
info = '部门通知公告';
|
|
46
|
+
break;
|
|
47
|
+
case 'xsydxhdgg':
|
|
48
|
+
info = '学术与大型活动公告';
|
|
49
|
+
break;
|
|
50
|
+
case 'bmdt':
|
|
51
|
+
info = '部门动态';
|
|
52
|
+
break;
|
|
53
|
+
default:
|
|
54
|
+
info = '未知';
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const response = await got.post(bootstrapHost, {
|
|
59
|
+
form: {
|
|
60
|
+
interfaceUrl: `${host}/${type}.json?page=0`,
|
|
61
|
+
},
|
|
62
|
+
https: { rejectUnauthorized: false },
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
const list = JSON.parse(response.data).map((item) => ({
|
|
66
|
+
title: cheerio.load(item.title).text(),
|
|
67
|
+
link: `${host}/node/${item.nid}.json`,
|
|
68
|
+
pubDate: timezone(parseDate(item.created), 8),
|
|
69
|
+
category: item.field_department[0],
|
|
70
|
+
author: item.field_department[0],
|
|
71
|
+
}));
|
|
72
|
+
|
|
73
|
+
const result = await processFeed(list, ctx.cache);
|
|
74
|
+
|
|
75
|
+
ctx.state.data = {
|
|
76
|
+
title: `上海海事大学 ${info}`,
|
|
77
|
+
link: 'https://portal.shmtu.edu.cn/bumentongzhigonggao',
|
|
78
|
+
description: '上海海事大学 数字平台',
|
|
79
|
+
item: result,
|
|
80
|
+
};
|
|
81
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'shmtu.edu.cn': {
|
|
3
|
+
_name: '上海海事大学',
|
|
4
|
+
jwc: [
|
|
5
|
+
{
|
|
6
|
+
title: '教务信息',
|
|
7
|
+
docs: 'https://docs.rsshub.app/university.html#shang-hai-dian-li-da-xue',
|
|
8
|
+
source: ['/:type'],
|
|
9
|
+
target: '/shmtu/jwc/:type',
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
|
+
portal: [
|
|
13
|
+
{
|
|
14
|
+
title: '数字平台',
|
|
15
|
+
docs: 'https://docs.rsshub.app/university.html#shang-hai-dian-li-da-xue',
|
|
16
|
+
source: ['/:type'],
|
|
17
|
+
target: '/shmtu/portal/:type',
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
www: [
|
|
21
|
+
{
|
|
22
|
+
title: '官网信息',
|
|
23
|
+
docs: 'https://docs.rsshub.app/university.html#shang-hai-dian-li-da-xue',
|
|
24
|
+
source: ['/:type'],
|
|
25
|
+
target: '/shmtu/www/:type',
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{{@ body}}
|
|
2
|
+
{{if images}}
|
|
3
|
+
<span style="font-size:19px">
|
|
4
|
+
图片:
|
|
5
|
+
</span>
|
|
6
|
+
{{each images image}}
|
|
7
|
+
<figure>
|
|
8
|
+
<img src="https://weixin.shmtu.org/dynamic/getFile?fid={{image.fid}}"
|
|
9
|
+
alt="{{image.filename}}"
|
|
10
|
+
style="margin: 0 auto" />
|
|
11
|
+
<figcaption style="text-align:center;font-size:19px">
|
|
12
|
+
{{image.alt}}
|
|
13
|
+
</figcaption>
|
|
14
|
+
</figure>
|
|
15
|
+
{{/each}}
|
|
16
|
+
{{/if}}
|
|
17
|
+
{{if files}}
|
|
18
|
+
<span style="font-size:19px">
|
|
19
|
+
附件:
|
|
20
|
+
</span>
|
|
21
|
+
{{each files file}}
|
|
22
|
+
<p style="text-indent:32px">
|
|
23
|
+
<span style="font-size:19px">
|
|
24
|
+
<a href="https://weixin.shmtu.org/dynamic/getFile?fid={{file.fid}}" target="_blank">
|
|
25
|
+
{{file.filename}}
|
|
26
|
+
</a>
|
|
27
|
+
</span>
|
|
28
|
+
</p>
|
|
29
|
+
{{/each}}
|
|
30
|
+
{{/if}}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
4
|
+
const host = 'https://www.shmtu.edu.cn';
|
|
5
|
+
|
|
6
|
+
async function load(link) {
|
|
7
|
+
const response = await got.get(link, { https: { rejectUnauthorized: false } });
|
|
8
|
+
const $ = cheerio.load(response.data);
|
|
9
|
+
|
|
10
|
+
return $('article').html();
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const ProcessFeed = (list, caches) =>
|
|
14
|
+
Promise.all(
|
|
15
|
+
list.map((item) =>
|
|
16
|
+
caches.tryGet(item.link, async () => {
|
|
17
|
+
item.description = await load(item.link);
|
|
18
|
+
|
|
19
|
+
return item;
|
|
20
|
+
})
|
|
21
|
+
)
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
module.exports = async (ctx) => {
|
|
25
|
+
const type = ctx.params.type;
|
|
26
|
+
const info = type === 'notes' ? '通知公告' : '学术讲座';
|
|
27
|
+
|
|
28
|
+
const response = await got(`${host}/${type}`, {
|
|
29
|
+
headers: {
|
|
30
|
+
Referer: host,
|
|
31
|
+
},
|
|
32
|
+
https: { rejectUnauthorized: false },
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
const $ = cheerio.load(response.data);
|
|
36
|
+
const list = $('tbody tr')
|
|
37
|
+
.toArray()
|
|
38
|
+
.map((item) => {
|
|
39
|
+
item = $(item);
|
|
40
|
+
const category = item.find('.department').text().trim();
|
|
41
|
+
return {
|
|
42
|
+
title: item.find('.title a').text().trim(),
|
|
43
|
+
link: new URL(item.find('a').attr('href'), host).href,
|
|
44
|
+
pubDate: parseDate(item.find('.date-display-single').attr('content')),
|
|
45
|
+
category,
|
|
46
|
+
author: category,
|
|
47
|
+
};
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
const result = await ProcessFeed(list, ctx.cache);
|
|
51
|
+
|
|
52
|
+
ctx.state.data = {
|
|
53
|
+
title: `上海海事大学 ${info}`,
|
|
54
|
+
link: `${host}/${type}`,
|
|
55
|
+
description: '上海海事大学 官网信息',
|
|
56
|
+
item: result,
|
|
57
|
+
};
|
|
58
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const url = 'https://www.sigsac.org/';
|
|
4
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
5
|
+
// https://www.sigsac.org/ccs/CCS2022/program/accepted-papers.html
|
|
6
|
+
|
|
7
|
+
module.exports = async (ctx) => {
|
|
8
|
+
const last = new Date().getFullYear() + 1;
|
|
9
|
+
const yearList = Array.from({ length: last - 2020 }, (_, v) => `${url}ccs/CCS${v + 2020}/`);
|
|
10
|
+
const yearResponses = await got.all(yearList.map((url) => got(url)));
|
|
11
|
+
|
|
12
|
+
const urlList = yearResponses.map((response) => {
|
|
13
|
+
const $ = cheerio.load(response.data);
|
|
14
|
+
return new URL($('a:contains("Accepted Papers")').attr('href'), response.url).href;
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const responses = await got.all(urlList.map((url) => got(url)));
|
|
18
|
+
|
|
19
|
+
const items = responses.map((response) => {
|
|
20
|
+
const $ = cheerio.load(response.data);
|
|
21
|
+
const link = response.url;
|
|
22
|
+
const paperSection = $('div.papers-item')
|
|
23
|
+
.toArray()
|
|
24
|
+
.map((item) => {
|
|
25
|
+
item = $(item);
|
|
26
|
+
const title = item.find('b').text().trim();
|
|
27
|
+
return {
|
|
28
|
+
title,
|
|
29
|
+
author: item.find('p').text().trim().replaceAll('\n', '').replace(/\s+/g, ' '),
|
|
30
|
+
link: `${link}#${title}`,
|
|
31
|
+
pubDate: parseDate(link.match(/CCS(\d{4})/)[1], 'YYYY'),
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
const paperTable = $('tbody tr')
|
|
35
|
+
.toArray()
|
|
36
|
+
.slice(1) // skip table header
|
|
37
|
+
.map((item) => {
|
|
38
|
+
item = $(item);
|
|
39
|
+
const title = item.find('td').eq(0).text().trim();
|
|
40
|
+
return {
|
|
41
|
+
title,
|
|
42
|
+
author: item.find('td').eq(1).text().trim().replaceAll('\n', '').replace(/\s+/g, ' '),
|
|
43
|
+
link: `${link}#${title}`,
|
|
44
|
+
pubDate: parseDate(link.match(/CCS(\d{4})/)[1], 'YYYY'),
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
return paperSection.length ? paperSection : paperTable;
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
ctx.state.data = {
|
|
51
|
+
title: 'ACM CCS',
|
|
52
|
+
link: url,
|
|
53
|
+
description: 'The ACM Conference on Computer and Communications Security (CCS) Accepted Papers',
|
|
54
|
+
allowEmpty: true,
|
|
55
|
+
item: items.flat(),
|
|
56
|
+
};
|
|
57
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'sigsac.org': {
|
|
3
|
+
_name: 'ACM Special Interest Group on Security Audit and Control',
|
|
4
|
+
'.': [
|
|
5
|
+
{
|
|
6
|
+
title: 'ACM Conference on Computer and Communications Security',
|
|
7
|
+
docs: 'https://docs.rsshub.app/journal.html#acm-special-interest-group-on-security-audit-and-control',
|
|
8
|
+
source: ['/ccs.html', '/'],
|
|
9
|
+
target: '/sigsac/ccs',
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
|
+
},
|
|
13
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const timezone = require('@/utils/timezone');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const { art } = require('@/utils/render');
|
|
6
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
7
|
+
|
|
8
|
+
module.exports = async (ctx) => {
|
|
9
|
+
const { category } = ctx.params;
|
|
10
|
+
const rootUrl = 'https://blog.simpleinfo.cc';
|
|
11
|
+
const link = `${rootUrl}${category ? (category === 'work' || category === 'talk' ? `/blog/${category}` : `/shasha77?category=${category}`) : '/shasha77'}`;
|
|
12
|
+
const response = await got(link);
|
|
13
|
+
const $ = cheerio.load(response.data);
|
|
14
|
+
const title = `${$('.-active').text()} - 簡訊設計`;
|
|
15
|
+
$('.-ad').remove();
|
|
16
|
+
|
|
17
|
+
const list = $('.article-item')
|
|
18
|
+
.map((_, item) => {
|
|
19
|
+
item = $(item);
|
|
20
|
+
return {
|
|
21
|
+
title: item.find('.title').text(),
|
|
22
|
+
link: item.find('a').first().attr('href'),
|
|
23
|
+
category: item.find('.category').text(),
|
|
24
|
+
};
|
|
25
|
+
})
|
|
26
|
+
.get();
|
|
27
|
+
|
|
28
|
+
const items = await Promise.all(
|
|
29
|
+
list.map((item) =>
|
|
30
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
31
|
+
const result = await got(item.link);
|
|
32
|
+
const content = cheerio.load(result.data);
|
|
33
|
+
item.author = content('meta[property="article:author"]').attr('content');
|
|
34
|
+
item.pubDate = timezone(parseDate(content('meta[property="article:published_time"]').attr('content')), +8);
|
|
35
|
+
item.description = art(path.join(__dirname, 'templates/description.art'), {
|
|
36
|
+
image: content('meta[property="og:image"]').attr('content'),
|
|
37
|
+
description: content('.article-content').first().html(),
|
|
38
|
+
});
|
|
39
|
+
return item;
|
|
40
|
+
})
|
|
41
|
+
)
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
ctx.state.data = {
|
|
45
|
+
title,
|
|
46
|
+
link,
|
|
47
|
+
language: 'zh-tw',
|
|
48
|
+
item: items,
|
|
49
|
+
};
|
|
50
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'blog.simpleinfo.cc': {
|
|
3
|
+
_name: '簡訊設計',
|
|
4
|
+
'.': [
|
|
5
|
+
{
|
|
6
|
+
title: '志祺七七',
|
|
7
|
+
docs: 'https://docs.rsshub.app/new-media.html#jian-xun-she-ji',
|
|
8
|
+
source: '/shasha77',
|
|
9
|
+
target: (_, url) => `/simpleinfo/${new URL(url).searchParams.get('category')}`,
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
title: '夥伴聊聊 / 專案作品',
|
|
13
|
+
docs: 'https://docs.rsshub.app/new-media.html#jian-xun-she-ji',
|
|
14
|
+
source: '/blog/:category',
|
|
15
|
+
target: '/simpleinfo/:category',
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
};
|
package/lib/v2/sse/maintainer.js
CHANGED
|
@@ -25,6 +25,7 @@ const STICKER = 'STICKER';
|
|
|
25
25
|
const ANIMATED_STICKER = 'ANIMATED_STICKER';
|
|
26
26
|
// const VIDEO_STICKER = 'VIDEO_STICKER'; // not supported yet by t.me
|
|
27
27
|
const UNSUPPORTED = 'UNSUPPORTED';
|
|
28
|
+
const PARTIALLY_UNSUPPORTED = 'PARTIALLY_UNSUPPORTED';
|
|
28
29
|
|
|
29
30
|
/* message media tag dict */
|
|
30
31
|
const mediaTagDict = {
|
|
@@ -45,6 +46,7 @@ const mediaTagDict = {
|
|
|
45
46
|
ANIMATED_STICKER: ['[Animated Sticker]', '[Animated Sticker]'],
|
|
46
47
|
// VIDEO_STICKER: ['[Video Sticker]', '[Video Sticker]'], // not supported yet by t.me
|
|
47
48
|
UNSUPPORTED: ['[Unsupported]', '🚫'],
|
|
49
|
+
PARTIALLY_UNSUPPORTED: ['', ''],
|
|
48
50
|
};
|
|
49
51
|
|
|
50
52
|
module.exports = async (ctx) => {
|
|
@@ -120,7 +122,7 @@ module.exports = async (ctx) => {
|
|
|
120
122
|
item = $(item);
|
|
121
123
|
|
|
122
124
|
/* message types */
|
|
123
|
-
|
|
125
|
+
let msgTypes = [];
|
|
124
126
|
if (item.find('.service_message').length) {
|
|
125
127
|
// service message can have an image (avatar changed)
|
|
126
128
|
msgTypes.push(SERVICE);
|
|
@@ -157,10 +159,14 @@ module.exports = async (ctx) => {
|
|
|
157
159
|
if (item.find('.tgme_widget_message_tgsticker').length) {
|
|
158
160
|
msgTypes.push(ANIMATED_STICKER);
|
|
159
161
|
}
|
|
160
|
-
if (
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
162
|
+
if (item.find('.message_media_not_supported').length) {
|
|
163
|
+
if (item.find('.media_supported_cont').length) {
|
|
164
|
+
msgTypes.unshift(PARTIALLY_UNSUPPORTED);
|
|
165
|
+
} else {
|
|
166
|
+
if (msgTypes.length === 0 && !includeUnsupportedMsg) {
|
|
167
|
+
return null; // drop unsupported message
|
|
168
|
+
}
|
|
169
|
+
msgTypes.unshift(UNSUPPORTED);
|
|
164
170
|
}
|
|
165
171
|
}
|
|
166
172
|
// all other types above cannot be mixed
|
|
@@ -183,16 +189,6 @@ module.exports = async (ctx) => {
|
|
|
183
189
|
}
|
|
184
190
|
}
|
|
185
191
|
|
|
186
|
-
/* media tag */
|
|
187
|
-
let mediaTag = '';
|
|
188
|
-
if (showMediaTagInTitle) {
|
|
189
|
-
msgTypes.forEach((type) => {
|
|
190
|
-
if (type !== REPLY || type !== FORWARDED || type !== VIA_BOT || (type === REPLY && showReplyTo) || (type === FORWARDED && showFwdFrom) || (type === VIA_BOT && showViaBot)) {
|
|
191
|
-
mediaTag += showMediaTagAsEmoji ? mediaTagDict[type][1] : mediaTagDict[type][0];
|
|
192
|
-
}
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
|
|
196
192
|
/* fix emoji */
|
|
197
193
|
item.find('.emoji').each((_, emoji) => {
|
|
198
194
|
emoji = $(emoji);
|
|
@@ -267,11 +263,12 @@ module.exports = async (ctx) => {
|
|
|
267
263
|
if (!nodes.length) {
|
|
268
264
|
return '';
|
|
269
265
|
}
|
|
270
|
-
let
|
|
266
|
+
let tag_media_all = '';
|
|
271
267
|
const pictureNodes = nodes.find('picture');
|
|
272
268
|
const imgNodes = nodes.find('img');
|
|
273
269
|
nodes.each((_, node) => {
|
|
274
270
|
const $node = $(node);
|
|
271
|
+
let tag_media = '';
|
|
275
272
|
if (node.attribs && node.attribs.class && node.attribs.class.search(/(^|\s)tgme_widget_message_video_player(\s|$)/) !== -1) {
|
|
276
273
|
// video
|
|
277
274
|
const videoLink = $node.find('.tgme_widget_message_video').attr('src');
|
|
@@ -306,13 +303,11 @@ module.exports = async (ctx) => {
|
|
|
306
303
|
});
|
|
307
304
|
tag_media += '</picture>';
|
|
308
305
|
});
|
|
309
|
-
return tag_media;
|
|
310
306
|
} else if (imgNodes.length) {
|
|
311
307
|
// service message
|
|
312
308
|
imgNodes.each((_, img) => {
|
|
313
309
|
tag_media += $(img).toString();
|
|
314
310
|
});
|
|
315
|
-
return tag_media;
|
|
316
311
|
} else {
|
|
317
312
|
// image message, location
|
|
318
313
|
const background = $node.css('background-image');
|
|
@@ -320,8 +315,12 @@ module.exports = async (ctx) => {
|
|
|
320
315
|
const backgroundUrlSrc = backgroundUrl && backgroundUrl[1];
|
|
321
316
|
tag_media += backgroundUrlSrc ? `<img src="${backgroundUrlSrc}">` : '';
|
|
322
317
|
}
|
|
318
|
+
if (tag_media) {
|
|
319
|
+
tag_media_all += tag_media;
|
|
320
|
+
$node.find('.message_media_not_supported').remove();
|
|
321
|
+
}
|
|
323
322
|
});
|
|
324
|
-
return
|
|
323
|
+
return tag_media_all;
|
|
325
324
|
};
|
|
326
325
|
// ordinary message photos, service message photos, stickers, animated stickers, video
|
|
327
326
|
const messageMedia = generateMedia('.tgme_widget_message_photo_wrap,.tgme_widget_message_service_photo,.tgme_widget_message_sticker,.tgme_widget_message_tgsticker,.tgme_widget_message_video_player');
|
|
@@ -373,24 +372,6 @@ module.exports = async (ctx) => {
|
|
|
373
372
|
}
|
|
374
373
|
};
|
|
375
374
|
|
|
376
|
-
/* unsupported */
|
|
377
|
-
let unsupportedHtml = '';
|
|
378
|
-
let unsupportedTitle = '';
|
|
379
|
-
const unsupportedNodes = item.find('.message_media_not_supported');
|
|
380
|
-
if (msgTypes.indexOf(UNSUPPORTED) !== -1 && unsupportedNodes.length) {
|
|
381
|
-
unsupportedHtml += '<blockquote>';
|
|
382
|
-
unsupportedNodes.find('.message_media_not_supported_label').each(function () {
|
|
383
|
-
const $this = $(this);
|
|
384
|
-
unsupportedTitle += $this.text();
|
|
385
|
-
unsupportedHtml += `<p>${$this.text()}</p>`;
|
|
386
|
-
});
|
|
387
|
-
unsupportedNodes.find('.message_media_view_in_telegram').each(function () {
|
|
388
|
-
const $this = $(this);
|
|
389
|
-
unsupportedHtml += $this.attr('href') ? `<p><a href="${$this.attr('href')}">${$this.text()}</a></p>` : `<p>${$this.text()}</p>`;
|
|
390
|
-
});
|
|
391
|
-
unsupportedHtml += '</blockquote>';
|
|
392
|
-
}
|
|
393
|
-
|
|
394
375
|
/* link preview */
|
|
395
376
|
const linkPreview = () => {
|
|
396
377
|
const linkPreviewSiteObj = item.find('.link_preview_site_name');
|
|
@@ -492,11 +473,46 @@ module.exports = async (ctx) => {
|
|
|
492
473
|
inlineButtons += '</tr></tbody></table>';
|
|
493
474
|
}
|
|
494
475
|
|
|
476
|
+
/* unsupported */
|
|
477
|
+
let unsupportedHtml = '';
|
|
478
|
+
let unsupportedTitle = '';
|
|
479
|
+
const unsupportedNodes = item.find('.message_media_not_supported');
|
|
480
|
+
if (msgTypes.includes(UNSUPPORTED)) {
|
|
481
|
+
if (unsupportedNodes.length) {
|
|
482
|
+
unsupportedHtml += '<blockquote>';
|
|
483
|
+
unsupportedNodes.find('.message_media_not_supported_label').each(function () {
|
|
484
|
+
const $this = $(this);
|
|
485
|
+
unsupportedTitle += $this.text();
|
|
486
|
+
unsupportedHtml += `<p>${$this.text()}</p>`;
|
|
487
|
+
});
|
|
488
|
+
unsupportedNodes.find('.message_media_view_in_telegram').each(function () {
|
|
489
|
+
const $this = $(this);
|
|
490
|
+
unsupportedHtml += $this.attr('href') ? `<p><a href="${$this.attr('href')}">${$this.text()}</a></p>` : `<p>${$this.text()}</p>`;
|
|
491
|
+
});
|
|
492
|
+
unsupportedHtml += '</blockquote>';
|
|
493
|
+
} else {
|
|
494
|
+
// remove unsupported type, previous parsing has proved that it is not unsupported
|
|
495
|
+
msgTypes = msgTypes.filter((type) => type !== UNSUPPORTED);
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
|
|
495
499
|
/* pubDate */
|
|
496
500
|
const pubDate = parseDate(item.find('.tgme_widget_message_date time').attr('datetime'));
|
|
497
501
|
|
|
502
|
+
/* ----- finished parsing ----- */
|
|
503
|
+
|
|
504
|
+
/* media tag */
|
|
505
|
+
let mediaTag = '';
|
|
506
|
+
if (showMediaTagInTitle) {
|
|
507
|
+
msgTypes.forEach((type) => {
|
|
508
|
+
if (type !== REPLY || type !== FORWARDED || type !== VIA_BOT || (type === REPLY && showReplyTo) || (type === FORWARDED && showFwdFrom) || (type === VIA_BOT && showViaBot)) {
|
|
509
|
+
mediaTag += showMediaTagAsEmoji ? mediaTagDict[type][1] : mediaTagDict[type][0];
|
|
510
|
+
}
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
|
|
498
514
|
/* message text & title */
|
|
499
|
-
const messageTextObj = item.find('
|
|
515
|
+
const messageTextObj = item.find(`.${msgTypes.includes(PARTIALLY_UNSUPPORTED) ? 'media_supported_cont' : 'tgme_widget_message_bubble'} > .tgme_widget_message_text`);
|
|
500
516
|
let messageHtml = '',
|
|
501
517
|
messageTitle = '';
|
|
502
518
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
'/cloud/column/:id?/:tag?': ['nczitzk'],
|
|
3
|
+
'/news/coronavirus/data/:province?/:city?': ['CaoMeiYouRen'],
|
|
4
|
+
'/news/coronavirus/total': ['CaoMeiYouRen'],
|
|
3
5
|
'/pvp/newsindex/:type': ['Jeason0228', 'HenryQW'],
|
|
4
6
|
'/qq/sdk/changelog/:platform': ['nuomi1'],
|
|
5
7
|
};
|