rsshub 1.0.0-master.f8b1c8d → 1.0.0-master.f961961
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 +14 -5
- package/lib/radar-rules.js +0 -87
- package/lib/router.js +63 -67
- package/lib/routes/cell/cover.js +1 -1
- package/lib/routes/v2ex/post.js +3 -0
- package/lib/utils/wechat-mp.js +3 -0
- package/lib/v2/18comic/utils.js +2 -2
- package/lib/v2/36kr/index.js +29 -24
- package/lib/v2/8world/index.js +8 -8
- package/lib/v2/8world/maintainer.js +1 -0
- package/lib/v2/8world/radar.js +6 -0
- package/lib/v2/8world/router.js +1 -1
- 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/aljazeera/index.js +87 -0
- package/lib/v2/aljazeera/maintainer.js +5 -0
- package/lib/v2/aljazeera/radar.js +62 -0
- package/lib/v2/aljazeera/router.js +3 -0
- package/lib/v2/aljazeera/templates/description.art +8 -0
- package/lib/v2/anquanke/category.js +21 -7
- package/lib/v2/anquanke/maintainer.js +1 -1
- package/lib/v2/anquanke/router.js +1 -1
- package/lib/v2/baidu/tieba/forum.js +1 -1
- 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 +30 -7
- package/lib/v2/bilibili/video-all.js +26 -8
- package/lib/v2/bilibili/video.js +9 -3
- package/lib/v2/bloomberg/index.js +37 -0
- package/lib/v2/bloomberg/maintainer.js +4 -0
- package/lib/v2/bloomberg/radar.js +13 -0
- package/lib/v2/bloomberg/router.js +4 -0
- package/lib/v2/bloomberg/templates/audio_media.art +13 -0
- package/lib/v2/bloomberg/templates/image_figure.art +9 -0
- package/lib/v2/bloomberg/templates/lede_media.art +14 -0
- package/lib/v2/bloomberg/templates/video_media.art +25 -0
- package/lib/v2/bloomberg/utils.js +395 -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/{cbnc → cnbc}/maintainer.js +0 -0
- package/lib/v2/{cbnc → cnbc}/radar.js +0 -0
- package/lib/v2/{cbnc → cnbc}/router.js +0 -0
- package/lib/v2/{cbnc → cnbc}/rss.js +0 -0
- 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/templates/contest.art +5 -10
- package/lib/{routes → v2}/comicskingdom/index.js +18 -19
- package/lib/v2/comicskingdom/maintainer.js +3 -0
- package/lib/v2/comicskingdom/radar.js +13 -0
- package/lib/v2/comicskingdom/router.js +3 -0
- package/lib/v2/comicskingdom/templates/desc.art +1 -0
- package/lib/{routes → v2}/coolapk/dyh.js +2 -6
- package/lib/{routes → v2}/coolapk/hot.js +1 -3
- package/lib/{routes → v2}/coolapk/huati.js +1 -3
- package/lib/v2/coolapk/maintainer.js +9 -0
- package/lib/v2/coolapk/radar.js +31 -0
- package/lib/v2/coolapk/router.js +9 -0
- package/lib/{routes → v2}/coolapk/toutiao.js +1 -3
- package/lib/{routes → v2}/coolapk/tuwen.js +2 -4
- package/lib/{routes → v2}/coolapk/userDynamic.js +1 -3
- package/lib/{routes → v2}/coolapk/utils.js +7 -9
- package/lib/v2/creative-comic/book.js +60 -0
- package/lib/v2/creative-comic/maintainer.js +3 -0
- package/lib/v2/creative-comic/radar.js +13 -0
- package/lib/v2/creative-comic/router.js +3 -0
- package/lib/v2/creative-comic/templates/chapter.art +11 -0
- package/lib/v2/creative-comic/utils.js +96 -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/cw/master.js +4 -1
- package/lib/v2/cw/sub.js +4 -1
- package/lib/v2/cw/today.js +4 -1
- package/lib/v2/cw/utils.js +14 -2
- package/lib/{routes → v2}/dedao/index.js +11 -8
- package/lib/v2/dedao/knowledge.js +64 -0
- package/lib/{routes → v2}/dedao/list.js +16 -10
- package/lib/v2/dedao/maintainer.js +8 -0
- package/lib/v2/dedao/radar.js +50 -0
- package/lib/v2/dedao/router.js +6 -0
- package/lib/v2/dedao/templates/knowledge.art +29 -0
- package/lib/v2/dedao/templates/user.art +38 -0
- package/lib/v2/dedao/user.js +79 -0
- package/lib/v2/docschina/jsweekly.js +114 -0
- package/lib/v2/docschina/maintainer.js +3 -0
- package/lib/v2/docschina/radar.js +13 -0
- package/lib/v2/docschina/router.js +3 -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/ft/maintainer.js +2 -2
- package/lib/v2/ft/utils.js +10 -7
- package/lib/v2/gcores/category.js +16 -6
- package/lib/v2/github/trending.js +68 -36
- package/lib/v2/good/index.js +52 -0
- package/lib/v2/good/maintainer.js +3 -0
- package/lib/v2/good/radar.js +13 -0
- package/lib/v2/good/router.js +3 -0
- package/lib/v2/gov/beijing/bphc/index.js +54 -0
- package/lib/v2/gov/ccdi/utils.js +33 -9
- package/lib/v2/gov/customs/list.js +1 -1
- package/lib/v2/gov/gz/index.js +38 -0
- package/lib/v2/gov/hunan/changsha/major-email.js +52 -0
- package/lib/v2/gov/maintainer.js +10 -1
- package/lib/v2/gov/nmpa/generic.js +1 -1
- package/lib/v2/gov/radar.js +74 -1
- package/lib/v2/gov/router.js +9 -1
- package/lib/v2/gov/sasac/generic.js +42 -0
- package/lib/v2/gov/shanghai/yjj/index.js +3 -1
- 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 +16 -7
- package/lib/v2/hellogithub/index.js +102 -0
- package/lib/v2/hellogithub/maintainer.js +7 -3
- package/lib/v2/hellogithub/radar.js +35 -11
- package/lib/v2/hellogithub/report.js +56 -0
- package/lib/v2/hellogithub/router.js +6 -3
- package/lib/v2/hellogithub/templates/description.art +99 -0
- package/lib/v2/hellogithub/templates/report.art +118 -0
- package/lib/v2/hellogithub/templates/volume.art +36 -0
- package/lib/v2/hellogithub/volume.js +49 -0
- 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/hupu/all.js +8 -8
- package/lib/v2/hupu/bbs.js +1 -1
- package/lib/v2/hupu/templates/description.art +7 -18
- package/lib/v2/hupu/templates/match.art +22 -0
- package/lib/v2/ifeng/maintainer.js +1 -0
- package/lib/v2/ifeng/news.js +54 -0
- package/lib/v2/ifeng/radar.js +7 -0
- package/lib/v2/ifeng/router.js +1 -0
- package/lib/v2/ifeng/templates/description.art +16 -0
- package/lib/v2/jandan/index.js +17 -51
- package/lib/v2/jandan/maintainer.js +1 -1
- 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/jornada/index.js +59 -0
- package/lib/v2/jornada/maintainer.js +3 -0
- package/lib/v2/jornada/radar.js +13 -0
- package/lib/v2/jornada/router.js +3 -0
- package/lib/v2/jseea/maintainer.js +3 -0
- package/lib/v2/jseea/news.js +64 -0
- package/lib/v2/jseea/radar.js +13 -0
- package/lib/v2/jseea/router.js +3 -0
- package/lib/v2/kemono/index.js +2 -2
- package/lib/{routes → v2}/kuaidi100/index.js +0 -0
- package/lib/v2/kuaidi100/maintainer.js +4 -0
- package/lib/v2/kuaidi100/radar.js +25 -0
- package/lib/v2/kuaidi100/router.js +4 -0
- package/lib/{routes → v2}/kuaidi100/supported_company.js +0 -1
- package/lib/{routes → v2}/kuaidi100/utils.js +46 -11
- 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/lianxh/index.js +61 -0
- package/lib/v2/lianxh/maintainer.js +3 -0
- package/lib/v2/lianxh/radar.js +13 -0
- package/lib/v2/lianxh/router.js +3 -0
- package/lib/{routes → v2}/linkresearcher/index.js +16 -13
- package/lib/v2/linkresearcher/maintainer.js +3 -0
- package/lib/v2/linkresearcher/radar.js +19 -0
- package/lib/v2/linkresearcher/router.js +3 -0
- package/lib/v2/liulinblog/utils.js +7 -4
- package/lib/v2/lkong/forum.js +3 -2
- package/lib/v2/lofter/user.js +6 -1
- package/lib/v2/lovelive-anime/maintainer.js +2 -1
- package/lib/v2/lovelive-anime/radar.js +9 -0
- package/lib/v2/lovelive-anime/router.js +1 -0
- package/lib/v2/lovelive-anime/schedules.js +56 -0
- package/lib/v2/lovelive-anime/templates/scheduleDesc.art +3 -0
- package/lib/v2/luogu/contest.js +72 -0
- package/lib/v2/luogu/daily.js +33 -0
- package/lib/v2/luogu/maintainer.js +5 -0
- package/lib/v2/luogu/radar.js +25 -0
- package/lib/v2/luogu/router.js +5 -0
- package/lib/v2/luogu/userFeed.js +30 -0
- package/lib/v2/mckinsey/cn/categoryMap.js +79 -0
- package/lib/v2/mckinsey/cn/index.js +37 -0
- package/lib/v2/mckinsey/radar.js +12 -0
- package/lib/v2/mckinsey/router.js +3 -0
- package/lib/v2/mihoyo/maintainer.js +1 -0
- package/lib/v2/mihoyo/radar.js +20 -1
- package/lib/v2/mihoyo/router.js +1 -0
- package/lib/v2/mihoyo/ys/news.js +81 -0
- package/lib/v2/mirror/index.js +15 -8
- package/lib/v2/mtime/maintainer.js +1 -1
- package/lib/v2/mtime/news.js +28 -24
- package/lib/v2/mtime/radar.js +1 -1
- package/lib/v2/nature/maintainer.js +5 -5
- 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/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/nju/hosptial.js +41 -0
- package/lib/v2/nju/itsc.js +46 -0
- package/lib/v2/nju/maintainer.js +2 -0
- package/lib/v2/nju/radar.js +16 -0
- package/lib/v2/nju/router.js +2 -0
- package/lib/v2/njxzc/home.js +66 -0
- package/lib/v2/njxzc/maintainer.js +3 -0
- package/lib/v2/njxzc/radar.js +13 -0
- package/lib/v2/njxzc/router.js +4 -0
- 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/dc.js +14 -4
- package/lib/v2/nua/gra.js +1 -1
- package/lib/v2/nua/index.js +1 -1
- 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/sxw.js +1 -1
- package/lib/v2/nua/utils.js +45 -30
- 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/picuki/profile.js +14 -2
- package/lib/v2/picuki/templates/video.art +3 -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/pts/index.js +4 -1
- package/lib/{routes → v2}/qingting/channel.js +6 -10
- package/lib/v2/qingting/maintainer.js +4 -0
- package/lib/v2/qingting/podcast.js +77 -0
- package/lib/v2/qingting/radar.js +19 -0
- package/lib/v2/qingting/router.js +4 -0
- package/lib/v2/qipamaijia/index.js +7 -1
- package/lib/v2/qipamaijia/maintainer.js +1 -1
- package/lib/v2/radio/album.js +106 -0
- package/lib/v2/radio/index.js +25 -18
- package/lib/v2/radio/maintainer.js +2 -0
- package/lib/v2/radio/radar.js +15 -3
- package/lib/v2/radio/router.js +2 -0
- package/lib/v2/radio/templates/description.art +7 -4
- package/lib/v2/radio/zhibo.js +73 -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/reuters/common.js +21 -8
- package/lib/v2/reuters/investigates.js +1 -1
- package/lib/v2/reuters/templates/description.art +44 -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/science/current.js +1 -0
- package/lib/v2/science/maintainer.js +3 -3
- package/lib/v2/science/utils.js +2 -2
- package/lib/{routes → v2}/scmp/index.js +7 -8
- package/lib/v2/scmp/maintainer.js +3 -0
- package/lib/v2/scmp/radar.js +13 -0
- package/lib/v2/scmp/router.js +3 -0
- package/lib/v2/sctv/maintainer.js +3 -0
- package/lib/v2/sctv/programme.js +80 -0
- package/lib/v2/sctv/radar.js +13 -0
- package/lib/v2/sctv/router.js +3 -0
- package/lib/v2/sctv/templates/description.art +3 -0
- 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/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/smzdm/article.js +43 -0
- package/lib/v2/smzdm/baoliao.js +43 -0
- package/lib/v2/smzdm/haowen.js +48 -0
- package/lib/v2/smzdm/haowen_fenlei.js +50 -0
- package/lib/v2/smzdm/keyword.js +42 -0
- package/lib/v2/smzdm/maintainer.js +8 -0
- package/lib/v2/smzdm/radar.js +48 -0
- package/lib/{routes → v2}/smzdm/ranking.js +20 -3
- package/lib/v2/smzdm/router.js +8 -0
- package/lib/v2/sse/maintainer.js +1 -1
- package/lib/v2/swpu/cjxy.js +53 -0
- package/lib/v2/swpu/is.js +53 -0
- package/lib/v2/swpu/maintainer.js +2 -0
- package/lib/v2/swpu/radar.js +12 -0
- package/lib/v2/swpu/router.js +2 -0
- package/lib/v2/taoguba/blog.js +28 -3
- package/lib/v2/taoguba/index.js +29 -14
- package/lib/v2/telegram/channel.js +11 -5
- package/lib/v2/tesla/{price/maintainer.js → maintainer.js} +0 -0
- package/lib/v2/tesla/{price/radar.js → radar.js} +0 -0
- package/lib/v2/thecatcity/index.js +48 -0
- package/lib/v2/thecatcity/maintainer.js +3 -0
- package/lib/v2/thecatcity/radar.js +13 -0
- package/lib/v2/thecatcity/router.js +3 -0
- package/lib/v2/thecatcity/termsMap.js +30 -0
- package/lib/v2/thepaper/utils.js +53 -49
- package/lib/v2/theverge/index.js +98 -0
- package/lib/v2/theverge/maintainer.js +3 -0
- package/lib/v2/theverge/radar.js +13 -0
- package/lib/v2/theverge/router.js +3 -0
- 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/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/udn/global/index.js +67 -0
- package/lib/v2/udn/global/tag.js +51 -0
- package/lib/v2/udn/maintainer.js +2 -0
- package/lib/v2/udn/radar.js +15 -1
- package/lib/v2/udn/router.js +2 -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/wallstreetcn/live.js +7 -1
- package/lib/v2/wallstreetcn/templates/description.art +11 -0
- package/lib/v2/warthunder/news.js +1 -1
- 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/wise/maintainer.js +3 -0
- package/lib/v2/wise/pair.js +65 -0
- package/lib/v2/wise/radar.js +11 -0
- package/lib/v2/wise/router.js +3 -0
- package/lib/v2/wise/templates/description.art +17 -0
- package/lib/v2/xueqiu/maintainer.js +1 -0
- package/lib/v2/xueqiu/radar.js +6 -0
- package/lib/v2/xueqiu/router.js +1 -0
- package/lib/v2/xueqiu/today.js +65 -0
- package/lib/v2/ymgal/article.js +61 -0
- package/lib/v2/ymgal/game.js +39 -0
- package/lib/v2/ymgal/maintainer.js +3 -0
- package/lib/v2/ymgal/radar.js +31 -0
- package/lib/v2/ymgal/router.js +4 -0
- package/lib/v2/ymgal/templates/description.art +3 -0
- package/lib/v2/yoasobi-music/info.js +2 -1
- package/lib/v2/youtube/custom.js +45 -0
- package/lib/v2/youtube/radar.js +6 -0
- package/lib/v2/youtube/router.js +1 -0
- package/lib/v2/zhihu/activities.js +6 -10
- package/lib/v2/zhihu/daily.js +25 -0
- package/lib/v2/zhihu/execlib/x-zse-96_v3.js +122 -0
- package/lib/v2/zhihu/pin/utils.js +49 -41
- package/lib/v2/zhihu/posts.js +21 -16
- package/lib/v2/zhihu/question.js +3 -3
- package/lib/v2/zhihu/utils.js +1 -1
- package/lib/v2/zhitongcaijing/index.js +118 -0
- package/lib/v2/zhitongcaijing/maintainer.js +3 -0
- package/lib/v2/zhitongcaijing/radar.js +17 -0
- package/lib/v2/zhitongcaijing/router.js +3 -0
- package/lib/v2/zhitongcaijing/templates/description.art +6 -0
- package/package.json +39 -31
- package/lib/routes/aljazeera/news.js +0 -38
- package/lib/routes/blogs/foreverblog.js +0 -33
- package/lib/routes/dedao/knowledge.js +0 -78
- package/lib/routes/docschina/jsweekly.js +0 -47
- package/lib/routes/gov/jiangsu/eea.js +0 -84
- 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/logseq/changelog.js +0 -42
- package/lib/routes/luogu/contest.js +0 -28
- package/lib/routes/luogu/daily.js +0 -53
- package/lib/routes/luogu/userFeed.js +0 -38
- package/lib/routes/mckinsey/index.js +0 -49
- 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/novel/shuquge.js +0 -63
- package/lib/routes/researchgate/publications.js +0 -60
- package/lib/routes/smzdm/article.js +0 -57
- package/lib/routes/smzdm/baoliao.js +0 -55
- package/lib/routes/smzdm/haowen.js +0 -60
- package/lib/routes/smzdm/haowen_fenlei.js +0 -63
- package/lib/routes/smzdm/keyword.js +0 -39
- package/lib/routes/transferwise/pair.js +0 -64
- package/lib/routes/udn/global.js +0 -61
- 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/verge/index.js +0 -88
- package/lib/routes/weibo/oasis/user.js +0 -17
- package/lib/routes/yuanshen/index.js +0 -70
- 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/hellogithub/article.js +0 -47
- package/lib/v2/hellogithub/month.js +0 -42
- package/lib/v2/hellogithub/ranking.js +0 -39
- package/lib/v2/heu/job/bigemploy.js +0 -42
- package/lib/v2/radio/radio.js +0 -50
- package/lib/v2/zhihu/execlib/g_encrypt.js +0 -407
- package/lib/v2/zhihu/execlib/jsencrypt.js +0 -379
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
4
|
+
const { art } = require('@/utils/render');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
|
|
7
|
+
const ids = {
|
|
8
|
+
recommend: {
|
|
9
|
+
url: 'content/recommend',
|
|
10
|
+
title: '推荐',
|
|
11
|
+
},
|
|
12
|
+
hkstock: {
|
|
13
|
+
url: 'content/hkstock',
|
|
14
|
+
title: '港股',
|
|
15
|
+
},
|
|
16
|
+
meigu: {
|
|
17
|
+
url: 'content/meigu',
|
|
18
|
+
title: '美股',
|
|
19
|
+
},
|
|
20
|
+
agu: {
|
|
21
|
+
url: 'content/agu',
|
|
22
|
+
title: '沪深',
|
|
23
|
+
},
|
|
24
|
+
ct: {
|
|
25
|
+
url: 'content/ct',
|
|
26
|
+
title: '创投',
|
|
27
|
+
},
|
|
28
|
+
esg: {
|
|
29
|
+
url: 'content/esg',
|
|
30
|
+
title: 'ESG',
|
|
31
|
+
},
|
|
32
|
+
aqs: {
|
|
33
|
+
url: 'content/aqs',
|
|
34
|
+
title: '券商',
|
|
35
|
+
},
|
|
36
|
+
ajj: {
|
|
37
|
+
url: 'content/ajj',
|
|
38
|
+
title: '基金',
|
|
39
|
+
},
|
|
40
|
+
focus: {
|
|
41
|
+
url: 'focus',
|
|
42
|
+
title: '要闻',
|
|
43
|
+
},
|
|
44
|
+
announcement: {
|
|
45
|
+
url: 'announcement',
|
|
46
|
+
title: '公告',
|
|
47
|
+
},
|
|
48
|
+
research: {
|
|
49
|
+
url: 'research',
|
|
50
|
+
title: '研究',
|
|
51
|
+
},
|
|
52
|
+
shares: {
|
|
53
|
+
url: 'shares',
|
|
54
|
+
title: '新股',
|
|
55
|
+
},
|
|
56
|
+
bazaar: {
|
|
57
|
+
url: 'bazaar',
|
|
58
|
+
title: '市场',
|
|
59
|
+
},
|
|
60
|
+
company: {
|
|
61
|
+
url: 'company',
|
|
62
|
+
title: '公司',
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
module.exports = async (ctx) => {
|
|
67
|
+
const id = ctx.params.id ?? 'recommend';
|
|
68
|
+
const category = ctx.params.category ?? '';
|
|
69
|
+
|
|
70
|
+
const limit = ctx.query.limit ? parseInt(ctx.query.limit) : 20;
|
|
71
|
+
|
|
72
|
+
const rootUrl = 'https://www.zhitongcaijing.com';
|
|
73
|
+
const currentUrl = `${rootUrl}/${ids[id].url}.html${category === '' ? '' : `?category_key=${category}`}`;
|
|
74
|
+
const apiUrl = `${rootUrl}/${ids[id].url}.html?data_type=1&page=1${category === '' ? '' : `&category_key=${category}`}`;
|
|
75
|
+
|
|
76
|
+
const response = await got({
|
|
77
|
+
method: 'get',
|
|
78
|
+
url: apiUrl,
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
let items = response.data.data.slice(0, limit).map((item) => ({
|
|
82
|
+
title: item.title,
|
|
83
|
+
link: `${rootUrl}${item.url}`,
|
|
84
|
+
description: item.digest,
|
|
85
|
+
author: item.author_info.author_name,
|
|
86
|
+
pubDate: parseDate((item.create_time ?? parseInt(item.original_time)) * 1000),
|
|
87
|
+
category: (item.keywords?.split(',') ?? []).concat([item.category_name ?? item.type_tag]),
|
|
88
|
+
}));
|
|
89
|
+
|
|
90
|
+
items = await Promise.all(
|
|
91
|
+
items.map((item) =>
|
|
92
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
93
|
+
const detailResponse = await got({
|
|
94
|
+
method: 'get',
|
|
95
|
+
url: item.link,
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
const content = cheerio.load(detailResponse.data);
|
|
99
|
+
|
|
100
|
+
content('#subscribe-vip-box').remove();
|
|
101
|
+
content('#news-content').remove();
|
|
102
|
+
|
|
103
|
+
item.description = art(path.join(__dirname, 'templates/description.art'), {
|
|
104
|
+
digest: content('.digetst-box').html() || content('.telegram-origin-contentn').html(),
|
|
105
|
+
description: content('.news-body-content').html(),
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
return item;
|
|
109
|
+
})
|
|
110
|
+
)
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
ctx.state.data = {
|
|
114
|
+
title: `智通财经 - ${ids[id].title}`,
|
|
115
|
+
link: currentUrl,
|
|
116
|
+
item: items,
|
|
117
|
+
};
|
|
118
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'zhitongcaijing.com': {
|
|
3
|
+
_name: '智通财经',
|
|
4
|
+
'.': [
|
|
5
|
+
{
|
|
6
|
+
title: '资讯',
|
|
7
|
+
docs: 'https://docs.rsshub.app/finance.html#zhi-tong-cai-jing-zi-xun',
|
|
8
|
+
source: ['/:category', '/'],
|
|
9
|
+
target: (params, url) => {
|
|
10
|
+
const id = new URL(url).toString().match(/\/(\w+)\.html/)[1];
|
|
11
|
+
const category = new URL(url).searchParams.get('category_key');
|
|
12
|
+
return `/zhitongcaijing/${id}${category ? `/${category}` : ''}`;
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
],
|
|
16
|
+
},
|
|
17
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rsshub",
|
|
3
|
-
"version": "1.0.0-master.
|
|
3
|
+
"version": "1.0.0-master.f961961",
|
|
4
4
|
"description": "Make RSS Great Again!",
|
|
5
5
|
"main": "lib/pkg.js",
|
|
6
6
|
"files": [
|
|
@@ -20,10 +20,17 @@
|
|
|
20
20
|
"format:staged": "eslint \"**/*.{js,yml}\" --fix && node docs/.format/format.js --staged && pretty-quick --staged --verbose --pattern \"**/*.{js,json}\"",
|
|
21
21
|
"format:check": "eslint \"**/*.{js,yml}\" && prettier-check \"**/*.{js,json}\"",
|
|
22
22
|
"jest": "cross-env NODE_ENV=test jest --runInBand --forceExit --detectOpenHandles",
|
|
23
|
-
"jest:coverage": "cross-env NODE_ENV=test jest --coverage --runInBand --forceExit --detectOpenHandles",
|
|
23
|
+
"jest:coverage": "cross-env NODE_ENV=test jest --coverage --reporters=default --reporters=jest-junit --runInBand --forceExit --detectOpenHandles",
|
|
24
24
|
"jest:watch": "cross-env NODE_ENV=test jest --watch",
|
|
25
25
|
"test": "npm run format:check && npm run jest:coverage"
|
|
26
26
|
},
|
|
27
|
+
"reporters": [
|
|
28
|
+
"default",
|
|
29
|
+
"jest-junit"
|
|
30
|
+
],
|
|
31
|
+
"jest-junit": {
|
|
32
|
+
"outputDirectory": "coverage"
|
|
33
|
+
},
|
|
27
34
|
"repository": {
|
|
28
35
|
"type": "git",
|
|
29
36
|
"url": "git+https://github.com/DIYgod/RSSHub.git"
|
|
@@ -41,25 +48,26 @@
|
|
|
41
48
|
},
|
|
42
49
|
"homepage": "https://github.com/DIYgod/RSSHub#readme",
|
|
43
50
|
"devDependencies": {
|
|
44
|
-
"@napi-rs/pinyin": "1.7.
|
|
51
|
+
"@napi-rs/pinyin": "1.7.1",
|
|
45
52
|
"@types/koa": "2.13.5",
|
|
46
|
-
"@vercel/nft": "0.22.
|
|
53
|
+
"@vercel/nft": "0.22.5",
|
|
47
54
|
"@vuepress/plugin-back-to-top": "1.9.7",
|
|
48
55
|
"@vuepress/plugin-google-analytics": "1.9.7",
|
|
49
56
|
"@vuepress/plugin-pwa": "1.9.7",
|
|
50
57
|
"@vuepress/shared-utils": "1.9.7",
|
|
51
58
|
"cross-env": "7.0.3",
|
|
52
|
-
"eslint": "8.
|
|
59
|
+
"eslint": "8.29.0",
|
|
53
60
|
"eslint-config-prettier": "8.5.0",
|
|
54
61
|
"eslint-plugin-prettier": "4.2.1",
|
|
55
|
-
"eslint-plugin-yml": "1.
|
|
56
|
-
"fs-extra": "
|
|
57
|
-
"jest": "29.
|
|
58
|
-
"
|
|
62
|
+
"eslint-plugin-yml": "1.3.0",
|
|
63
|
+
"fs-extra": "11.1.0",
|
|
64
|
+
"jest": "29.3.1",
|
|
65
|
+
"jest-junit": "15.0.0",
|
|
66
|
+
"meilisearch": "0.30.0",
|
|
59
67
|
"mockdate": "3.0.5",
|
|
60
68
|
"nock": "13.2.9",
|
|
61
69
|
"nodemon": "2.0.20",
|
|
62
|
-
"prettier": "2.
|
|
70
|
+
"prettier": "2.8.1",
|
|
63
71
|
"prettier-check": "2.0.0",
|
|
64
72
|
"pretty-quick": "3.1.3",
|
|
65
73
|
"remark": "13.0.0",
|
|
@@ -72,63 +80,63 @@
|
|
|
72
80
|
"request-promise-native": "1.0.9",
|
|
73
81
|
"staged-git-files": "1.3.0",
|
|
74
82
|
"string-width": "4.2.3",
|
|
75
|
-
"supertest": "6.
|
|
83
|
+
"supertest": "6.3.3",
|
|
76
84
|
"tosource": "2.0.0-alpha.3",
|
|
77
85
|
"unified": "9.2.2",
|
|
78
86
|
"vuepress": "1.9.7",
|
|
79
|
-
"vuepress-plugin-meilisearch": "0.
|
|
87
|
+
"vuepress-plugin-meilisearch": "0.13.0",
|
|
80
88
|
"vuepress-plugin-sitemap": "2.3.1",
|
|
81
89
|
"yorkie": "2.0.0"
|
|
82
90
|
},
|
|
83
91
|
"dependencies": {
|
|
84
92
|
"@koa/router": "12.0.0",
|
|
85
|
-
"@postlight/parser": "2.2.
|
|
86
|
-
"@sentry/node": "7.
|
|
93
|
+
"@postlight/parser": "2.2.3",
|
|
94
|
+
"@sentry/node": "7.24.2",
|
|
87
95
|
"aes-js": "3.1.2",
|
|
88
96
|
"art-template": "4.13.2",
|
|
89
97
|
"bbcodejs": "0.0.4",
|
|
90
98
|
"cheerio": "1.0.0-rc.12",
|
|
91
|
-
"chrono-node": "2.4.
|
|
99
|
+
"chrono-node": "2.4.2",
|
|
92
100
|
"city-timezones": "1.2.1",
|
|
93
101
|
"crypto-js": "4.1.1",
|
|
94
102
|
"currency-symbol-map": "5.1.0",
|
|
95
|
-
"dayjs": "1.11.
|
|
96
|
-
"dotenv": "16.0.
|
|
103
|
+
"dayjs": "1.11.7",
|
|
104
|
+
"dotenv": "16.0.3",
|
|
97
105
|
"emailjs-imap-client": "3.1.0",
|
|
98
106
|
"entities": "3.0.1",
|
|
99
107
|
"etag": "1.8.1",
|
|
100
108
|
"fanfou-sdk": "4.2.0",
|
|
101
109
|
"git-rev-sync": "3.0.2",
|
|
102
|
-
"googleapis": "
|
|
103
|
-
"got": "11.8.
|
|
110
|
+
"googleapis": "109.0.1",
|
|
111
|
+
"got": "11.8.6",
|
|
104
112
|
"https-proxy-agent": "5.0.1",
|
|
105
113
|
"iconv-lite": "0.6.3",
|
|
106
114
|
"instagram-private-api": "1.45.3",
|
|
107
|
-
"ioredis": "5.2.
|
|
115
|
+
"ioredis": "5.2.4",
|
|
108
116
|
"ip-regex": "4.3.0",
|
|
109
117
|
"is-localhost-ip": "2.0.0",
|
|
110
|
-
"jsdom": "20.0.
|
|
118
|
+
"jsdom": "20.0.3",
|
|
111
119
|
"json-bigint": "1.0.0",
|
|
112
120
|
"json5": "2.2.1",
|
|
113
|
-
"koa": "2.
|
|
121
|
+
"koa": "2.14.1",
|
|
114
122
|
"koa-basic-auth": "4.0.0",
|
|
115
123
|
"koa-favicon": "2.1.0",
|
|
116
124
|
"koa-mount": "4.0.0",
|
|
117
|
-
"lru-cache": "7.14.
|
|
125
|
+
"lru-cache": "7.14.1",
|
|
118
126
|
"lz-string": "1.4.4",
|
|
119
|
-
"mailparser": "3.
|
|
127
|
+
"mailparser": "3.6.0",
|
|
120
128
|
"markdown-it": "13.0.1",
|
|
121
129
|
"module-alias": "2.2.2",
|
|
122
130
|
"parse-torrent": "9.1.5",
|
|
123
|
-
"pidusage": "3.0.
|
|
131
|
+
"pidusage": "3.0.2",
|
|
124
132
|
"plist": "3.0.6",
|
|
125
|
-
"proxy-chain": "2.0
|
|
126
|
-
"puppeteer": "
|
|
133
|
+
"proxy-chain": "2.2.0",
|
|
134
|
+
"puppeteer": "19.4.0",
|
|
127
135
|
"puppeteer-extra": "3.3.4",
|
|
128
136
|
"puppeteer-extra-plugin-stealth": "2.11.1",
|
|
129
|
-
"query-string": "7.1.
|
|
130
|
-
"rand-user-agent": "1.0.
|
|
131
|
-
"re2": "1.17.
|
|
137
|
+
"query-string": "7.1.3",
|
|
138
|
+
"rand-user-agent": "1.0.93",
|
|
139
|
+
"re2": "1.17.8",
|
|
132
140
|
"require-all": "3.0.0",
|
|
133
141
|
"rss-parser": "3.12.0",
|
|
134
142
|
"showdown": "2.1.0",
|
|
@@ -139,7 +147,7 @@
|
|
|
139
147
|
"torrent-search-api": "2.1.4",
|
|
140
148
|
"tough-cookie": "4.1.2",
|
|
141
149
|
"tunnel": "0.0.6",
|
|
142
|
-
"twitter-api-v2": "1.12.
|
|
150
|
+
"twitter-api-v2": "1.12.9",
|
|
143
151
|
"winston": "3.8.2",
|
|
144
152
|
"xml2js": "0.4.23"
|
|
145
153
|
},
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
const url = require('url');
|
|
2
|
-
const got = require('@/utils/got');
|
|
3
|
-
const cheerio = require('cheerio');
|
|
4
|
-
|
|
5
|
-
module.exports = async (ctx) => {
|
|
6
|
-
const link = `https://chinese.aljazeera.net/news`;
|
|
7
|
-
const response = await got({
|
|
8
|
-
method: 'get',
|
|
9
|
-
url: link,
|
|
10
|
-
});
|
|
11
|
-
const $ = cheerio.load(response.data);
|
|
12
|
-
|
|
13
|
-
const list = $('h3 a')
|
|
14
|
-
.map((_, item) => {
|
|
15
|
-
item = $(item);
|
|
16
|
-
return {
|
|
17
|
-
title: item.text(),
|
|
18
|
-
link: url.resolve(`https://chinese.aljazeera.net`, item.attr('href')),
|
|
19
|
-
};
|
|
20
|
-
})
|
|
21
|
-
.get();
|
|
22
|
-
|
|
23
|
-
ctx.state.data = {
|
|
24
|
-
title: `Aljazeera半岛网 - 新闻`,
|
|
25
|
-
link,
|
|
26
|
-
item: await Promise.all(
|
|
27
|
-
list.map((item) =>
|
|
28
|
-
ctx.cache.tryGet(item.link, async () => {
|
|
29
|
-
const detailResponse = await got({ method: 'get', url: item.link });
|
|
30
|
-
const content = cheerio.load(detailResponse.data);
|
|
31
|
-
item.pubDate = new Date(detailResponse.data.match(/"datePublished": "(.*?)",/)[1]).toUTCString();
|
|
32
|
-
item.description = content('div.wysiwyg').html();
|
|
33
|
-
return item;
|
|
34
|
-
})
|
|
35
|
-
)
|
|
36
|
-
),
|
|
37
|
-
};
|
|
38
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
const got = require('@/utils/got');
|
|
2
|
-
const cheerio = require('cheerio');
|
|
3
|
-
|
|
4
|
-
module.exports = async (ctx) => {
|
|
5
|
-
const response = await got({
|
|
6
|
-
method: 'get',
|
|
7
|
-
url: 'https://www.foreverblog.cn/feeds.html',
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
const data = response.data;
|
|
11
|
-
|
|
12
|
-
const $ = cheerio.load(data);
|
|
13
|
-
const list = $('article[class="post post-type-normal"]');
|
|
14
|
-
|
|
15
|
-
ctx.state.data = {
|
|
16
|
-
title: '十年之约 - 订阅',
|
|
17
|
-
link: 'https://www.foreverblog.cn/feeds.html',
|
|
18
|
-
language: 'zh-cn',
|
|
19
|
-
item:
|
|
20
|
-
list &&
|
|
21
|
-
list
|
|
22
|
-
.map((index, item) => {
|
|
23
|
-
item = $(item);
|
|
24
|
-
return {
|
|
25
|
-
title: item.find('a.post-title-link>span').text(),
|
|
26
|
-
description: item.find('div.post-author').text(),
|
|
27
|
-
link: item.find('a.post-title-link').attr('href'),
|
|
28
|
-
pubDate: item.find('time.post-time').text(),
|
|
29
|
-
};
|
|
30
|
-
})
|
|
31
|
-
.get(),
|
|
32
|
-
};
|
|
33
|
-
};
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
const got = require('@/utils/got');
|
|
2
|
-
const date = require('@/utils/date');
|
|
3
|
-
|
|
4
|
-
module.exports = async (ctx) => {
|
|
5
|
-
const topic = ctx.params.topic || '';
|
|
6
|
-
const type = ctx.params.type || 'true';
|
|
7
|
-
const rootUrl = 'https://www.dedao.cn';
|
|
8
|
-
const detailUrl = `${rootUrl}/pc/ledgers/topic/detail`;
|
|
9
|
-
const currentUrl = `${rootUrl}/knowledge${topic === '' ? '' : '/topic/' + topic}`;
|
|
10
|
-
const apiUrl = `${rootUrl}/pc/ledgers/${topic === '' ? 'notes/friends_timeline' : 'topic/notes/list'}`;
|
|
11
|
-
|
|
12
|
-
let title = '',
|
|
13
|
-
description = '';
|
|
14
|
-
|
|
15
|
-
if (topic !== '') {
|
|
16
|
-
const detailResponse = await got({
|
|
17
|
-
method: 'post',
|
|
18
|
-
url: detailUrl,
|
|
19
|
-
json: {
|
|
20
|
-
incr_view_count: false,
|
|
21
|
-
topic_id_hazy: topic,
|
|
22
|
-
},
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
title = detailResponse.data.c.name;
|
|
26
|
-
description = detailResponse.data.c.intro;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const response = await got({
|
|
30
|
-
method: 'post',
|
|
31
|
-
url: apiUrl,
|
|
32
|
-
json: {
|
|
33
|
-
count: 20,
|
|
34
|
-
load_chain: true,
|
|
35
|
-
is_elected: type === 'true',
|
|
36
|
-
page_id: 0,
|
|
37
|
-
topic_id_hazy: topic,
|
|
38
|
-
version: 2,
|
|
39
|
-
},
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
const items = (topic === '' ? response.data.c.notes : response.data.c.note_detail_list).map((item) => {
|
|
43
|
-
let s_part = '';
|
|
44
|
-
if (item.s_part) {
|
|
45
|
-
const s_author = `<p>引用 ${item.s_part.nick_name} (${item.s_part.v_info}):</p>`;
|
|
46
|
-
const s_content = `<p>${item.s_part.note.replace(/\n\n/g, '</p><p>')}</p> <a href="${rootUrl}/knowledge/note/${item.s_part.note_id_hazy}">[查看原文]</a>`;
|
|
47
|
-
let s_images = '<br>';
|
|
48
|
-
if (item.s_part.images) {
|
|
49
|
-
for (const i of item.s_part.images) {
|
|
50
|
-
s_images += `<img src="${i.match(/"url":"(.*)"/)[1]}">`;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
s_part = s_author + s_content + s_images;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
let f_images = '<br>';
|
|
57
|
-
if (item.f_part.images) {
|
|
58
|
-
for (const i of item.f_part.images) {
|
|
59
|
-
f_images += `<img src="${i.match(/"url":"(.*)"/)[1]}">`;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
return {
|
|
64
|
-
title: item.f_part.note,
|
|
65
|
-
author: item.f_part.nick_name,
|
|
66
|
-
description: `<p>${item.f_part.note.replace(/\n\n/g, '</p><p>')}</p>${f_images}<br>${s_part}`,
|
|
67
|
-
link: `${rootUrl}/knowledge/note/${item.f_part.note_id_hazy}`,
|
|
68
|
-
pubDate: new Date(date(item.f_part.time_desc)).toUTCString(),
|
|
69
|
-
};
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
ctx.state.data = {
|
|
73
|
-
title: `得到 - 知识城邦${title === '' ? '' : ' - ' + title}`,
|
|
74
|
-
link: currentUrl,
|
|
75
|
-
item: items,
|
|
76
|
-
description,
|
|
77
|
-
};
|
|
78
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
const got = require('../../utils/got.js');
|
|
2
|
-
const cheerio = require('cheerio');
|
|
3
|
-
|
|
4
|
-
module.exports = async (ctx) => {
|
|
5
|
-
const baseURL = 'https://weekly.docschina.org';
|
|
6
|
-
const res = await got({
|
|
7
|
-
method: 'get',
|
|
8
|
-
url: baseURL + '/javascript',
|
|
9
|
-
headers: {
|
|
10
|
-
Referer: baseURL,
|
|
11
|
-
},
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
const $ = cheerio.load(res.data);
|
|
15
|
-
|
|
16
|
-
const link = $('.sidebar-link').eq(1).attr('href');
|
|
17
|
-
const title = $('.site-name').text();
|
|
18
|
-
const description = $('a[href="https://javascriptweekly.com/"]').parent().text();
|
|
19
|
-
|
|
20
|
-
const articles = await got({
|
|
21
|
-
method: 'get',
|
|
22
|
-
url: baseURL + link,
|
|
23
|
-
headers: {
|
|
24
|
-
Referer: baseURL,
|
|
25
|
-
},
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
const $2 = cheerio.load(articles.data);
|
|
29
|
-
const articlesList = $2('.page .content').children();
|
|
30
|
-
const items = articlesList
|
|
31
|
-
.map((item, element) => {
|
|
32
|
-
const $article = cheerio.load(element);
|
|
33
|
-
return {
|
|
34
|
-
title: $article('h3>a[rel="noopener noreferrer"]').text(),
|
|
35
|
-
description: $article('p').text(),
|
|
36
|
-
link: $article('h3>a[rel="noopener noreferrer"]').attr('href'),
|
|
37
|
-
};
|
|
38
|
-
})
|
|
39
|
-
.get()
|
|
40
|
-
.filter((item) => item.title !== '');
|
|
41
|
-
ctx.state.data = {
|
|
42
|
-
title,
|
|
43
|
-
link: baseURL,
|
|
44
|
-
description,
|
|
45
|
-
item: items.splice(0),
|
|
46
|
-
};
|
|
47
|
-
};
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
const got = require('@/utils/got');
|
|
2
|
-
const cheerio = require('cheerio');
|
|
3
|
-
|
|
4
|
-
// 参考 bit/jwc 北京理工大学的的页面写成
|
|
5
|
-
|
|
6
|
-
const baseUrl = 'http://www.jseea.cn/';
|
|
7
|
-
const siteTitle = '--江苏省教育考试院';
|
|
8
|
-
|
|
9
|
-
const catrgoryMap = {
|
|
10
|
-
zkyw: { title: '招考要闻', suffix: 'zkyw/zkyw_channel173_1.html' },
|
|
11
|
-
zcgd: { title: '政策规定', suffix: 'plank/plank_index_1.html' },
|
|
12
|
-
zkxx: { title: '招考信息', suffix: 'enrollment/enrollment_index_1.html' },
|
|
13
|
-
zkzl: { title: '招考资料', suffix: 'enrollmentinfo/enrollmentinfo_index_1.html' },
|
|
14
|
-
xxjl: { title: '学习交流', suffix: 'learningexchange/learningexchange_index_1.html' },
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
// 专门定义一个function用于加载文章内容
|
|
18
|
-
async function load(link) {
|
|
19
|
-
// 异步请求文章
|
|
20
|
-
const response = await got.get(link);
|
|
21
|
-
// 加载文章内容
|
|
22
|
-
const $ = cheerio.load(response.data);
|
|
23
|
-
// 提取文章内容
|
|
24
|
-
const description = $('#left-container').html();
|
|
25
|
-
// 返回解析的结果
|
|
26
|
-
return { description };
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
module.exports = async (ctx) => {
|
|
30
|
-
// 默认 正常规定 然后获取列表页面
|
|
31
|
-
const type = ctx.params.type || 'zcgd';
|
|
32
|
-
const listPageUrl = baseUrl + catrgoryMap[type].suffix;
|
|
33
|
-
const response = await got({
|
|
34
|
-
method: 'get',
|
|
35
|
-
url: listPageUrl,
|
|
36
|
-
headers: {
|
|
37
|
-
Referer: baseUrl,
|
|
38
|
-
},
|
|
39
|
-
});
|
|
40
|
-
const $ = cheerio.load(response.data);
|
|
41
|
-
|
|
42
|
-
// console.log(type+":"+listPageUrl);
|
|
43
|
-
// 获取当前页面的 list
|
|
44
|
-
const list = $('td.content_css2>ul>li');
|
|
45
|
-
|
|
46
|
-
const result = await Promise.all(
|
|
47
|
-
// 遍历每一篇文章
|
|
48
|
-
list
|
|
49
|
-
.map(async (item) => {
|
|
50
|
-
const $ = cheerio.load(list[item]); // 将列表项加载成 html
|
|
51
|
-
const $rel_url = $('a').attr('href'); // 获取 每一项的url
|
|
52
|
-
|
|
53
|
-
// 获取绝对路径 招考要闻是绝对路径
|
|
54
|
-
const $item_url = type === 'zkyw' ? $rel_url : baseUrl + $rel_url;
|
|
55
|
-
const $title = $('a').attr('title'); // 获取每个的标题
|
|
56
|
-
|
|
57
|
-
const date_txt = $.text().match(/[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/); // 匹配 yyyy-mm-dd格式时间
|
|
58
|
-
const $pubdate = new Date(date_txt); // 正则匹配发布时间 然后转换成时间
|
|
59
|
-
|
|
60
|
-
// console.log(item + ":" + $item_url + ":" + $title + ":" + date_txt);
|
|
61
|
-
// 列表上提取到的信息
|
|
62
|
-
// 标题 链接
|
|
63
|
-
const single = {
|
|
64
|
-
title: $title,
|
|
65
|
-
pubDate: $pubdate,
|
|
66
|
-
link: $item_url,
|
|
67
|
-
guid: $item_url,
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
// 对于列表的每一项, 单独获取 时间与详细内容
|
|
71
|
-
const other = await ctx.cache.tryGet($item_url, () => load($item_url));
|
|
72
|
-
// 合并解析后的结果集作为该篇文章最终的输出结果
|
|
73
|
-
return Promise.resolve(Object.assign({}, single, other));
|
|
74
|
-
})
|
|
75
|
-
.get()
|
|
76
|
-
);
|
|
77
|
-
|
|
78
|
-
ctx.state.data = {
|
|
79
|
-
title: catrgoryMap[type].title + siteTitle,
|
|
80
|
-
link: baseUrl,
|
|
81
|
-
description: catrgoryMap[type].title + siteTitle,
|
|
82
|
-
item: result,
|
|
83
|
-
};
|
|
84
|
-
};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
const got = require('@/utils/got');
|
|
2
|
-
const cheerio = require('cheerio');
|
|
3
|
-
|
|
4
|
-
module.exports = async (ctx) => {
|
|
5
|
-
const { advance } = ctx.params;
|
|
6
|
-
const link = `http://sousuo.gov.cn/list.htm`;
|
|
7
|
-
const params = new URLSearchParams({
|
|
8
|
-
n: 20,
|
|
9
|
-
t: 'govall',
|
|
10
|
-
sort: 'pubtime',
|
|
11
|
-
advance: 'true',
|
|
12
|
-
});
|
|
13
|
-
const query = `${params.toString()}&${advance}`;
|
|
14
|
-
const res = await got.get(link, {
|
|
15
|
-
searchParams: query.replace(/([\u4e00-\u9fa5])/g, (str) => encodeURIComponent(str)),
|
|
16
|
-
});
|
|
17
|
-
const $list = cheerio.load(res.data);
|
|
18
|
-
|
|
19
|
-
ctx.state.data = {
|
|
20
|
-
title: `信息稿件 - 中国政府网`,
|
|
21
|
-
link: `${link}?${query}`,
|
|
22
|
-
item: await Promise.all(
|
|
23
|
-
$list('body > div.dataBox > table > tbody > tr')
|
|
24
|
-
.slice(1)
|
|
25
|
-
.map(async (_, el) => {
|
|
26
|
-
const item = $list(el);
|
|
27
|
-
|
|
28
|
-
const number = item.find('td.info').next();
|
|
29
|
-
const title = item.find('td.info > a');
|
|
30
|
-
const href = title.attr('href');
|
|
31
|
-
|
|
32
|
-
const key = `gov_zhengce: ${href}`;
|
|
33
|
-
let description;
|
|
34
|
-
const value = await ctx.cache.get(key);
|
|
35
|
-
|
|
36
|
-
if (value) {
|
|
37
|
-
description = value;
|
|
38
|
-
} else {
|
|
39
|
-
try {
|
|
40
|
-
const contentData = await got.get(href);
|
|
41
|
-
const $content = cheerio.load(contentData.data);
|
|
42
|
-
description = $content('#UCAP-CONTENT').html();
|
|
43
|
-
} catch (error) {
|
|
44
|
-
description = '文章已被删除';
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
ctx.cache.set(key, description);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
return {
|
|
51
|
-
title: number.text() + ' | ' + title.text(),
|
|
52
|
-
description,
|
|
53
|
-
link: href,
|
|
54
|
-
};
|
|
55
|
-
})
|
|
56
|
-
.get()
|
|
57
|
-
),
|
|
58
|
-
};
|
|
59
|
-
};
|