diff --git a/README.md b/README.md index 923f30a715..d7fdd99093 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ RSSHub 是一个开源、简单易用、易于扩展的 RSS 生成器,可以 ### Special Sponsors
- +   
### Sponsors diff --git a/docs/README.md b/docs/README.md index fc1ae2b226..3de8e6a7bc 100644 --- a/docs/README.md +++ b/docs/README.md @@ -25,7 +25,7 @@ RSSHub 是一个开源、简单易用、易于扩展的 RSS 生成器,可以 ### Special Sponsors -rixCloud +rixCloud知拾收藏 ### Sponsors diff --git a/docs/bbs.md b/docs/bbs.md index 718394c7f7..ea5e48ad09 100644 --- a/docs/bbs.md +++ b/docs/bbs.md @@ -178,6 +178,12 @@ pageClass: routes +## 巴哈姆特電玩資訊站 + +### 熱門推薦 + + + ## 才符 ### 用户动态 @@ -248,6 +254,26 @@ pageClass: routes +## 华为心声社区 + +### 华为家事 + + + +分区 ID + +| 全部帖子 | 公司文件 | 管理思考 | 产品改进 | 版务公告 | +| -------- | -------- | -------- | -------- | -------- | +| | 155 | 415 | 427 | 419 | + +排序方式 + +| 最新发帖 | 最新回复 | 最多回复 | 最多点击 | +| -------- | -------- | ---------- | --------- | +| cTime | rTime | replycount | viewcount | + + + ## 看雪 ### 论坛 diff --git a/docs/design.md b/docs/design.md index 5b35b64762..6e49e3637d 100644 --- a/docs/design.md +++ b/docs/design.md @@ -20,7 +20,7 @@ pageClass: routes ### User Works - + Behance 用户主页 URL 获取用户名,如 的用户名为 `mishapetrick`。 diff --git a/docs/en/README.md b/docs/en/README.md index 82ce8a466b..2b619543f0 100644 --- a/docs/en/README.md +++ b/docs/en/README.md @@ -23,7 +23,7 @@ RSSHub delivers millions of contents aggregated from all kinds of sources, our v ### Special Sponsors - + ### Sponsors diff --git a/docs/en/design.md b/docs/en/design.md index 7f96898568..ad871e6eb7 100644 --- a/docs/en/design.md +++ b/docs/en/design.md @@ -20,7 +20,7 @@ Some tags are rarely used: `Script`, `direction`, `production`, `design-concep ### User Works - + Behance user's profile URL, like the username will be `mishapetrick`。 diff --git a/docs/en/government.md b/docs/en/government.md index eb9f9e8d33..e2e37f9485 100644 --- a/docs/en/government.md +++ b/docs/en/government.md @@ -15,3 +15,9 @@ pageClass: routes ### Security Council Vetoed a Resolution + +## World Trade Organization + +### Dispute settlement news + + \ No newline at end of file diff --git a/docs/en/journal.md b/docs/en/journal.md index 9c2d379e7d..a4027b1c87 100644 --- a/docs/en/journal.md +++ b/docs/en/journal.md @@ -4,6 +4,37 @@ pageClass: routes # Scientific Journal +## Academy of Management + +### Journal + + + +| Id | Title | +| --------- | ------------------------------------------ | +| annals | Academy of Management Annals | +| amd | Academy of Management Discoveries | +| amgblproc | Academy of Management Global Proceedings | +| amj | Academy of Management Journal | +| amle | Academy of Management Learning & Education | +| amp | Academy of Management Perspectives | +| amproc | Academy of Management Proceedings | +| amr | Academy of Management Review | + + + +## arXiv + +### Search Keyword + + + +See [arXiv API User Manual](https://arxiv.org/help/api/user-manual) to find out all query statements. + +Fill in parameter `query` with content after `http://export.arxiv.org/api/query?`. + + + ## Cell Journal diff --git a/docs/en/program-update.md b/docs/en/program-update.md index bf9ae400d6..d5040fd7d4 100644 --- a/docs/en/program-update.md +++ b/docs/en/program-update.md @@ -4,6 +4,12 @@ pageClass: routes # Application Updates +## Anki + +### Changes + + + ## Apkpure ### Versions diff --git a/docs/en/traditional-media.md b/docs/en/traditional-media.md index b8bf38347b..b4edd549bc 100644 --- a/docs/en/traditional-media.md +++ b/docs/en/traditional-media.md @@ -4,6 +4,20 @@ pageClass: routes # News +## ABC News + +### Site + + + +Site + +| Just In | Politics | World | Business | Analysis | Sport | Science | Health | Arts | Fact Check | 中文新闻 | Berita Bahasa Indonesia | Tok Pisin | +| - | - | - | - | - | - | - | - | - | - | - | - | - | - | +| justin | politics | world | business | analysis-and-opinion | sport | science | health | arts-culture | factcheck | chinese | indonesian | tok-pisin | + + + ## AP News ### Topics diff --git a/docs/game.md b/docs/game.md index 6db10bcbce..1efda17af0 100644 --- a/docs/game.md +++ b/docs/game.md @@ -254,16 +254,18 @@ Example: `https://store.steampowered.com/search/?specials=1&term=atelier` 中的 ## 巴哈姆特 -### GNN 新闻 +### GNN 新聞 - + -暂无图片 - -| 首页 | PC | TV 掌機 | 手機遊戲 | 動漫畫 | 主題報導 | 活動展覽 | 電競 | +| 首頁 | PC | TV 掌機 | 手機遊戲 | 動漫畫 | 主題報導 | 活動展覽 | 電競 | | ---- | -- | ------- | -------- | ------ | -------- | -------- | ---- | | 缺省 | 1 | 3 | 4 | 5 | 9 | 11 | 13 | +| Switch | PS5 | PS4 | XboxOne | XboxSX | PC 單機 | PC 線上 | iOS | Android | Web | 漫畫 | 動畫 | +| ------ | --- | --- | ------- | ------ | ------- | ------- | --- | ------- | --- | ----- | ----- | +| ns | ps5 | ps4 | xbone | xbsx | pc | olg | ios | android | web | comic | anime | + ## 二柄 APP @@ -466,6 +468,18 @@ Example: `https://store.steampowered.com/search/?specials=1&term=atelier` 中的 +## 原神 + +### 新闻 + + + +| 最新 | 新闻 | 公告 | 活动 | +| ------ | ---- | ------ | -------- | +| latest | news | notice | activity | + + + ## 掌上英雄联盟 ### 推荐 diff --git a/docs/government.md b/docs/government.md index 39315111bd..cfc8922c7b 100644 --- a/docs/government.md +++ b/docs/government.md @@ -89,6 +89,12 @@ pageClass: routes +## 世界贸易组织 + +### 争端解决新闻 + + + ## 苏州市人民政府 ### 政府新闻 diff --git a/docs/journal.md b/docs/journal.md index 9aee5bb0e5..e6afbbc349 100644 --- a/docs/journal.md +++ b/docs/journal.md @@ -4,6 +4,25 @@ pageClass: routes # 科学期刊 +## Academy of Management + +### Journal + + + +| Id | 名称 | +| --------- | ------------------------------------------ | +| annals | Academy of Management Annals | +| amd | Academy of Management Discoveries | +| amgblproc | Academy of Management Global Proceedings | +| amj | Academy of Management Journal | +| amle | Academy of Management Learning & Education | +| amp | Academy of Management Perspectives | +| amproc | Academy of Management Proceedings | +| amr | Academy of Management Review | + + + ## arXiv ### 搜索关键字 @@ -123,7 +142,7 @@ pageClass: routes ### 最新文章(可筛选领域) - + - 通过 `/pnas/` + “领域名称” 来获取对应 “领域” 的最新文章(Latest Research)。 若参数置空(`/pnas`)或为 latest(`/pnas/latest`),则默认获取全部文章。 diff --git a/docs/new-media.md b/docs/new-media.md index 28629a097c..0e3d28e114 100644 --- a/docs/new-media.md +++ b/docs/new-media.md @@ -477,6 +477,18 @@ Supported sub-sites: +## 八阕 + +### 广角新闻 + + + +| 全景 | 中国 | 国际 | 科教 | 军事 | 体育 | 娱乐 | 艺术 | 文史 | 观点 | 生活 | 产经 | 其它 | +| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | +| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | + + + ## 百度知道日报 ### 精选 diff --git a/docs/other.md b/docs/other.md index 2f1de25e7e..2eace247d8 100644 --- a/docs/other.md +++ b/docs/other.md @@ -625,6 +625,12 @@ type 为 all 时,category 参数不支持 cost 和 free +## 守望先锋 + +### 补丁说明 + + + ## 四川省科学技术厅 ### 四川省科学技术厅 - 公示公告 diff --git a/docs/program-update.md b/docs/program-update.md index 039a93b559..1fef997e80 100644 --- a/docs/program-update.md +++ b/docs/program-update.md @@ -14,6 +14,12 @@ pageClass: routes +## Anki + +### Changes + + + ## Apkpure ### Versions diff --git a/docs/social-media.md b/docs/social-media.md index 12444685d6..298c4fa69b 100644 --- a/docs/social-media.md +++ b/docs/social-media.md @@ -298,6 +298,12 @@ Tiny Tiny RSS 会给所有 iframe 元素添加 `sandbox="allow-scripts"` 属性 +## iCity + +### 用户动态 + + + ## Keep ### 运动日记 @@ -928,7 +934,7 @@ rule ### 用户回答 - + ### 用户文章 diff --git a/docs/traditional-media.md b/docs/traditional-media.md index 88971d963a..67dfe4faa6 100644 --- a/docs/traditional-media.md +++ b/docs/traditional-media.md @@ -10,6 +10,20 @@ pageClass: routes +## ABC News + +### 子站 + + + +子站 + +| Just In | Politics | World | Business | Analysis | Sport | Science | Health | Arts | Fact Check | 中文新闻 | Berita Bahasa Indonesia | Tok Pisin | +| ------- | -------- | ----- | -------- | -------------------- | ----- | ------- | ------ | ------------ | ---------- | -------- | ----------------------- | --------- | +| justin | politics | world | business | analysis-and-opinion | sport | science | health | arts-culture | factcheck | chinese | indonesian | tok-pisin | + + + ## AP News ### 话题 @@ -245,6 +259,8 @@ Category 列表: +无料全文,综合页添加分类标签,可用于过滤。 + | 総合 | 社会 | 政治 | 経済 | スポーツ | 国際 | 科学・IT | 選挙・世論調査 | エンタメ・文化 | 囲碁・将棋 | ライフ | 地域 | 社説 | | ---- | -------- | -------- | ------- | -------- | ----- | ---------- | -------------- | -------------- | ---------- | ------ | ----- | --------- | | news | national | politics | economy | sports | world | science | election | culture | igoshougi | life | local | editorial | @@ -571,6 +587,18 @@ category 对应的关键词有 +## 台湾中央通讯社 + +### 分类 + + + +| 即時 | 政治 | 國際 | 兩岸 | 產經 | 證券 | 科技 | 生活 | 社會 | 地方 | 文化 | 運動 | 娛樂 | +| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | +| aall | aipl | aopl | acn | aie | asc | ait | ahel | asoc | aloc | acul | aspt | amov | + + + ## 网易新闻专栏 ### 栏目 @@ -779,6 +807,18 @@ category 对应的关键词有 +## 中山网 + +### 中山网新闻 + + + +| 35 | 36 | 37 | 38 | 39 | +| ---- | ---- | ---- | ---- | ---- | +| 本地 | 镇区 | 热点 | 社会 | 综合 | + + + ## 中時電子報 ### 新聞 diff --git a/lib/config.js b/lib/config.js index f5caf3b5d9..5b875cc0cc 100644 --- a/lib/config.js +++ b/lib/config.js @@ -144,7 +144,7 @@ const calculateValue = () => { bearertoken: envs.INITIUM_BEARER_TOKEN, }, btbyr: { - host: envs.BTBYR_HOST || 'https://bt.byr.cn/', + host: envs.BTBYR_HOST, cookies: envs.BTBYR_COOKIE, }, mastodon: { diff --git a/lib/middleware/template.js b/lib/middleware/template.js index 01568c2a3f..69ae580e7d 100644 --- a/lib/middleware/template.js +++ b/lib/middleware/template.js @@ -44,6 +44,10 @@ module.exports = async (ctx, next) => { } } + if (!item.pubDate) { + item.pubDate = new Date().toISOString(); + } + if (item.enclosure_length) { const itunes_duration = Math.floor(item.enclosure_length / 3600) + ':' + (Math.floor((item.enclosure_length % 3600) / 60) / 100).toFixed(2).slice(-2) + ':' + (((item.enclosure_length % 3600) % 60) / 100).toFixed(2).slice(-2); diff --git a/lib/router.js b/lib/router.js index e4d5e45f49..5ebb747041 100644 --- a/lib/router.js +++ b/lib/router.js @@ -3069,7 +3069,7 @@ router.get('/touhougarakuta/:language/:type', require('./routes/touhougarakuta') router.get('/liequtv/room/:id', require('./routes/liequtv/room')); // Behance -router.get('/behance/:user', require('./routes/behance/index')); +router.get('/behance/:user/:type?', require('./routes/behance/index')); // furstar.jp router.get('/furstar/characters/:lang?', require('./routes/furstar/index')); @@ -3163,6 +3163,9 @@ router.get('/shiep/:type', require('./routes/universities/shiep/index')); router.get('/fjnews/:city/:limit', require('./routes/fjnews/fznews')); router.get('/fjnews/jjnews', require('./routes/fjnews/jjnews')); +// 中山网新闻 +router.get('/zsnews/index/:cateid', require('./routes/zsnews/index')); + // 孔夫子旧书网 router.get('/kongfz/people/:id', require('./routes/kongfz/people')); router.get('/kongfz/shop/:id/:cat?', require('./routes/kongfz/shop')); @@ -3257,6 +3260,30 @@ router.get('/appsales/:caty?/:time?', require('./routes/appsales/index')); // CGTN router.get('/cgtn/top', require('./routes/cgtn/top')); +// Academy of Management +router.get('/aom/journal/:id', require('./routes/aom/journal')); + +// 巴哈姆特電玩資訊站 +router.get('/gamer/hot/:bsn', require('./routes/gamer/hot')); + +// iCity +router.get('/icity/:id', require('./routes/icity/index')); + +// Anki +router.get('/anki/changes', require('./routes/anki/changes')); + +// ABC News +router.get('/abc/:site?', require('./routes/abc/index.js')); + +// 台湾中央通讯社 +router.get('/cna/:id?', require('./routes/cna/index')); + +// 华为心声社区 +router.get('/huawei/xinsheng/:caty?/:order?/:keyword?', require('./routes/huawei/xinsheng/index')); + +// 守望先锋 +router.get('/ow/patch', require('./routes/ow/patch')); + // MM范 router.get('/95mm/tab/:tab?', require('./routes/95mm/tab')); router.get('/95mm/tag/:tag', require('./routes/95mm/tag')); @@ -3293,7 +3320,7 @@ router.get('/nobelprize/:caty?', require('./routes/nobelprize/index')); router.get('/gov/taiwan/mnd', require('./routes/gov/taiwan/mnd')); // 読売新聞 -router.get('/yomiuri/:category?', require('./routes/yomiuri/news')); +router.get('/yomiuri/:category', require('./routes/yomiuri/news')); // 巴哈姆特 // GNN新闻 @@ -3308,4 +3335,13 @@ router.get('/ofweek/news', require('./routes/ofweek/news')); // eventernote router.get('/eventernote/actors/:name/:id', require('./routes/eventernote/actors')); +// 八阕 +router.get('/popyard/:caty?', require('./routes/popyard/index')); + +// 原神 +router.get('/yuanshen/:location?/:category?', require('./routes/yuanshen/index')); + +// World Trade Organization +router.get('/wto/dispute-settlement/:year?', require('./routes/wto/dispute-settlement')); + module.exports = router; diff --git a/lib/routes/abc/index.js b/lib/routes/abc/index.js new file mode 100644 index 0000000000..727dbd839c --- /dev/null +++ b/lib/routes/abc/index.js @@ -0,0 +1,86 @@ +const url = require('url'); +const got = require('@/utils/got'); +const cheerio = require('cheerio'); + +module.exports = async (ctx) => { + ctx.params.site = ctx.params.site || ''; + + const rootUrl = 'https://mobile.abc.net.au'; + const currentUrl = `${rootUrl}/news/${ctx.params.site}`; + const response = await got({ + method: 'get', + url: currentUrl, + }); + const $ = cheerio.load(response.data); + + $('._3zQMR, .ticker').remove(); + + const list = $('h3') + .slice(0, 10) + .map((_, item) => { + item = $(item); + return { + title: item.text(), + link: url.resolve(rootUrl, item.parents('a').attr('href') || item.find('a').attr('href')), + }; + }) + .get(); + + const items = await Promise.all( + list.map( + async (item) => + await ctx.cache.tryGet(item.link, async () => { + const detailResponse = await got({ + method: 'get', + url: item.link, + }); + const content = cheerio.load(detailResponse.data); + + content('.modal-content').remove(); + + content('img').each(function () { + content(this).attr('src', content(this).attr('data-src')); + }); + + let coverImage, contentBody; + if (content('div[data-component="FeatureMedia"]').html() !== null) { + coverImage = content('div[data-component="FeatureMedia"]').html(); + } else { + coverImage = content('.view-hero-media').html(); + } + if (content('#body').html() !== null) { + contentBody = content('#body').html(); + } else { + contentBody = content('.article-text').html(); + } + + const authorsArray = []; + const authorsMatch = detailResponse.data.match(/author":(.*),"dateModified/); + if (authorsMatch === null) { + authorsArray.push(content('meta[name="DCTERMS.contributor"]').attr('content')); + } else { + const authors = JSON.parse(authorsMatch[1]); + try { + for (const author of authors) { + authorsArray.push(author.name); + } + } catch (e) { + authorsArray.push(authors.name); + } + } + + item.description = coverImage + contentBody; + item.pubDate = new Date(content('meta[property="article:published_time"]').attr('content')).toUTCString(); + item.author = authorsArray.join(', '); + + return item; + }) + ) + ); + + ctx.state.data = { + title: $('title').text(), + link: currentUrl, + item: items, + }; +}; diff --git a/lib/routes/anki/changes.js b/lib/routes/anki/changes.js new file mode 100644 index 0000000000..cf6564b40d --- /dev/null +++ b/lib/routes/anki/changes.js @@ -0,0 +1,39 @@ +const got = require('@/utils/got'); +const cheerio = require('cheerio'); +const md = require('markdown-it')({ + html: true, +}); + +module.exports = async (ctx) => { + const rootUrl = 'https://changes.ankiweb.net'; + const currentUrl = `${rootUrl}/README.md`; + const response = await got({ + method: 'get', + url: currentUrl, + }); + + const html = md.render(response.data.replace(/# Changes in/g, '## Changes in').replace(/### Changes in/g, '## Changes in')); + const $ = cheerio.load(html.replace(/

/g, '

')); + + const items = $('div') + .slice(0, 20) + .map((_, item) => { + item = $(item); + const h2 = item.find('h2'); + const match = item.find('p').text().match('Released (.*).'); + h2.remove(); + return { + title: h2.text(), + description: item.html(), + link: `${rootUrl}/#/?id=changes-in-${h2.text().toLowerCase().split(' ').join('-').replace(/\./g, '')}`, + pubDate: match ? new Date(match[1].split(',')[0] + ' GMT+8').toUTCString() : '', + }; + }) + .get(); + + ctx.state.data = { + title: 'Changes - Anki', + link: rootUrl, + item: items, + }; +}; diff --git a/lib/routes/aom/journal.js b/lib/routes/aom/journal.js new file mode 100644 index 0000000000..2ba5a6e077 --- /dev/null +++ b/lib/routes/aom/journal.js @@ -0,0 +1,108 @@ +const got = require('@/utils/got'); +const cheerio = require('cheerio'); + +const rootUrl = 'https://journals.aom.org'; + +const config = { + annals: { + title: 'Academy of Management Annals', + link: `${rootUrl}/journal/annals`, + }, + amd: { + title: 'Academy of Management Discoveries', + link: `${rootUrl}/journal/amd`, + }, + amgblproc: { + title: 'Academy of Management Global Proceedings', + link: `${rootUrl}/toc/amgblproc/current`, + }, + amj: { + title: 'Academy of Management Journal', + link: `${rootUrl}/journal/amj`, + }, + amle: { + title: 'Academy of Management Learning & Education', + link: `${rootUrl}/journal/amle`, + }, + amp: { + title: 'Academy of Management Perspectives', + link: `${rootUrl}/journal/amp`, + }, + amproc: { + title: 'Academy of Management Proceedings', + link: `${rootUrl}/toc/amproc/current`, + }, + amr: { + title: 'Academy of Management Review', + link: `${rootUrl}/toc/amr/0`, + }, +}; + +module.exports = async (ctx) => { + const cfg = config[ctx.params.id]; + if (!cfg) { + throw Error('Bad id. See docs'); + } + + const currentUrl = cfg.link; + + const firstResponse = await got({ + method: 'get', + url: rootUrl, + }); + + const headers = { + cookie: `JSESSIONID=${firstResponse.headers['set-cookie'].join(' ').match(/JSESSIONID=(\S+);/)[1]}`, + }; + + const response = await got({ + method: 'get', + url: currentUrl, + headers, + }); + const $ = cheerio.load(response.data); + + $('div[data-widget-def="topContentActionWidget"]').eq(2).remove(); + $('div[data-widget-def="topContentActionWidget"]').eq(1).remove(); + + const list = $('h5') + .not('.border-top') + .map((_, item) => { + item = $(item); + const a = item.parent().get(0).tagName === 'a' ? item.parent() : item.find('a'); + return { + title: a.attr('title'), + link: `${rootUrl}${a.attr('href')}`, + }; + }) + .get(); + + const items = await Promise.all( + list.map( + async (item) => + await ctx.cache.tryGet(item.link, async () => { + const detailResponse = await got({ + method: 'get', + url: item.link, + headers, + }); + const content = cheerio.load(detailResponse.data); + + content('.author-info').remove(); + + item.author = content('.loa-accordion').text(); + item.doi = content('meta[name="dc.Identifier"]').attr('content'); + item.description = content('.abstractInFull').html(); + item.pubDate = new Date(content('meta[name="dc.Date"]').attr('content')).toUTCString(); + + return item; + }) + ) + ); + + ctx.state.data = { + title: cfg.title, + link: currentUrl, + item: items, + }; +}; diff --git a/lib/routes/bbc/utils.js b/lib/routes/bbc/utils.js index 8b3122d7d7..8d472fc73c 100644 --- a/lib/routes/bbc/utils.js +++ b/lib/routes/bbc/utils.js @@ -1,26 +1,34 @@ -const ProcessImage = ($, e, c) => { +const cheerio = require('cheerio'); +const ProcessImage = ($, e, c, noscript = false) => { const img = $(e).find(c); if (img.length > 0) { let message; + // special handling for img wrapped in