rsshub 1.0.0-master.f7f8b7a → 1.0.0-master.f812e91
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 +6 -4
- package/lib/radar-rules.js +0 -93
- package/lib/router.js +5 -297
- package/lib/routes/199it/category.js +1 -1
- package/lib/routes/199it/tag.js +1 -1
- package/lib/routes/199it/utils.js +1 -1
- package/lib/v2/9to5/utils.js +1 -1
- package/lib/v2/aeon/utils.js +1 -1
- package/lib/v2/agirls/maintainer.js +0 -1
- package/lib/v2/agirls/radar.js +0 -6
- package/lib/v2/agirls/router.js +0 -1
- package/lib/v2/artstation/maintainer.js +3 -0
- package/lib/v2/artstation/radar.js +13 -0
- package/lib/v2/artstation/router.js +3 -0
- package/lib/v2/artstation/templates/description.art +17 -0
- package/lib/v2/artstation/user.js +98 -0
- package/lib/v2/bilibili/maintainer.js +0 -5
- package/lib/v2/bilibili/radar.js +0 -6
- package/lib/v2/bilibili/router.js +0 -5
- package/lib/v2/cctv/maintainer.js +0 -1
- package/lib/v2/cctv/radar.js +0 -6
- package/lib/v2/cctv/router.js +0 -1
- package/lib/v2/curius/templates/description.art +1 -1
- package/lib/v2/dahecube/index.js +1 -1
- package/lib/v2/deeplearning/maintainer.js +3 -0
- package/lib/v2/deeplearning/radar.js +13 -0
- package/lib/v2/deeplearning/router.js +3 -0
- package/lib/v2/deeplearning/thebatch.js +36 -0
- package/lib/v2/diandong/maintainer.js +0 -1
- package/lib/v2/diandong/radar.js +0 -6
- package/lib/v2/diandong/router.js +0 -1
- package/lib/v2/dx2025/radar.js +0 -6
- package/lib/v2/eastday/maintainer.js +0 -1
- package/lib/v2/eastday/radar.js +0 -6
- package/lib/v2/eastday/router.js +0 -1
- package/lib/v2/economist/maintainer.js +0 -2
- package/lib/v2/economist/radar.js +0 -8
- package/lib/v2/economist/router.js +0 -2
- package/lib/v2/ft/maintainer.js +0 -1
- package/lib/v2/ft/radar.js +0 -13
- package/lib/v2/ft/router.js +0 -1
- package/lib/v2/github/radar.js +12 -12
- package/lib/v2/gov/chinamine-safety/util.js +77 -0
- package/lib/v2/gov/chinamine-safety/xw.js +37 -0
- package/lib/v2/gov/chinamine-safety/zfxxgk.js +36 -0
- package/lib/v2/gov/maintainer.js +2 -0
- package/lib/v2/gov/radar.js +191 -0
- package/lib/v2/gov/router.js +2 -0
- package/lib/v2/hellobtc/maintainer.js +0 -1
- package/lib/v2/hellobtc/radar.js +0 -6
- package/lib/v2/hellobtc/router.js +0 -1
- package/lib/v2/instagram/radar.js +2 -2
- package/lib/v2/jianshu/maintainer.js +5 -0
- package/lib/v2/jianshu/radar.js +25 -0
- package/lib/v2/jianshu/router.js +5 -0
- package/lib/{routes → v2}/jianshu/utils.js +18 -26
- package/lib/v2/nhk/news.js +1 -1
- package/lib/v2/nytimes/radar.js +0 -6
- package/lib/v2/nytimes/router.js +0 -1
- package/lib/v2/qweather/3days.js +1 -1
- package/lib/v2/reuters/common.js +55 -48
- package/lib/v2/sehuatang/index.js +10 -12
- package/lib/v2/sehuatang/user.js +11 -12
- package/lib/v2/thenewslens/radar.js +0 -6
- package/lib/v2/thoughtco/index.js +1 -1
- package/lib/v2/threads/index.js +1 -1
- package/lib/v2/tophub/list.js +40 -0
- package/lib/v2/tophub/maintainer.js +1 -0
- package/lib/v2/tophub/radar.js +6 -0
- package/lib/v2/tophub/router.js +1 -0
- package/lib/v2/tophub/templates/rank.art +22 -0
- package/lib/v2/twreporter/maintainer.js +0 -2
- package/lib/v2/twreporter/radar.js +0 -12
- package/lib/v2/twreporter/router.js +0 -2
- package/lib/v2/worldjournal/index.js +1 -1
- package/lib/v2/woshipm/maintainer.js +0 -2
- package/lib/v2/woshipm/radar.js +0 -12
- package/lib/v2/woshipm/router.js +0 -2
- package/lib/v2/zhihu/maintainer.js +2 -0
- package/lib/v2/zhihu/radar.js +18 -0
- package/lib/v2/zhihu/router.js +2 -0
- package/lib/v2/zhihu/xhu/activities.js +112 -0
- package/lib/v2/zhihu/xhu/answers.js +31 -0
- package/lib/views/rss3-ums.js +1 -1
- package/package.json +3 -3
- package/lib/routes/8btc/author.js +0 -49
- package/lib/routes/8btc/news/flash.js +0 -41
- package/lib/routes/91ddcc/stage.js +0 -48
- package/lib/routes/91ddcc/user.js +0 -45
- package/lib/routes/93/index.js +0 -50
- package/lib/routes/allnow/column.js +0 -7
- package/lib/routes/allnow/index.js +0 -5
- package/lib/routes/allnow/tag.js +0 -7
- package/lib/routes/allnow/user.js +0 -7
- package/lib/routes/allnow/utils.js +0 -67
- package/lib/routes/andyt/index.js +0 -36
- package/lib/routes/asahi/area.js +0 -57
- package/lib/routes/baidu/daily.js +0 -55
- package/lib/routes/bell-labs/events-news.js +0 -70
- package/lib/routes/bihu/activaties.js +0 -76
- package/lib/routes/bioon/latest.js +0 -51
- package/lib/routes/bishijie/kuaixun.js +0 -21
- package/lib/routes/bjnews/epaper.js +0 -80
- package/lib/routes/bof/home.js +0 -42
- package/lib/routes/boston/index.js +0 -73
- package/lib/routes/buaq/index.js +0 -31
- package/lib/routes/cgtn/pick.js +0 -45
- package/lib/routes/cgtn/top.js +0 -45
- package/lib/routes/chinadialogue/column.js +0 -58
- package/lib/routes/chinadialogue/topics.js +0 -55
- package/lib/routes/chinalaborwatch/reports.js +0 -53
- package/lib/routes/chinatimes/index.js +0 -115
- package/lib/routes/cmes/news.js +0 -64
- package/lib/routes/commonapp/blog.js +0 -42
- package/lib/routes/cria/news.js +0 -57
- package/lib/routes/dayone/blog.js +0 -56
- package/lib/routes/deeplearningai/thebatch.js +0 -29
- package/lib/routes/dianping/user.js +0 -98
- package/lib/routes/donews/index.js +0 -59
- package/lib/routes/donews/utils.js +0 -19
- package/lib/routes/dsb/area.js +0 -33
- package/lib/routes/dxy/vaccine.js +0 -109
- package/lib/routes/esquirehk/tag.js +0 -71
- package/lib/routes/facebook/page.js +0 -128
- package/lib/routes/feixuew/index.js +0 -63
- package/lib/routes/fjnews/fznews.js +0 -55
- package/lib/routes/fjnews/jjnews.js +0 -43
- package/lib/routes/fulinian/index.js +0 -50
- package/lib/routes/gab/explore.js +0 -31
- package/lib/routes/gamegrape/index.js +0 -73
- package/lib/routes/gvm/index.js +0 -94
- package/lib/routes/hkcd/pdf.js +0 -30
- package/lib/routes/hkcnews/news.js +0 -63
- package/lib/routes/hkgolden/index.js +0 -110
- package/lib/routes/huawei/xinsheng/index.js +0 -61
- package/lib/routes/iea/index.js +0 -53
- package/lib/routes/iie/blog.js +0 -47
- package/lib/routes/imaijia/category.js +0 -63
- package/lib/routes/itjuzi/invest.js +0 -32
- package/lib/routes/itjuzi/merge.js +0 -32
- package/lib/routes/iyiou/index.js +0 -41
- package/lib/routes/jianshu/trending.js +0 -28
- package/lib/routes/jiazhen108/index.js +0 -47
- package/lib/routes/jinritoutiao/keyword.js +0 -27
- package/lib/routes/juesheng/index.js +0 -49
- package/lib/routes/krankenkassen/index.js +0 -54
- package/lib/routes/kzfeed/topic.js +0 -122
- package/lib/routes/lingyi/index.js +0 -64
- package/lib/routes/lowendtalk/discussion.js +0 -43
- package/lib/routes/makeuseof/index.js +0 -59
- package/lib/routes/matataki/site/posts/author.js +0 -17
- package/lib/routes/matataki/site/posts/favorite.js +0 -42
- package/lib/routes/matataki/site/posts/scoreranking.js +0 -15
- package/lib/routes/matataki/site/posts/tag.js +0 -16
- package/lib/routes/matataki/site/posts/timeranking.js +0 -15
- package/lib/routes/matataki/site/posts/token.js +0 -18
- package/lib/routes/matataki/utils/matataki-utils.js +0 -125
- package/lib/routes/mi/board.js +0 -36
- package/lib/routes/mitbbs/index.js +0 -54
- package/lib/routes/nba/app_news.js +0 -40
- package/lib/routes/newsmth/account.js +0 -39
- package/lib/routes/newsmth/section.js +0 -99
- package/lib/routes/northhouse/index.js +0 -54
- package/lib/routes/or/index.js +0 -54
- package/lib/routes/partnershiponai/resources.js +0 -49
- package/lib/routes/pintu360/index.js +0 -54
- package/lib/routes/plainlaw/archives.js +0 -42
- package/lib/routes/pmcaff/user.js +0 -56
- package/lib/routes/polar/blog.js +0 -47
- package/lib/routes/popiask/questions.js +0 -41
- package/lib/routes/popiask/tapechat_questions.js +0 -43
- package/lib/routes/popyard/index.js +0 -93
- package/lib/routes/qlwb/city.js +0 -54
- package/lib/routes/qlwb/news.js +0 -37
- package/lib/routes/sbs/chinese.js +0 -70
- package/lib/routes/sixthtone/news.js +0 -52
- package/lib/routes/socialbeta/hunt.js +0 -29
- package/lib/routes/soomal/topics.js +0 -130
- package/lib/routes/tam/forecast.js +0 -53
- package/lib/routes/tanwu/products.js +0 -27
- package/lib/routes/tencent/guyu/channel.js +0 -64
- package/lib/routes/thrillist/index.js +0 -67
- package/lib/routes/tianya/comments.js +0 -41
- package/lib/routes/tianya/index.js +0 -32
- package/lib/routes/tianya/user.js +0 -34
- package/lib/routes/tuicool/mags.js +0 -41
- package/lib/routes/voa/day-photos.js +0 -54
- package/lib/routes/vuevideo/user.js +0 -60
- package/lib/routes/weseepro/circle.js +0 -38
- package/lib/routes/weseepro/newest-direct.js +0 -69
- package/lib/routes/weseepro/newest.js +0 -69
- package/lib/routes/whalegogo/home.js +0 -43
- package/lib/routes/whalegogo/portal.js +0 -57
- package/lib/routes/wired/tag.js +0 -31
- package/lib/routes/wukong/user.js +0 -93
- package/lib/routes/xici/index.js +0 -33
- package/lib/routes/yicas/blog.js +0 -52
- package/lib/routes/yidoutang/index.js +0 -33
- package/lib/routes/zfrontier/board_postlist.js +0 -36
- package/lib/routes/zfrontier/postlist.js +0 -33
- package/lib/routes/zzz/index.js +0 -59
- package/lib/v2/2047/index.js +0 -55
- package/lib/v2/2047/maintainer.js +0 -3
- package/lib/v2/2047/radar.js +0 -13
- package/lib/v2/2047/router.js +0 -3
- package/lib/v2/agirls/topic.js +0 -44
- package/lib/v2/allrecode/index.js +0 -65
- package/lib/v2/allrecode/maintainer.js +0 -5
- package/lib/v2/allrecode/news.js +0 -35
- package/lib/v2/allrecode/radar.js +0 -25
- package/lib/v2/allrecode/router.js +0 -4
- package/lib/v2/appledaily/index.js +0 -65
- package/lib/v2/appledaily/maintainer.js +0 -3
- package/lib/v2/appledaily/radar.js +0 -157
- package/lib/v2/appledaily/router.js +0 -3
- package/lib/v2/audiobar/latest.js +0 -53
- package/lib/v2/audiobar/maintainer.js +0 -3
- package/lib/v2/audiobar/radar.js +0 -13
- package/lib/v2/audiobar/router.js +0 -3
- package/lib/v2/baijing/index.js +0 -54
- package/lib/v2/baijing/maintainer.js +0 -3
- package/lib/v2/baijing/radar.js +0 -22
- package/lib/v2/baijing/router.js +0 -3
- package/lib/v2/bilibili/blackboard.js +0 -31
- package/lib/v2/bilibili/channel.js +0 -31
- package/lib/v2/bilibili/online.js +0 -25
- package/lib/v2/bilibili/topic.js +0 -50
- package/lib/v2/bilibili/video-all.js +0 -74
- package/lib/v2/cctv/special.js +0 -110
- package/lib/v2/cntheory/maintainer.js +0 -3
- package/lib/v2/cntheory/paper.js +0 -89
- package/lib/v2/cntheory/radar.js +0 -13
- package/lib/v2/cntheory/router.js +0 -3
- package/lib/v2/cntheory/templates/description.art +0 -2
- package/lib/v2/diandong/ddh.js +0 -51
- package/lib/v2/disinformationindex/blog.js +0 -48
- package/lib/v2/disinformationindex/maintainer.js +0 -4
- package/lib/v2/disinformationindex/radar.js +0 -19
- package/lib/v2/disinformationindex/research.js +0 -45
- package/lib/v2/disinformationindex/router.js +0 -4
- package/lib/v2/disinformationindex/templates/description.art +0 -7
- package/lib/v2/eastday/find.js +0 -49
- package/lib/v2/economist/download.js +0 -30
- package/lib/v2/economist/gre-vocabulary.js +0 -19
- package/lib/v2/eet-china/maintainer.js +0 -4
- package/lib/v2/eet-china/mp/index.js +0 -10
- package/lib/v2/eet-china/mp/tags.js +0 -10
- package/lib/v2/eet-china/mp/util.js +0 -67
- package/lib/v2/eet-china/radar.js +0 -24
- package/lib/v2/eet-china/router.js +0 -4
- package/lib/v2/ezone/index.js +0 -70
- package/lib/v2/ezone/maintainer.js +0 -3
- package/lib/v2/ezone/radar.js +0 -13
- package/lib/v2/ezone/router.js +0 -3
- package/lib/v2/filmdeepfocus/index.js +0 -58
- package/lib/v2/filmdeepfocus/maintainer.js +0 -3
- package/lib/v2/filmdeepfocus/radar.js +0 -13
- package/lib/v2/filmdeepfocus/router.js +0 -3
- package/lib/v2/ft/myft.js +0 -51
- package/lib/v2/good/index.js +0 -53
- package/lib/v2/good/maintainer.js +0 -3
- package/lib/v2/good/radar.js +0 -13
- package/lib/v2/good/router.js +0 -3
- package/lib/v2/gq/maintainer.js +0 -3
- package/lib/v2/gq/radar.js +0 -13
- package/lib/v2/gq/router.js +0 -3
- package/lib/v2/gq/templates/embed-article.art +0 -1
- package/lib/v2/gq/templates/embed-product.art +0 -4
- package/lib/v2/gq/templates/img.art +0 -6
- package/lib/v2/gq/templates/tw.art +0 -3
- package/lib/v2/gq/templates/videoObject.art +0 -6
- package/lib/v2/gq/templates/youtube.art +0 -3
- package/lib/v2/gq/tw/index.js +0 -165
- package/lib/v2/guandian/index.js +0 -37
- package/lib/v2/guandian/maintainer.js +0 -3
- package/lib/v2/guandian/radar.js +0 -13
- package/lib/v2/guandian/router.js +0 -3
- package/lib/v2/gz-cmc/index.js +0 -137
- package/lib/v2/gz-cmc/maintainer.js +0 -3
- package/lib/v2/gz-cmc/radar.js +0 -12
- package/lib/v2/gz-cmc/router.js +0 -3
- package/lib/v2/gz-cmc/templates/description.art +0 -3
- package/lib/v2/gzh360/_README +0 -1
- package/lib/v2/gzh360/category.js +0 -8
- package/lib/v2/gzh360/gzh.js +0 -18
- package/lib/v2/gzh360/maintainer.js +0 -4
- package/lib/v2/gzh360/radar.js +0 -19
- package/lib/v2/gzh360/router.js +0 -4
- package/lib/v2/gzh360/universal.js +0 -53
- package/lib/v2/gzh360/utils.js +0 -62
- package/lib/v2/hellobtc/topic.js +0 -43
- package/lib/v2/hjedd/article.js +0 -27
- package/lib/v2/hjedd/hot.js +0 -14
- package/lib/v2/hjedd/latest.js +0 -14
- package/lib/v2/hjedd/maintainer.js +0 -10
- package/lib/v2/hjedd/news.js +0 -14
- package/lib/v2/hjedd/notice.js +0 -14
- package/lib/v2/hjedd/original.js +0 -14
- package/lib/v2/hjedd/radar.js +0 -55
- package/lib/v2/hjedd/router.js +0 -10
- package/lib/v2/hjedd/templates/attachment.art +0 -7
- package/lib/v2/hjedd/top.js +0 -14
- package/lib/v2/hjedd/utils.js +0 -111
- package/lib/v2/hket/index.js +0 -122
- package/lib/v2/hket/maintainer.js +0 -3
- package/lib/v2/hket/radar.js +0 -45
- package/lib/v2/hket/router.js +0 -3
- package/lib/v2/hket/templates/description.art +0 -1
- package/lib/v2/hket/templates/image.art +0 -1
- package/lib/v2/hotchina/index.js +0 -55
- package/lib/v2/hotchina/maintainer.js +0 -5
- package/lib/v2/hotchina/radar.js +0 -25
- package/lib/v2/hotchina/router.js +0 -3
- package/lib/v2/hyqss/index.js +0 -89
- package/lib/v2/hyqss/maintainer.js +0 -4
- package/lib/v2/hyqss/radar.js +0 -22
- package/lib/v2/hyqss/router.js +0 -3
- package/lib/v2/i-cable/category.js +0 -74
- package/lib/v2/i-cable/maintainer.js +0 -3
- package/lib/v2/i-cable/radar.js +0 -13
- package/lib/v2/i-cable/router.js +0 -3
- package/lib/v2/i-cable/templates/desc.art +0 -8
- package/lib/v2/islander/maintainer.js +0 -4
- package/lib/v2/islander/radar.js +0 -19
- package/lib/v2/islander/router.js +0 -4
- package/lib/v2/islander/search.js +0 -33
- package/lib/v2/islander/top30event.js +0 -28
- package/lib/v2/knowmedia/index.js +0 -38
- package/lib/v2/knowmedia/maintainer.js +0 -3
- package/lib/v2/knowmedia/radar.js +0 -31
- package/lib/v2/knowmedia/router.js +0 -3
- package/lib/v2/knowmedia/templates/desc.art +0 -3
- package/lib/v2/kuwaitlocal/index.js +0 -47
- package/lib/v2/kuwaitlocal/maintainer.js +0 -4
- package/lib/v2/kuwaitlocal/radar.js +0 -19
- package/lib/v2/kuwaitlocal/router.js +0 -3
- package/lib/v2/mclaren/index.js +0 -96
- package/lib/v2/mclaren/maintainer.js +0 -3
- package/lib/v2/mclaren/radar.js +0 -29
- package/lib/v2/mclaren/router.js +0 -3
- package/lib/v2/mclaren/templates/desc.art +0 -6
- package/lib/v2/mobilism/forums.js +0 -75
- package/lib/v2/mobilism/maintainer.js +0 -4
- package/lib/v2/mobilism/portal.js +0 -54
- package/lib/v2/mobilism/radar.js +0 -23
- package/lib/v2/mobilism/router.js +0 -4
- package/lib/v2/nmbxd1/forum.js +0 -58
- package/lib/v2/nmbxd1/maintainer.js +0 -3
- package/lib/v2/nmbxd1/radar.js +0 -13
- package/lib/v2/nmbxd1/router.js +0 -3
- package/lib/v2/nmbxd1/templates/description.art +0 -65
- package/lib/v2/nytimes/author.js +0 -43
- package/lib/v2/pmthinking/index.js +0 -61
- package/lib/v2/pmthinking/maintainer.js +0 -3
- package/lib/v2/pmthinking/radar.js +0 -13
- package/lib/v2/pmthinking/router.js +0 -3
- package/lib/v2/pmthinking/templates/description.art +0 -4
- package/lib/v2/qdaily/index.js +0 -87
- package/lib/v2/qdaily/maintainer.js +0 -3
- package/lib/v2/qdaily/radar.js +0 -25
- package/lib/v2/qdaily/router.js +0 -3
- package/lib/v2/qdaily/templates/article.art +0 -5
- package/lib/v2/qianp/maintainer.js +0 -3
- package/lib/v2/qianp/news.js +0 -48
- package/lib/v2/qianp/radar.js +0 -13
- package/lib/v2/qianp/router.js +0 -3
- package/lib/v2/radiofrance/geopolitique.js +0 -33
- package/lib/v2/radiofrance/maintainer.js +0 -3
- package/lib/v2/radiofrance/radar.js +0 -13
- package/lib/v2/radiofrance/router.js +0 -3
- package/lib/v2/radiofrance/templates/article.art +0 -6
- package/lib/v2/shuiguopai/index.js +0 -80
- package/lib/v2/shuiguopai/maintainer.js +0 -3
- package/lib/v2/shuiguopai/radar.js +0 -13
- package/lib/v2/shuiguopai/router.js +0 -3
- package/lib/v2/shuiguopai/templates/description.art +0 -8
- package/lib/v2/taiwannews/hot.js +0 -52
- package/lib/v2/taiwannews/maintainer.js +0 -3
- package/lib/v2/taiwannews/radar.js +0 -13
- package/lib/v2/taiwannews/router.js +0 -3
- package/lib/v2/twreporter/category.js +0 -40
- package/lib/v2/twreporter/photography.js +0 -46
- package/lib/v2/verse/articles.js +0 -42
- package/lib/v2/verse/maintainer.js +0 -3
- package/lib/v2/verse/radar.js +0 -13
- package/lib/v2/verse/router.js +0 -3
- package/lib/v2/watchout/index.js +0 -51
- package/lib/v2/watchout/maintainer.js +0 -3
- package/lib/v2/watchout/radar.js +0 -13
- package/lib/v2/watchout/router.js +0 -3
- package/lib/v2/woshipm/bookmarks.js +0 -34
- package/lib/v2/woshipm/latest.js +0 -27
- package/lib/v2/wp-china/maintainer.js +0 -3
- package/lib/v2/wp-china/news.js +0 -56
- package/lib/v2/wp-china/radar.js +0 -13
- package/lib/v2/wp-china/router.js +0 -3
- package/lib/v2/wxkol/maintainer.js +0 -3
- package/lib/v2/wxkol/radar.js +0 -13
- package/lib/v2/wxkol/router.js +0 -3
- package/lib/v2/wxkol/show.js +0 -81
- package/lib/v2/xwlb/index.js +0 -40
- package/lib/v2/xwlb/maintainer.js +0 -4
- package/lib/v2/xwlb/radar.js +0 -13
- package/lib/v2/xwlb/router.js +0 -4
- package/lib/v2/yaohuo/index.js +0 -30
- package/lib/v2/yaohuo/maintainer.js +0 -3
- package/lib/v2/yaohuo/radar.js +0 -13
- package/lib/v2/yaohuo/router.js +0 -3
- package/lib/v2/yunspe/maintainer.js +0 -3
- package/lib/v2/yunspe/newsflash.js +0 -42
- package/lib/v2/yunspe/radar.js +0 -13
- package/lib/v2/yunspe/router.js +0 -3
- package/lib/v2/zuzhirenshi/index.js +0 -87
- package/lib/v2/zuzhirenshi/maintainer.js +0 -3
- package/lib/v2/zuzhirenshi/radar.js +0 -13
- package/lib/v2/zuzhirenshi/router.js +0 -3
- /package/lib/{routes → v2}/jianshu/collection.js +0 -0
- /package/lib/{routes → v2}/jianshu/home.js +0 -0
- /package/lib/{routes → v2}/jianshu/user.js +0 -0
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
const got = require('@/utils/got');
|
|
2
|
-
const { parseDate } = require('@/utils/parse-date');
|
|
3
|
-
const dayjs = require('dayjs');
|
|
4
|
-
|
|
5
|
-
const channels = {
|
|
6
|
-
BW: '吹水台',
|
|
7
|
-
HT: '高登熱',
|
|
8
|
-
NW: '最 新',
|
|
9
|
-
CA: '時事台',
|
|
10
|
-
ET: '娛樂台',
|
|
11
|
-
SP: '體育台',
|
|
12
|
-
FN: '財經台',
|
|
13
|
-
ST: '學術台',
|
|
14
|
-
SY: '講故台',
|
|
15
|
-
EP: '創意台',
|
|
16
|
-
HW: '硬件台',
|
|
17
|
-
IN: '電訊台',
|
|
18
|
-
SW: '軟件台',
|
|
19
|
-
MP: '手機台',
|
|
20
|
-
AP: 'Apps台',
|
|
21
|
-
GM: '遊戲台',
|
|
22
|
-
ED: '飲食台',
|
|
23
|
-
TR: '旅遊台',
|
|
24
|
-
CO: '潮流台',
|
|
25
|
-
AN: '動漫台',
|
|
26
|
-
TO: '玩具台',
|
|
27
|
-
MU: '音樂台',
|
|
28
|
-
VI: '影視台',
|
|
29
|
-
DC: '攝影台',
|
|
30
|
-
TS: '汽車台',
|
|
31
|
-
WK: '上班台',
|
|
32
|
-
LV: '感情台',
|
|
33
|
-
SC: '校園台',
|
|
34
|
-
BB: '親子台',
|
|
35
|
-
PT: '寵物台',
|
|
36
|
-
MB: '站務台',
|
|
37
|
-
RA: '電 台',
|
|
38
|
-
AC: '活動台',
|
|
39
|
-
BS: '買賣台',
|
|
40
|
-
JT: '直播台',
|
|
41
|
-
AU: '成人台',
|
|
42
|
-
OP: '考古台',
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
const limits = {
|
|
46
|
-
'-1': '全部',
|
|
47
|
-
1: '正式',
|
|
48
|
-
0: '公海',
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
const sorts = {
|
|
52
|
-
0: '最後回應時間',
|
|
53
|
-
1: '發表時間',
|
|
54
|
-
2: '熱門',
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
module.exports = async (ctx) => {
|
|
58
|
-
const id = ctx.params.id || 'BW';
|
|
59
|
-
const sort = ctx.params.sort || '0';
|
|
60
|
-
const limit = ctx.params.limit || '-1';
|
|
61
|
-
|
|
62
|
-
const rootUrl = 'https://forum.hkgolden.com';
|
|
63
|
-
const apiRootUrl = 'https://api.hkgolden.com';
|
|
64
|
-
const apiUrl = `${apiRootUrl}/v1/topics/HT/1?sort=${sort}&limit=${limit}`;
|
|
65
|
-
|
|
66
|
-
const response = await got({
|
|
67
|
-
method: 'get',
|
|
68
|
-
url: apiUrl,
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
const list = response.data.data.list.slice(0, ctx.query.limit ? parseInt(ctx.query.limit) : 30).map((item) => ({
|
|
72
|
-
link: item.id,
|
|
73
|
-
title: item.title,
|
|
74
|
-
author: item.authorName,
|
|
75
|
-
pubDate: parseDate(item.orderDate),
|
|
76
|
-
}));
|
|
77
|
-
|
|
78
|
-
const items = await Promise.all(
|
|
79
|
-
list.map((item) =>
|
|
80
|
-
ctx.cache.tryGet(item.link, async () => {
|
|
81
|
-
const detailResponse = await got({
|
|
82
|
-
method: 'get',
|
|
83
|
-
url: `${apiRootUrl}/v1/view/${item.link}`,
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
const data = detailResponse.data.data;
|
|
87
|
-
|
|
88
|
-
item.link = `${rootUrl}/thread/${item.id}`;
|
|
89
|
-
item.description =
|
|
90
|
-
`<table border="1" cellspacing="0"><tr><td>${data.authorName} (${dayjs(data.messageDate).format('YYYY-MM-DD hh:mm:ss')})</td></tr>` +
|
|
91
|
-
`<tr><td>${data.content.replace(/src="\/faces/g, 'src="https://assets.hkgolden.com/faces')}</td></tr>`;
|
|
92
|
-
|
|
93
|
-
for (const reply of data.replies) {
|
|
94
|
-
item.description +=
|
|
95
|
-
`<tr><td>${reply.authorName} (${dayjs(reply.replyDate).format('YYYY-MM-DD hh:mm:ss')})</td></tr>` + `<tr><td>${reply.content.replace(/src="\/faces/g, 'src="https://assets.hkgolden.com/faces')}</td></tr>`;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
item.description += '</table>';
|
|
99
|
-
|
|
100
|
-
return item;
|
|
101
|
-
})
|
|
102
|
-
)
|
|
103
|
-
);
|
|
104
|
-
|
|
105
|
-
ctx.state.data = {
|
|
106
|
-
title: `${channels[id]} (${sorts[sort]}|${limits[limit]}) - 香港高登`,
|
|
107
|
-
link: `${rootUrl}/channel/${id}`,
|
|
108
|
-
item: items,
|
|
109
|
-
};
|
|
110
|
-
};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
const got = require('@/utils/got');
|
|
2
|
-
const cheerio = require('cheerio');
|
|
3
|
-
|
|
4
|
-
module.exports = async (ctx) => {
|
|
5
|
-
ctx.params.order = ctx.params.order || '';
|
|
6
|
-
ctx.params.keyword = ctx.params.keyword || '';
|
|
7
|
-
ctx.params.caty = ctx.params.caty || '';
|
|
8
|
-
|
|
9
|
-
const rootUrl = `http://xinsheng.huawei.com/cn/index.php?app=forum&mod=List&class=461&order=${ctx.params.order}&search=${ctx.params.keyword}&cate=${ctx.params.caty}`;
|
|
10
|
-
const response = await got({
|
|
11
|
-
method: 'get',
|
|
12
|
-
url: rootUrl,
|
|
13
|
-
});
|
|
14
|
-
const $ = cheerio.load(response.data);
|
|
15
|
-
|
|
16
|
-
$('a[linktag="__subject_link__"]').remove();
|
|
17
|
-
|
|
18
|
-
const list = $('.bbs_list ul li .font_box .title p font a')
|
|
19
|
-
.slice(0, 15)
|
|
20
|
-
.map((_, item) => {
|
|
21
|
-
item = $(item);
|
|
22
|
-
return {
|
|
23
|
-
title: item.attr('title'),
|
|
24
|
-
link: item.attr('href'),
|
|
25
|
-
};
|
|
26
|
-
})
|
|
27
|
-
.get();
|
|
28
|
-
|
|
29
|
-
const items = await Promise.all(
|
|
30
|
-
list.map((item) =>
|
|
31
|
-
ctx.cache.tryGet(item.link, async () => {
|
|
32
|
-
const detailResponse = await got({
|
|
33
|
-
method: 'get',
|
|
34
|
-
url: item.link,
|
|
35
|
-
});
|
|
36
|
-
const content = cheerio.load(detailResponse.data);
|
|
37
|
-
|
|
38
|
-
item.description = content('.bbs_info_right_text').eq(0).html();
|
|
39
|
-
item.pubDate = new Date(content('span.fl').eq(0).text().trim() + ' GMT+8').toUTCString();
|
|
40
|
-
item.author = content('.bbs_info_user_ a').eq(1).text();
|
|
41
|
-
|
|
42
|
-
return item;
|
|
43
|
-
})
|
|
44
|
-
)
|
|
45
|
-
);
|
|
46
|
-
|
|
47
|
-
let title;
|
|
48
|
-
|
|
49
|
-
$('.bbs_list_box_title_wz ul li').each(function () {
|
|
50
|
-
if ($(this).hasClass('on')) {
|
|
51
|
-
title = $(this).text();
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
ctx.state.data = {
|
|
57
|
-
title: `${title} - 华为家事 - 心声社区`,
|
|
58
|
-
link: rootUrl,
|
|
59
|
-
item: items,
|
|
60
|
-
};
|
|
61
|
-
};
|
package/lib/routes/iea/index.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
const got = require('@/utils/got');
|
|
2
|
-
const cheerio = require('cheerio');
|
|
3
|
-
|
|
4
|
-
module.exports = async (ctx) => {
|
|
5
|
-
const category = ctx.params.category || 'news-and-events';
|
|
6
|
-
|
|
7
|
-
const rootUrl = 'https://www.iea.org';
|
|
8
|
-
const currentUrl = `${rootUrl}/${category}`;
|
|
9
|
-
const response = await got({
|
|
10
|
-
method: 'get',
|
|
11
|
-
url: currentUrl,
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
const $ = cheerio.load(response.data);
|
|
15
|
-
|
|
16
|
-
const list = $('.m-news-listing__hover')
|
|
17
|
-
.slice(0, 15)
|
|
18
|
-
.map((_, item) => {
|
|
19
|
-
item = $(item);
|
|
20
|
-
|
|
21
|
-
const title = $(item).text();
|
|
22
|
-
item = item.parent().get(0).tagName === 'a' ? $(item).parent() : $(item).parent().parent();
|
|
23
|
-
|
|
24
|
-
return {
|
|
25
|
-
title,
|
|
26
|
-
link: `${rootUrl}${item.attr('href')}`,
|
|
27
|
-
};
|
|
28
|
-
})
|
|
29
|
-
.get();
|
|
30
|
-
|
|
31
|
-
const items = await Promise.all(
|
|
32
|
-
list.map((item) =>
|
|
33
|
-
ctx.cache.tryGet(item.link, async () => {
|
|
34
|
-
const detailResponse = await got({
|
|
35
|
-
method: 'get',
|
|
36
|
-
url: item.link,
|
|
37
|
-
});
|
|
38
|
-
const content = cheerio.load(detailResponse.data);
|
|
39
|
-
|
|
40
|
-
item.description = content('.m-block__content').html();
|
|
41
|
-
item.pubDate = new Date(content('.o-hero-freepage__meta').text()).toUTCString();
|
|
42
|
-
|
|
43
|
-
return item;
|
|
44
|
-
})
|
|
45
|
-
)
|
|
46
|
-
);
|
|
47
|
-
|
|
48
|
-
ctx.state.data = {
|
|
49
|
-
title: $('title').eq(0).text(),
|
|
50
|
-
link: currentUrl,
|
|
51
|
-
item: items,
|
|
52
|
-
};
|
|
53
|
-
};
|
package/lib/routes/iie/blog.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
const got = require('@/utils/got');
|
|
2
|
-
const cheerio = require('cheerio');
|
|
3
|
-
|
|
4
|
-
module.exports = async (ctx) => {
|
|
5
|
-
const rootUrl = 'https://www.iie.org';
|
|
6
|
-
const currentUrl = `${rootUrl}/Learn/Blog`;
|
|
7
|
-
const response = await got({
|
|
8
|
-
method: 'get',
|
|
9
|
-
url: currentUrl,
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
const $ = cheerio.load(response.data);
|
|
13
|
-
|
|
14
|
-
const list = $('.events__title a')
|
|
15
|
-
.slice(0, 10)
|
|
16
|
-
.map((_, item) => {
|
|
17
|
-
item = $(item);
|
|
18
|
-
return {
|
|
19
|
-
title: item.text(),
|
|
20
|
-
link: `${rootUrl}${item.attr('href')}`,
|
|
21
|
-
pubDate: new Date(item.parent().parent().find('time').attr('datetime')).toUTCString(),
|
|
22
|
-
};
|
|
23
|
-
})
|
|
24
|
-
.get();
|
|
25
|
-
|
|
26
|
-
const items = await Promise.all(
|
|
27
|
-
list.map((item) =>
|
|
28
|
-
ctx.cache.tryGet(item.link, async () => {
|
|
29
|
-
const detailResponse = await got({
|
|
30
|
-
method: 'get',
|
|
31
|
-
url: item.link,
|
|
32
|
-
});
|
|
33
|
-
const content = cheerio.load(detailResponse.data);
|
|
34
|
-
|
|
35
|
-
item.description = content('.wysiwyg').html();
|
|
36
|
-
|
|
37
|
-
return item;
|
|
38
|
-
})
|
|
39
|
-
)
|
|
40
|
-
);
|
|
41
|
-
|
|
42
|
-
ctx.state.data = {
|
|
43
|
-
title: $('title').text(),
|
|
44
|
-
link: currentUrl,
|
|
45
|
-
item: items,
|
|
46
|
-
};
|
|
47
|
-
};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
const got = require('@/utils/got');
|
|
2
|
-
|
|
3
|
-
module.exports = async (ctx) => {
|
|
4
|
-
const category = ctx.params.category;
|
|
5
|
-
|
|
6
|
-
const api_url = `http://www.imaijia.com/xstb/front/authorArticleController.do?indexArticles&pageSize=20`;
|
|
7
|
-
const url = `http://www.imaijia.com/#/information.htm?catid=${category}`;
|
|
8
|
-
|
|
9
|
-
const response = await got({
|
|
10
|
-
method: 'post',
|
|
11
|
-
headers: {
|
|
12
|
-
Referer: url,
|
|
13
|
-
},
|
|
14
|
-
url: api_url,
|
|
15
|
-
form: {
|
|
16
|
-
pageNo: 1,
|
|
17
|
-
catid: category,
|
|
18
|
-
},
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
const data = response.data;
|
|
22
|
-
const description = data.description;
|
|
23
|
-
const name = data.catName;
|
|
24
|
-
const list = data.resList;
|
|
25
|
-
|
|
26
|
-
const out = await Promise.all(
|
|
27
|
-
list.map(async (info) => {
|
|
28
|
-
const title = info.title;
|
|
29
|
-
const cat_path = info.catPath;
|
|
30
|
-
const id = info.id;
|
|
31
|
-
const itemUrl = `http://www.imaijia.com/#/atricleDetails.htm?atricleId=${id}&catPath=${cat_path}`;
|
|
32
|
-
const api_url = `http://www.imaijia.com/data/details/${cat_path}${id}.json`;
|
|
33
|
-
const pubDate = info.created;
|
|
34
|
-
const author = info.author;
|
|
35
|
-
|
|
36
|
-
const cache = await ctx.cache.get(itemUrl);
|
|
37
|
-
if (cache) {
|
|
38
|
-
return Promise.resolve(JSON.parse(cache));
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const response = await got.get(api_url);
|
|
42
|
-
|
|
43
|
-
const description = response.data.resList.articleDataF.content.replace(/src="/g, 'src="http://www.imaijia.com');
|
|
44
|
-
|
|
45
|
-
const single = {
|
|
46
|
-
title,
|
|
47
|
-
link: itemUrl,
|
|
48
|
-
author,
|
|
49
|
-
description,
|
|
50
|
-
pubDate: new Date(pubDate).toUTCString(),
|
|
51
|
-
};
|
|
52
|
-
ctx.cache.set(itemUrl, JSON.stringify(single));
|
|
53
|
-
return Promise.resolve(single);
|
|
54
|
-
})
|
|
55
|
-
);
|
|
56
|
-
|
|
57
|
-
ctx.state.data = {
|
|
58
|
-
title: `电商在线-${name}`,
|
|
59
|
-
description,
|
|
60
|
-
link: url,
|
|
61
|
-
item: out,
|
|
62
|
-
};
|
|
63
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
const got = require('@/utils/got');
|
|
2
|
-
|
|
3
|
-
module.exports = async (ctx) => {
|
|
4
|
-
const response = await got({
|
|
5
|
-
method: 'get',
|
|
6
|
-
url: 'https://www.itjuzi.com/api/index/invse',
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
const data = response.data;
|
|
10
|
-
|
|
11
|
-
ctx.state.data = {
|
|
12
|
-
title: 'IT桔子-投融资事件',
|
|
13
|
-
link: 'https://www.itjuzi.com/',
|
|
14
|
-
item: data.map((item) => {
|
|
15
|
-
const invest = item.invst.map((item) => item.name).join('、');
|
|
16
|
-
|
|
17
|
-
return {
|
|
18
|
-
title: `${item.name} / ${item.round} / ${item.money}`,
|
|
19
|
-
link: `https://www.itjuzi.com/company/${item.invse_com_id}`,
|
|
20
|
-
description: `
|
|
21
|
-
<img src="${item.logo}"><br><br>
|
|
22
|
-
<strong>${item.name}</strong><br>
|
|
23
|
-
${item.slogan}<br>
|
|
24
|
-
${item.round} / ${item.money} / ${item.time}<br>
|
|
25
|
-
投资方: ${invest}
|
|
26
|
-
`,
|
|
27
|
-
pubDate: new Date(item.time).toUTCString(),
|
|
28
|
-
guid: item.id,
|
|
29
|
-
};
|
|
30
|
-
}),
|
|
31
|
-
};
|
|
32
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
const got = require('@/utils/got');
|
|
2
|
-
|
|
3
|
-
module.exports = async (ctx) => {
|
|
4
|
-
const response = await got({
|
|
5
|
-
method: 'get',
|
|
6
|
-
url: 'https://www.itjuzi.com/api/index/merge',
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
const data = response.data.data;
|
|
10
|
-
|
|
11
|
-
ctx.state.data = {
|
|
12
|
-
title: 'IT桔子-并购事件',
|
|
13
|
-
link: 'https://www.itjuzi.com/',
|
|
14
|
-
item: data.map((item) => {
|
|
15
|
-
const party = item.party.map((item) => item.name || item.invst_name).join('、');
|
|
16
|
-
|
|
17
|
-
return {
|
|
18
|
-
title: `${item.name}-${item.slogan}`,
|
|
19
|
-
link: `https://www.itjuzi.com/merger/${item.id}`,
|
|
20
|
-
description: `
|
|
21
|
-
<img src="${item.logo}"><br><br>
|
|
22
|
-
<strong>${item.name}</strong><br>
|
|
23
|
-
${item.slogan}<br>
|
|
24
|
-
股权占比: ${item.ratio} / 金额: ${item.money} / ${item.time}<br>
|
|
25
|
-
并购方: ${party}
|
|
26
|
-
`,
|
|
27
|
-
pubDate: new Date(item.time).toUTCString(),
|
|
28
|
-
guid: item.id,
|
|
29
|
-
};
|
|
30
|
-
}),
|
|
31
|
-
};
|
|
32
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
const got = require('@/utils/got');
|
|
2
|
-
const cheerio = require('cheerio');
|
|
3
|
-
const formatPubDate = require('@/utils/date.js');
|
|
4
|
-
|
|
5
|
-
module.exports = async (ctx) => {
|
|
6
|
-
const response = await got({
|
|
7
|
-
method: 'get',
|
|
8
|
-
url: `https://www.iyiou.com/news`,
|
|
9
|
-
});
|
|
10
|
-
const $ = cheerio.load(response.data);
|
|
11
|
-
const postList = $('.list-container').find('.eo-article-column').get();
|
|
12
|
-
const result = await Promise.all(
|
|
13
|
-
postList.map(async (item) => {
|
|
14
|
-
const title = $(item).find('.eo-hover-child').find('.content').find('a').find('.title').text();
|
|
15
|
-
const link = 'https://www.iyiou.com' + $(item).find('.eo-hover-child').find('a').attr('href');
|
|
16
|
-
const guid = link;
|
|
17
|
-
const pubDate = formatPubDate($(item).find('.eo-hover-child').find('.content').find('.eo-post-date').text().replace(' ', ''));
|
|
18
|
-
|
|
19
|
-
const single = {
|
|
20
|
-
title,
|
|
21
|
-
link,
|
|
22
|
-
guid,
|
|
23
|
-
pubDate,
|
|
24
|
-
description: '',
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
const description_key = 'iyiou' + guid;
|
|
28
|
-
const description_value = await ctx.cache.get(description_key);
|
|
29
|
-
|
|
30
|
-
if (description_value) {
|
|
31
|
-
single.description = description_value;
|
|
32
|
-
} else {
|
|
33
|
-
const temp = await got(link);
|
|
34
|
-
single.description = $(temp.data).find('.post-body').html();
|
|
35
|
-
ctx.cache.set(description_key, single.description);
|
|
36
|
-
}
|
|
37
|
-
return Promise.resolve(single);
|
|
38
|
-
})
|
|
39
|
-
);
|
|
40
|
-
ctx.state.data = { title: '亿欧网', link: 'https://www.iyiou.com/', item: result };
|
|
41
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
const got = require('@/utils/got');
|
|
2
|
-
const cheerio = require('cheerio');
|
|
3
|
-
const util = require('./utils');
|
|
4
|
-
|
|
5
|
-
module.exports = async (ctx) => {
|
|
6
|
-
const link = `https://www.jianshu.com/trending/${ctx.params.timeframe}`;
|
|
7
|
-
const response = await got({
|
|
8
|
-
method: 'get',
|
|
9
|
-
url: link,
|
|
10
|
-
headers: {
|
|
11
|
-
Referer: link,
|
|
12
|
-
},
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
const data = response.data;
|
|
16
|
-
|
|
17
|
-
const $ = cheerio.load(data);
|
|
18
|
-
const list = $('.note-list li').get();
|
|
19
|
-
|
|
20
|
-
const result = await util.ProcessFeed(list, ctx.cache);
|
|
21
|
-
|
|
22
|
-
ctx.state.data = {
|
|
23
|
-
title: `简书 ${ctx.params.timeframe === 'weekly' ? '7' : '30'} 日热门`,
|
|
24
|
-
link,
|
|
25
|
-
description: `简书 ${ctx.params.timeframe === 'weekly' ? '7' : '30'} 日热门`,
|
|
26
|
-
item: result,
|
|
27
|
-
};
|
|
28
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
const got = require('@/utils/got');
|
|
2
|
-
const cheerio = require('cheerio');
|
|
3
|
-
|
|
4
|
-
module.exports = async (ctx) => {
|
|
5
|
-
const rootUrl = 'http://www.jiazhen108.com/news/';
|
|
6
|
-
const response = await got({
|
|
7
|
-
method: 'get',
|
|
8
|
-
url: rootUrl,
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
const $ = cheerio.load(response.data);
|
|
12
|
-
|
|
13
|
-
const list = $('div.met-news-list ul li')
|
|
14
|
-
.slice(0, 10)
|
|
15
|
-
.map((_, item) => {
|
|
16
|
-
item = $(item);
|
|
17
|
-
const a = item.find('a');
|
|
18
|
-
return {
|
|
19
|
-
title: a.text(),
|
|
20
|
-
link: a.attr('href'),
|
|
21
|
-
};
|
|
22
|
-
})
|
|
23
|
-
.get();
|
|
24
|
-
|
|
25
|
-
const items = await Promise.all(
|
|
26
|
-
list.map((item) =>
|
|
27
|
-
ctx.cache.tryGet(item.link, async () => {
|
|
28
|
-
const detailResponse = await got({
|
|
29
|
-
method: 'get',
|
|
30
|
-
url: item.link,
|
|
31
|
-
});
|
|
32
|
-
const content = cheerio.load(detailResponse.data);
|
|
33
|
-
|
|
34
|
-
item.description = content('section.met-editor').html();
|
|
35
|
-
item.pubDate = new Date(content('div.info span').eq(0).text() + ' GMT+8').toUTCString();
|
|
36
|
-
|
|
37
|
-
return item;
|
|
38
|
-
})
|
|
39
|
-
)
|
|
40
|
-
);
|
|
41
|
-
|
|
42
|
-
ctx.state.data = {
|
|
43
|
-
title: `「108将」实战分享`,
|
|
44
|
-
link: rootUrl,
|
|
45
|
-
item: items,
|
|
46
|
-
};
|
|
47
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
const got = require('../../utils/got');
|
|
2
|
-
|
|
3
|
-
module.exports = async (ctx) => {
|
|
4
|
-
const keyword = ctx.params.keyword;
|
|
5
|
-
|
|
6
|
-
const response = await got({
|
|
7
|
-
method: 'get',
|
|
8
|
-
url: `https://www.toutiao.com/api/search/content/?offset=0&format=json&keyword=${encodeURIComponent(keyword)}&autoload=true&count=20&cur_tab=1&from=search_tab`,
|
|
9
|
-
headers: {
|
|
10
|
-
Referer: `https://www.toutiao.com/search/?keyword=${encodeURIComponent(keyword)}`,
|
|
11
|
-
},
|
|
12
|
-
});
|
|
13
|
-
let data = response.data.data;
|
|
14
|
-
data = data.filter((item) => !item.cell_type);
|
|
15
|
-
|
|
16
|
-
ctx.state.data = {
|
|
17
|
-
title: `今日头条: ${keyword}`,
|
|
18
|
-
link: `https://www.toutiao.com/search/?keyword=${keyword}`,
|
|
19
|
-
description: keyword,
|
|
20
|
-
item: data.map((item) => ({
|
|
21
|
-
title: `${item.media_name}: ${item.title}`,
|
|
22
|
-
description: item.abstract,
|
|
23
|
-
pubDate: new Date(parseInt(item.create_time) * 1000),
|
|
24
|
-
link: item.article_url,
|
|
25
|
-
})),
|
|
26
|
-
};
|
|
27
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
const got = require('@/utils/got');
|
|
2
|
-
const cheerio = require('cheerio');
|
|
3
|
-
|
|
4
|
-
module.exports = async (ctx) => {
|
|
5
|
-
const response = await got('http://www.juesheng.com/');
|
|
6
|
-
const $ = cheerio.load(response.data);
|
|
7
|
-
const postList = $('.sec-box #informationBox li').get();
|
|
8
|
-
const result = await Promise.all(
|
|
9
|
-
postList.map(async (item) => {
|
|
10
|
-
const title = $(item).find('.news-item-title').find('a').text();
|
|
11
|
-
const link = $(item).find('.news-item-title').find('a').attr('href');
|
|
12
|
-
const guid = link;
|
|
13
|
-
|
|
14
|
-
const single = {
|
|
15
|
-
title,
|
|
16
|
-
link,
|
|
17
|
-
guid,
|
|
18
|
-
pubDate: '',
|
|
19
|
-
description: '',
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const description_key = 'juesheng_description_' + guid;
|
|
23
|
-
const description_value = await ctx.cache.get(description_key);
|
|
24
|
-
|
|
25
|
-
const pubDate_key = 'juesheng_pubDate_' + guid;
|
|
26
|
-
const pubDate_value = await ctx.cache.get(pubDate_key);
|
|
27
|
-
|
|
28
|
-
if (description_value && pubDate_value) {
|
|
29
|
-
single.description = description_value;
|
|
30
|
-
single.pubDate = pubDate_value;
|
|
31
|
-
} else {
|
|
32
|
-
const temp = await got(link);
|
|
33
|
-
single.description = $(temp.data).find('.content-box').html();
|
|
34
|
-
single.pubDate = new Date($(temp.data).find('.part-time').text()).toUTCString();
|
|
35
|
-
|
|
36
|
-
ctx.cache.set(description_key, single.description);
|
|
37
|
-
ctx.cache.set(pubDate_key, single.pubDate);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
return Promise.resolve(single);
|
|
41
|
-
})
|
|
42
|
-
);
|
|
43
|
-
ctx.state.data = {
|
|
44
|
-
title: '决胜网',
|
|
45
|
-
link: 'http://www.juesheng.com/',
|
|
46
|
-
description: '决胜网是教育产业门户网站提供:教育门户新闻资讯、互联网+教育、在线教育、兴趣教育、在线职业教育、教育创业、教育信息化、教育创业报道等,找教育就上决胜网教育门户网站。',
|
|
47
|
-
item: result,
|
|
48
|
-
};
|
|
49
|
-
};
|
|
@@ -1,54 +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.krankenkassen.de/dpa/',
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
const data = response.data;
|
|
11
|
-
|
|
12
|
-
const $ = cheerio.load(data);
|
|
13
|
-
const list = $('.news td a');
|
|
14
|
-
|
|
15
|
-
const getContent = async (subLink) => {
|
|
16
|
-
const cacheKey = `krankenkassen_${subLink}`;
|
|
17
|
-
const cache = await ctx.cache.get(cacheKey);
|
|
18
|
-
if (cache) {
|
|
19
|
-
return JSON.parse(cache);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const articlePageRes = await got(subLink);
|
|
23
|
-
const articleHtml = articlePageRes.data;
|
|
24
|
-
const $ = cheerio.load(articleHtml);
|
|
25
|
-
const pubDate = $('.untertitel').text();
|
|
26
|
-
const description = $('#content p').text();
|
|
27
|
-
const result = {
|
|
28
|
-
pubDate,
|
|
29
|
-
description,
|
|
30
|
-
title: $('.titel').text(),
|
|
31
|
-
link: subLink,
|
|
32
|
-
};
|
|
33
|
-
ctx.cache.set(cacheKey, JSON.stringify(result));
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const item = await Promise.all(
|
|
38
|
-
list
|
|
39
|
-
.slice(0, 30)
|
|
40
|
-
.map((index, dom) => {
|
|
41
|
-
dom = $(dom);
|
|
42
|
-
const link = `https://www.krankenkassen.de/dpa/${dom.attr('href')}`;
|
|
43
|
-
return getContent(link);
|
|
44
|
-
})
|
|
45
|
-
.get()
|
|
46
|
-
);
|
|
47
|
-
|
|
48
|
-
ctx.state.data = {
|
|
49
|
-
title: $('title').text(),
|
|
50
|
-
link: 'https://www.krankenkassen.de/dpa/',
|
|
51
|
-
description: '德国新闻社卫健新闻',
|
|
52
|
-
item,
|
|
53
|
-
};
|
|
54
|
-
};
|