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
package/lib/v2/gov/radar.js
CHANGED
|
@@ -319,6 +319,17 @@ module.exports = {
|
|
|
319
319
|
},
|
|
320
320
|
],
|
|
321
321
|
},
|
|
322
|
+
'changsha.gov.cn': {
|
|
323
|
+
_name: '湖南省人民政府',
|
|
324
|
+
wlwz: [
|
|
325
|
+
{
|
|
326
|
+
title: '市长信箱',
|
|
327
|
+
docs: 'https://docs.rsshub.app/government.html#hu-nan-sheng-ren-min-zheng-fu',
|
|
328
|
+
source: ['/webapp/cs2020/email/*'],
|
|
329
|
+
target: '/gov/hunan/changsha/major-email',
|
|
330
|
+
},
|
|
331
|
+
],
|
|
332
|
+
},
|
|
322
333
|
'cmse.gov.cn': {
|
|
323
334
|
_name: '中国载人航天',
|
|
324
335
|
www: [
|
|
@@ -417,6 +428,39 @@ module.exports = {
|
|
|
417
428
|
},
|
|
418
429
|
],
|
|
419
430
|
},
|
|
431
|
+
'dianbai.gov.cn': {
|
|
432
|
+
_name: '茂名市电白区人民政府',
|
|
433
|
+
www: [
|
|
434
|
+
{
|
|
435
|
+
title: '茂名市电白区人民政府',
|
|
436
|
+
docs: 'https://docs.rsshub.app/government.html#mao-ming-shi-ren-min-zheng-fu-mao-ming-shi-dian-bai-qu-ren-min-zheng-fu',
|
|
437
|
+
source: ['/*'],
|
|
438
|
+
target: (params, url) => `/gov/dianbai/${new URL(url).host.split('.dianbai.gov.cn')[0] + new URL(url).pathname.replace(/(index.*$)/g, '')}`,
|
|
439
|
+
},
|
|
440
|
+
],
|
|
441
|
+
},
|
|
442
|
+
'gaozhou.gov.cn': {
|
|
443
|
+
_name: '高州市人民政府',
|
|
444
|
+
www: [
|
|
445
|
+
{
|
|
446
|
+
title: '高州市人民政府',
|
|
447
|
+
docs: 'https://docs.rsshub.app/government.html#mao-ming-shi-ren-min-zheng-fu-gao-zhou-shi-ren-min-zheng-fu',
|
|
448
|
+
source: ['/*'],
|
|
449
|
+
target: (params, url) => `/gov/gaozhou/${new URL(url).host.split('.gaozhou.gov.cn')[0] + new URL(url).pathname.replace(/(index.*$)/g, '')}`,
|
|
450
|
+
},
|
|
451
|
+
],
|
|
452
|
+
},
|
|
453
|
+
'gz.gov.cn': {
|
|
454
|
+
_name: '广州市人民政府',
|
|
455
|
+
www: [
|
|
456
|
+
{
|
|
457
|
+
title: '新闻',
|
|
458
|
+
docs: 'https://docs.rsshub.app/government.html#guang-zhou-shi-ren-min-zheng-fu',
|
|
459
|
+
source: ['/:channel/:category'],
|
|
460
|
+
target: (params) => `/gov/gz/${params.channel}/${params.category}`,
|
|
461
|
+
},
|
|
462
|
+
],
|
|
463
|
+
},
|
|
420
464
|
'hebei.gov.cn': {
|
|
421
465
|
_name: '河北省人民政府',
|
|
422
466
|
czt: [
|
|
@@ -463,6 +507,17 @@ module.exports = {
|
|
|
463
507
|
},
|
|
464
508
|
],
|
|
465
509
|
},
|
|
510
|
+
'huazhou.gov.cn': {
|
|
511
|
+
_name: '化州市人民政府',
|
|
512
|
+
www: [
|
|
513
|
+
{
|
|
514
|
+
title: '化州市人民政府',
|
|
515
|
+
docs: 'https://docs.rsshub.app/government.html#mao-ming-shi-ren-min-zheng-fu-hua-zhou-shi-ren-min-zheng-fu',
|
|
516
|
+
source: ['/*'],
|
|
517
|
+
target: (params, url) => `/gov/huazhou/${new URL(url).host.split('.huazhou.gov.cn')[0] + new URL(url).pathname.replace(/(index.*$)/g, '')}`,
|
|
518
|
+
},
|
|
519
|
+
],
|
|
520
|
+
},
|
|
466
521
|
'huizhou.gov.cn': {
|
|
467
522
|
_name: '惠州市人民政府',
|
|
468
523
|
www: [
|
|
@@ -498,6 +553,64 @@ module.exports = {
|
|
|
498
553
|
},
|
|
499
554
|
],
|
|
500
555
|
},
|
|
556
|
+
'maoming.gov.cn': {
|
|
557
|
+
_name: '茂名市人民政府门户网站',
|
|
558
|
+
'.': [
|
|
559
|
+
{
|
|
560
|
+
title: '茂名市人民政府',
|
|
561
|
+
docs: 'https://docs.rsshub.app/government.html#mao-ming-shi-ren-min-zheng-fu-mao-ming-shi-ren-min-zheng-fu-men-hu-wang-zhan',
|
|
562
|
+
source: ['/*'],
|
|
563
|
+
target: (params, url) => `/gov/maoming/${new URL(url).host.split('.maoming.gov.cn')[0] + new URL(url).pathname.replace(/(index.*$)/g, '')}`,
|
|
564
|
+
},
|
|
565
|
+
],
|
|
566
|
+
},
|
|
567
|
+
'maonan.gov.cn': {
|
|
568
|
+
_name: '茂名市茂南区人民政府',
|
|
569
|
+
'.': [
|
|
570
|
+
{
|
|
571
|
+
title: '政务公开',
|
|
572
|
+
docs: 'https://docs.rsshub.app/government.html#mao-ming-shi-ren-min-zheng-fu-mao-ming-shi-mao-nan-qu-ren-min-zheng-fu',
|
|
573
|
+
source: ['/zwgk/*'],
|
|
574
|
+
target: '/gov/maonan/zwgk',
|
|
575
|
+
},
|
|
576
|
+
{
|
|
577
|
+
title: '政务新闻',
|
|
578
|
+
docs: 'https://docs.rsshub.app/government.html#mao-ming-shi-ren-min-zheng-fu-mao-ming-shi-mao-nan-qu-ren-min-zheng-fu',
|
|
579
|
+
source: ['/zwxw/*'],
|
|
580
|
+
target: '/gov/maonan/zwxw',
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
title: '茂南动态',
|
|
584
|
+
docs: 'https://docs.rsshub.app/government.html#mao-ming-shi-ren-min-zheng-fu-mao-ming-shi-mao-nan-qu-ren-min-zheng-fu',
|
|
585
|
+
source: ['/zwxw/mndt/*'],
|
|
586
|
+
target: '/gov/maonan/mndt',
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
title: '重大会议',
|
|
590
|
+
docs: 'https://docs.rsshub.app/government.html#mao-ming-shi-ren-min-zheng-fu-mao-ming-shi-mao-nan-qu-ren-min-zheng-fu',
|
|
591
|
+
source: ['/zwxw/zdhy/*'],
|
|
592
|
+
target: '/gov/maonan/zdhy',
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
title: '公告公示',
|
|
596
|
+
docs: 'https://docs.rsshub.app/government.html#mao-ming-shi-ren-min-zheng-fu-mao-ming-shi-mao-nan-qu-ren-min-zheng-fu',
|
|
597
|
+
source: ['/zwgk/tzgg/*'],
|
|
598
|
+
target: '/gov/maonan/tzgg',
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
title: '招录信息',
|
|
602
|
+
docs: 'https://docs.rsshub.app/government.html#mao-ming-shi-ren-min-zheng-fu-mao-ming-shi-mao-nan-qu-ren-min-zheng-fu',
|
|
603
|
+
source: ['/zwgk/zlxx/*'],
|
|
604
|
+
target: '/gov/maonan/zlxx',
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
title: '政策解读',
|
|
608
|
+
docs: 'https://docs.rsshub.app/government.html#mao-ming-shi-ren-min-zheng-fu-mao-ming-shi-mao-nan-qu-ren-min-zheng-fu',
|
|
609
|
+
source: ['/zwgk/zcjd/*'],
|
|
610
|
+
target: '/gov/maonan/zcjd',
|
|
611
|
+
},
|
|
612
|
+
],
|
|
613
|
+
},
|
|
501
614
|
'mee.gov.cn': {
|
|
502
615
|
_name: '生态环境部',
|
|
503
616
|
www: [
|
|
@@ -520,6 +633,17 @@ module.exports = {
|
|
|
520
633
|
},
|
|
521
634
|
],
|
|
522
635
|
},
|
|
636
|
+
'mgs.gov.cn': {
|
|
637
|
+
_name: '广东茂名滨海新区政务网',
|
|
638
|
+
www: [
|
|
639
|
+
{
|
|
640
|
+
title: '广东茂名滨海新区政务网',
|
|
641
|
+
docs: 'https://docs.rsshub.app/government.html#mao-ming-shi-ren-min-zheng-fu-guang-dong-mao-ming-bin-hai-xin-qu-zheng-wu-wang',
|
|
642
|
+
source: ['/*'],
|
|
643
|
+
target: (params, url) => `/gov/mgs/${new URL(url).host.split('.mgs.gov.cn')[0] + new URL(url).pathname.replace(/(index.*$)/g, '')}`,
|
|
644
|
+
},
|
|
645
|
+
],
|
|
646
|
+
},
|
|
523
647
|
'miit.gov.cn': {
|
|
524
648
|
_name: '工业和信息化部',
|
|
525
649
|
'.': [
|
|
@@ -537,6 +661,17 @@ module.exports = {
|
|
|
537
661
|
},
|
|
538
662
|
],
|
|
539
663
|
},
|
|
664
|
+
'mmht.gov.cn': {
|
|
665
|
+
_name: '广东茂名高新技术产业开发区',
|
|
666
|
+
www: [
|
|
667
|
+
{
|
|
668
|
+
title: '茂名高新技术产业开发区政务网',
|
|
669
|
+
docs: 'https://docs.rsshub.app/government.html#mao-ming-shi-ren-min-zheng-fu-guang-dong-mao-ming-gao-xin-ji-shu-chan-ye-kai-fa-qu',
|
|
670
|
+
source: ['/*'],
|
|
671
|
+
target: (params, url) => `/gov/mmht/${new URL(url).host.split('.mmht.gov.cn')[0] + new URL(url).pathname.replace(/(index.*$)/g, '')}`,
|
|
672
|
+
},
|
|
673
|
+
],
|
|
674
|
+
},
|
|
540
675
|
'moe.gov.cn': {
|
|
541
676
|
_name: '中华人民共和国教育部',
|
|
542
677
|
'.': [
|
|
@@ -672,6 +807,28 @@ module.exports = {
|
|
|
672
807
|
},
|
|
673
808
|
],
|
|
674
809
|
},
|
|
810
|
+
'sasac.gov.cn': {
|
|
811
|
+
_name: '国务院国有资产监督管理委员会',
|
|
812
|
+
'.': [
|
|
813
|
+
{
|
|
814
|
+
title: '通用',
|
|
815
|
+
docs: 'https://docs.rsshub.app/other.html#guo-wu-yuan-guo-you-zi-chan-jian-du-guan-li-wei-yuan-hui',
|
|
816
|
+
source: ['/*path'],
|
|
817
|
+
target: (params) => `/gov/sasac/${params.path.replace('/index.html', '')}`,
|
|
818
|
+
},
|
|
819
|
+
],
|
|
820
|
+
},
|
|
821
|
+
'sdb.gov.cn': {
|
|
822
|
+
_name: '广东省茂名水东湾新城建设管理委员会',
|
|
823
|
+
www: [
|
|
824
|
+
{
|
|
825
|
+
title: '广东省茂名水东湾新城建设管理委员会',
|
|
826
|
+
docs: 'https://docs.rsshub.app/government.html#mao-ming-shi-ren-min-zheng-fu-guang-dong-sheng-mao-ming-shui-dong-wan-xin-cheng-jian-she-guan-li-wei-yuan-hui',
|
|
827
|
+
source: ['/*'],
|
|
828
|
+
target: (params, url) => `/gov/sdb/${new URL(url).host.split('.sdb.gov.cn')[0] + new URL(url).pathname.replace(/(index.*$)/g, '')}`,
|
|
829
|
+
},
|
|
830
|
+
],
|
|
831
|
+
},
|
|
675
832
|
'sh.gov.cn': {
|
|
676
833
|
_name: '上海市人民政府',
|
|
677
834
|
wsjkw: [
|
|
@@ -776,6 +933,46 @@ module.exports = {
|
|
|
776
933
|
},
|
|
777
934
|
],
|
|
778
935
|
},
|
|
936
|
+
'xinyi.gov.cn': {
|
|
937
|
+
_name: '信宜市人民政府',
|
|
938
|
+
www: [
|
|
939
|
+
{
|
|
940
|
+
title: '信宜市人民政府',
|
|
941
|
+
docs: 'https://docs.rsshub.app/government.html#mao-ming-shi-ren-min-zheng-fu-xin-yi-shi-ren-min-zheng-fu',
|
|
942
|
+
source: ['/*'],
|
|
943
|
+
target: (params, url) => `/gov/xinyi/${new URL(url).host.split('.xinyi.gov.cn')[0] + new URL(url).pathname.replace(/(index.*$)/g, '')}`,
|
|
944
|
+
},
|
|
945
|
+
],
|
|
946
|
+
},
|
|
947
|
+
'www.gov.cn': {
|
|
948
|
+
_name: '中国政府网',
|
|
949
|
+
'.': [
|
|
950
|
+
{
|
|
951
|
+
title: '最新政策',
|
|
952
|
+
docs: 'https://docs.rsshub.app/government.html#zhong-guo-zheng-fu-wang',
|
|
953
|
+
source: ['/zhengce/zuixin.htm', '/'],
|
|
954
|
+
target: '/gov/zhengce/zuixin',
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
title: '最新文件',
|
|
958
|
+
docs: 'https://docs.rsshub.app/government.html#zhong-guo-zheng-fu-wang',
|
|
959
|
+
source: ['/'],
|
|
960
|
+
target: '/gov/zhengce/wenjian',
|
|
961
|
+
},
|
|
962
|
+
{
|
|
963
|
+
title: '信息稿件',
|
|
964
|
+
docs: 'https://docs.rsshub.app/government.html#zhong-guo-zheng-fu-wang',
|
|
965
|
+
source: ['/'],
|
|
966
|
+
target: '/gov/zhengce/govall',
|
|
967
|
+
},
|
|
968
|
+
{
|
|
969
|
+
title: '国务院政策文件库',
|
|
970
|
+
docs: 'https://docs.rsshub.app/government.html#zhong-guo-zheng-fu-wang',
|
|
971
|
+
source: ['/zhengce/zhengceku/:lib'],
|
|
972
|
+
target: (params) => `/gov/zhengce/zhengceku/${params.libs}`,
|
|
973
|
+
},
|
|
974
|
+
],
|
|
975
|
+
},
|
|
779
976
|
'xz.gov.cn': {
|
|
780
977
|
_name: '徐州市人民政府',
|
|
781
978
|
hrss: [
|
package/lib/v2/gov/router.js
CHANGED
|
@@ -26,16 +26,31 @@ module.exports = function (router) {
|
|
|
26
26
|
router.get('/pbc/gzlw', require('./pbc/gzlw'));
|
|
27
27
|
router.get('/pbc/tradeAnnouncement', require('./pbc/tradeAnnouncement'));
|
|
28
28
|
router.get('/pbc/zcyj', require('./pbc/zcyj'));
|
|
29
|
+
router.get('/sasac/:path+', require('./sasac/generic'));
|
|
29
30
|
router.get(/stats(\/[\w/-]+)?/, require('./stats'));
|
|
31
|
+
router.get('/zhengce/govall/:advance?', require('./zhengce/govall'));
|
|
32
|
+
router.get('/zhengce/wenjian/:pcodeJiguan?', require('./zhengce/wenjian'));
|
|
33
|
+
router.get('/zhengce/zhengceku/:department', require('./zhengce/zhengceku'));
|
|
34
|
+
router.get('/zhengce/zuixin', require('./zhengce/zuixin'));
|
|
30
35
|
// province
|
|
31
36
|
router.get(/anhui\/kjt\/([\w\d/-]+)?/, require('./anhui/kjt'));
|
|
32
37
|
router.get(/beijing\/bphc(\/[\w/-]+)?/, require('./beijing/bphc'));
|
|
33
38
|
router.get('/beijing/jw/tzgg', require('./beijing/jw/tzgg'));
|
|
34
39
|
router.get('/beijing/kw/:channel', require('./beijing/kw/index'));
|
|
35
|
-
router.get(
|
|
40
|
+
router.get(/dianbai(\/[\w/-]+)?/, require('./dianbai/dianbai'));
|
|
41
|
+
router.get(/gaozhou(\/[\w/-]+)?/, require('./gaozhou/gaozhou'));
|
|
36
42
|
router.get('/guangdong/tqyb/sncsyjxh', require('./guangdong/tqyb/sncsyjxh'));
|
|
37
|
-
router.get('/
|
|
43
|
+
router.get('/guangdong/tqyb/tfxtq', require('./guangdong/tqyb/tfxtq'));
|
|
44
|
+
router.get('/gz/:channel/:category', require('./gz/index'));
|
|
38
45
|
router.get('/hebei/czt/xwdt/:category?', require('./hebei/czt'));
|
|
46
|
+
router.get(/huazhou(\/[\w/-]+)?/, require('./huazhou/huazhou'));
|
|
47
|
+
router.get('/huizhou/zwgk/:category?', require('./huizhou/zwgk/index'));
|
|
48
|
+
router.get('/hunan/changsha/major-email', require('./hunan/changsha/major-email'));
|
|
49
|
+
router.get(/maoming(\/[\w/-]+)?/, require('./maoming/maoming'));
|
|
50
|
+
router.get('/maonan/:category', require('./maonan/maonan'));
|
|
51
|
+
router.get(/mgs(\/[\w/-]+)?/, require('./mgs/mgs'));
|
|
52
|
+
router.get(/mmht(\/[\w/-]+)?/, require('./mmht/mmht'));
|
|
53
|
+
router.get(/sdb(\/[\w/-]+)?/, require('./sdb/sdb'));
|
|
39
54
|
router.get('/shaanxi/kjt/:id?', require('./shaanxi/kjt'));
|
|
40
55
|
router.get('/shanghai/rsj/ksxm', require('./shanghai/rsj/ksxm'));
|
|
41
56
|
router.get('/shanghai/wsjkw/yqtb', require('./shanghai/wsjkw/yqtb'));
|
|
@@ -45,5 +60,6 @@ module.exports = function (router) {
|
|
|
45
60
|
router.get('/shenzhen/zzb/:caty/:page?', require('./shenzhen/zzb/index'));
|
|
46
61
|
router.get('/sichuan/deyang/govpulicinfo/:countyName', require('./sichuan/deyang/govpulicinfo'));
|
|
47
62
|
router.get('/taiyuan/rsj/:caty/:page?', require('./taiyuan/rsj'));
|
|
63
|
+
router.get(/xinyi(\/[\w/-]+)?/, require('./xinyi/xinyi'));
|
|
48
64
|
router.get('/xuzhou/hrss/:category?', require('./xuzhou/hrss'));
|
|
49
65
|
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
4
|
+
|
|
5
|
+
module.exports = async (ctx) => {
|
|
6
|
+
const { path } = ctx.params;
|
|
7
|
+
const baseUrl = 'http://www.sasac.gov.cn';
|
|
8
|
+
const url = `${baseUrl}/${path}/index.html`;
|
|
9
|
+
const response = await got(url);
|
|
10
|
+
|
|
11
|
+
const $ = cheerio.load(response.data);
|
|
12
|
+
const list = $('.zsy_conlist li')
|
|
13
|
+
.toArray()
|
|
14
|
+
.filter((item) => !$(item).attr('style'))
|
|
15
|
+
.map((item) => {
|
|
16
|
+
item = $(item);
|
|
17
|
+
return {
|
|
18
|
+
title: item.find('a').attr('title'),
|
|
19
|
+
link: new URL(item.find('a').attr('href'), response.url).href,
|
|
20
|
+
pubDate: parseDate(item.find('span').text().replace('[', '').replace(']', '')),
|
|
21
|
+
};
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
const items = await Promise.all(
|
|
25
|
+
list.map((item) =>
|
|
26
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
27
|
+
const response = await got(item.link);
|
|
28
|
+
const $ = cheerio.load(response.data);
|
|
29
|
+
$('style, #qr_container, #div_div, [class^=jiathis]').remove();
|
|
30
|
+
item.description = $('.zsy_comain').html();
|
|
31
|
+
return item;
|
|
32
|
+
})
|
|
33
|
+
)
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
ctx.state.data = {
|
|
37
|
+
title: $('head title').text().trim(),
|
|
38
|
+
link: url,
|
|
39
|
+
image: 'http://www.sasac.gov.cn/dbsource/11869722/11869731.jpg',
|
|
40
|
+
item: items,
|
|
41
|
+
};
|
|
42
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const { gdgov } = require('../general/general');
|
|
2
|
+
|
|
3
|
+
module.exports = async (ctx) => {
|
|
4
|
+
const info = {
|
|
5
|
+
defaultPath: 'zwgk/zcjd/',
|
|
6
|
+
list_element: '.art-list li a',
|
|
7
|
+
list_include: 'site',
|
|
8
|
+
title_element: '.title',
|
|
9
|
+
title_match: '(.*)',
|
|
10
|
+
description_element: '.text',
|
|
11
|
+
author_element: '.source',
|
|
12
|
+
author_match: '来源:(.*)发布时间',
|
|
13
|
+
authorisme: '广东省茂名水东湾新城建设管理委员会网站',
|
|
14
|
+
pubDate_element: '.source',
|
|
15
|
+
pubDate_match: '发布时间:(.*)',
|
|
16
|
+
pubDate_format: undefined,
|
|
17
|
+
};
|
|
18
|
+
await gdgov(info, ctx);
|
|
19
|
+
};
|
|
@@ -41,8 +41,10 @@ module.exports = async (ctx) => {
|
|
|
41
41
|
|
|
42
42
|
const content = cheerio.load(detailResponse.data);
|
|
43
43
|
|
|
44
|
+
const pubDate = content('meta[name="pubdate"]').attr('content') || content('meta[name="PubDate"]').attr('content');
|
|
45
|
+
|
|
44
46
|
item.description = content('#ivs_content').html();
|
|
45
|
-
item.pubDate = timezone(parseDate(
|
|
47
|
+
item.pubDate = timezone(parseDate(pubDate, ['YYYY-MM-DD HH:mm:ss', 'YYYY-MM-DD HH:mm']), +8);
|
|
46
48
|
} catch (e) {
|
|
47
49
|
// no-empty
|
|
48
50
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const { gdgov } = require('../general/general');
|
|
2
|
+
|
|
3
|
+
module.exports = async (ctx) => {
|
|
4
|
+
const info = {
|
|
5
|
+
defaultPath: 'zwgk/zcjd/',
|
|
6
|
+
list_element: '.newsList li a',
|
|
7
|
+
list_include: 'site',
|
|
8
|
+
title_element: '.title',
|
|
9
|
+
title_match: '(.*)',
|
|
10
|
+
description_element: '.conTxt',
|
|
11
|
+
author_element: undefined,
|
|
12
|
+
author_match: undefined,
|
|
13
|
+
authorisme: '信宜市人民政府网',
|
|
14
|
+
pubDate_element: '.property span:nth-child(-n+2)',
|
|
15
|
+
pubDate_match: '发布时间:(.*)',
|
|
16
|
+
pubDate_format: undefined,
|
|
17
|
+
};
|
|
18
|
+
await gdgov(info, ctx);
|
|
19
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
|
|
6
|
+
module.exports = async (ctx) => {
|
|
7
|
+
const { advance } = ctx.params;
|
|
8
|
+
const link = `http://sousuo.gov.cn/list.htm`;
|
|
9
|
+
const params = new URLSearchParams({
|
|
10
|
+
n: 20,
|
|
11
|
+
t: 'govall',
|
|
12
|
+
sort: 'pubtime',
|
|
13
|
+
advance: 'true',
|
|
14
|
+
});
|
|
15
|
+
const query = `${params.toString()}&${advance}`;
|
|
16
|
+
const res = await got.get(link, {
|
|
17
|
+
searchParams: query.replace(/([\u4e00-\u9fa5])/g, (str) => encodeURIComponent(str)),
|
|
18
|
+
});
|
|
19
|
+
const $ = cheerio.load(res.data);
|
|
20
|
+
|
|
21
|
+
const list = $('body > div.dataBox > table > tbody > tr')
|
|
22
|
+
.slice(1)
|
|
23
|
+
.toArray()
|
|
24
|
+
.map((elem) => {
|
|
25
|
+
elem = $(elem);
|
|
26
|
+
return {
|
|
27
|
+
title: elem.find('td:nth-child(2) > a').text(),
|
|
28
|
+
link: elem.find('td:nth-child(2) > a').attr('href'),
|
|
29
|
+
pubDate: timezone(parseDate(elem.find('td:nth-child(5)').text()), 8),
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const items = await Promise.all(
|
|
34
|
+
list.map((item) =>
|
|
35
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
36
|
+
let description = '';
|
|
37
|
+
try {
|
|
38
|
+
const contentData = await got(item.link);
|
|
39
|
+
const $ = cheerio.load(contentData.data);
|
|
40
|
+
description = $('#UCAP-CONTENT').html();
|
|
41
|
+
} catch (error) {
|
|
42
|
+
description = '文章已被删除';
|
|
43
|
+
}
|
|
44
|
+
item.description = description;
|
|
45
|
+
return item;
|
|
46
|
+
})
|
|
47
|
+
)
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
ctx.state.data = {
|
|
51
|
+
title: '信息稿件 - 中国政府网',
|
|
52
|
+
link: `${link}?${query}`,
|
|
53
|
+
item: items,
|
|
54
|
+
};
|
|
55
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
|
|
6
|
+
module.exports = async (ctx) => {
|
|
7
|
+
const { pcodeJiguan } = ctx.params;
|
|
8
|
+
const link = 'http://sousuo.gov.cn/list.htm';
|
|
9
|
+
const res = await got(link, {
|
|
10
|
+
searchParams: {
|
|
11
|
+
n: ctx.query.limit ? Number(ctx.query.limit) : 20,
|
|
12
|
+
sort: 'pubtime',
|
|
13
|
+
t: 'paper',
|
|
14
|
+
pcodeJiguan: pcodeJiguan ? pcodeJiguan : '',
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
const $ = cheerio.load(res.data);
|
|
18
|
+
|
|
19
|
+
const list = $('body > div.dataBox > table > tbody > tr')
|
|
20
|
+
.slice(1)
|
|
21
|
+
.toArray()
|
|
22
|
+
.map((elem) => {
|
|
23
|
+
elem = $(elem);
|
|
24
|
+
return {
|
|
25
|
+
title: elem.find('td:nth-child(2) > a').text(),
|
|
26
|
+
link: elem.find('td:nth-child(2) > a').attr('href'),
|
|
27
|
+
pubDate: timezone(parseDate(elem.find('td:nth-child(5)').text()), 8),
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const items = await Promise.all(
|
|
32
|
+
list.map((item) =>
|
|
33
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
34
|
+
const contentData = await got(item.link);
|
|
35
|
+
const $ = cheerio.load(contentData.data);
|
|
36
|
+
item.description = $('#UCAP-CONTENT').html();
|
|
37
|
+
return item;
|
|
38
|
+
})
|
|
39
|
+
)
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
ctx.state.data = {
|
|
43
|
+
title: '最新文件 - 中国政府网',
|
|
44
|
+
link: res.url,
|
|
45
|
+
item: items,
|
|
46
|
+
};
|
|
47
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const buildData = require('@/utils/common-config');
|
|
2
|
+
|
|
3
|
+
module.exports = async (ctx) => {
|
|
4
|
+
const department = ctx.params.department;
|
|
5
|
+
const link = `http://www.gov.cn/zhengce/zhengceku/${department}/`;
|
|
6
|
+
|
|
7
|
+
ctx.state.data = await buildData({
|
|
8
|
+
link,
|
|
9
|
+
url: link,
|
|
10
|
+
title: `%title%`,
|
|
11
|
+
description: '政府文件库, 当页的所有列表',
|
|
12
|
+
params: {
|
|
13
|
+
title: `$('.channel_tab > .noline > a').text().trim() + ' - 政府文件库'`,
|
|
14
|
+
},
|
|
15
|
+
item: {
|
|
16
|
+
item: '.news_box > .list > ul > li:not(.line)',
|
|
17
|
+
title: `$('h4 > a').text()`,
|
|
18
|
+
link: `$('h4 > a').attr('href')`,
|
|
19
|
+
pubDate: `parseDate($('h4 > .date').text().trim())`,
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
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 baseUrl = 'http://www.gov.cn';
|
|
6
|
+
|
|
7
|
+
module.exports = async (ctx) => {
|
|
8
|
+
const link = `${baseUrl}/zhengce/zuixin.htm`;
|
|
9
|
+
const listData = await got(link);
|
|
10
|
+
const $ = cheerio.load(listData.data);
|
|
11
|
+
|
|
12
|
+
const list = $('.news_box .list li:not(.line)')
|
|
13
|
+
.toArray()
|
|
14
|
+
.map((elem) => {
|
|
15
|
+
elem = $(elem);
|
|
16
|
+
return {
|
|
17
|
+
title: elem.find('h4 a').text(),
|
|
18
|
+
link: new URL(elem.find('h4 a').attr('href'), baseUrl).href,
|
|
19
|
+
pubDate: timezone(parseDate(elem.find('h4 .date').text()), 8),
|
|
20
|
+
};
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const items = await Promise.all(
|
|
24
|
+
list.map((item) =>
|
|
25
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
26
|
+
const contentData = await got(item.link);
|
|
27
|
+
const $ = cheerio.load(contentData.data);
|
|
28
|
+
item.description = $('#UCAP-CONTENT').html();
|
|
29
|
+
return item;
|
|
30
|
+
})
|
|
31
|
+
)
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
ctx.state.data = {
|
|
35
|
+
title: '最新政策 - 中国政府网',
|
|
36
|
+
link,
|
|
37
|
+
item: items,
|
|
38
|
+
};
|
|
39
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
|
|
6
|
+
module.exports = async (ctx) => {
|
|
7
|
+
const { data: response } = await got('https://www.guanhai.com.cn');
|
|
8
|
+
const $ = cheerio.load(response);
|
|
9
|
+
|
|
10
|
+
const imgBox = $('.img-box');
|
|
11
|
+
const recommand = {
|
|
12
|
+
title: imgBox.find('a').first().attr('title'),
|
|
13
|
+
link: imgBox.find('a').first().attr('href'),
|
|
14
|
+
pubDate: timezone(parseDate(imgBox.find('time').text()), 8),
|
|
15
|
+
};
|
|
16
|
+
const list = $('.pic-summary .title')
|
|
17
|
+
.toArray()
|
|
18
|
+
.map((item) => {
|
|
19
|
+
item = $(item);
|
|
20
|
+
return {
|
|
21
|
+
title: item.find('a').attr('title'),
|
|
22
|
+
link: item.find('a').attr('href'),
|
|
23
|
+
pubDate: timezone(parseDate(item.find('time').text()), 8),
|
|
24
|
+
};
|
|
25
|
+
})
|
|
26
|
+
.concat(recommand);
|
|
27
|
+
|
|
28
|
+
const items = await Promise.all(
|
|
29
|
+
list.map((item) =>
|
|
30
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
31
|
+
const { data: response } = await got(item.link);
|
|
32
|
+
const $ = cheerio.load(response);
|
|
33
|
+
item.author = $('.source').text();
|
|
34
|
+
item.description = $('.article-content').html();
|
|
35
|
+
return item;
|
|
36
|
+
})
|
|
37
|
+
)
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
ctx.state.data = {
|
|
41
|
+
title: $('head title').text(),
|
|
42
|
+
description: $('head meta[name=description]').text(),
|
|
43
|
+
image: 'https://www.guanhai.com.cn/favicon.ico',
|
|
44
|
+
link: 'https://www.guanhai.com.cn',
|
|
45
|
+
item: items,
|
|
46
|
+
};
|
|
47
|
+
};
|
|
@@ -38,6 +38,8 @@ module.exports = async (ctx) => {
|
|
|
38
38
|
item.onStory = thing.find('.onstory').text().substring(2);
|
|
39
39
|
|
|
40
40
|
item.comments = thing.next().find('a').last().text().split(' comment')[0];
|
|
41
|
+
item.upvotes = thing.next().find('.score').text().split(' point')[0];
|
|
42
|
+
|
|
41
43
|
item.currentComment = thing.find('.comment').text();
|
|
42
44
|
item.guid = type === 'sources' ? item.guid : `${item.guid}${item.comments === 'discuss' ? '' : `-${item.comments}`}`;
|
|
43
45
|
|
|
@@ -89,6 +91,10 @@ module.exports = async (ctx) => {
|
|
|
89
91
|
item.description = item.currentComment;
|
|
90
92
|
}
|
|
91
93
|
|
|
94
|
+
if (isNaN(item.comments)) {
|
|
95
|
+
item.comments = 0;
|
|
96
|
+
}
|
|
97
|
+
|
|
92
98
|
item.link = type === 'sources' ? item.origin : item.link;
|
|
93
99
|
|
|
94
100
|
delete item.origin;
|