路由优化,文档查缺补漏,英文文档 (#716)

This commit is contained in:
Henry Wang
2018-09-17 11:18:13 +08:00
committed by DIYgod
parent c338b4fa9b
commit 4fc4321a1a
8 changed files with 194 additions and 392 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
<template>
<span class="badge">
<span class="badge authors">
By<a v-for="uid in uidList" :href="`https://github.com/${uid}`" target="_blank"> @{{ uid }}</a>
</span>
</template>
+1 -1
View File
@@ -1,6 +1,6 @@
<template>
<div class="routeBlock" :id="path">
<h4 :id=path class="name">{{name}} <Author :uid=author />
<h4 class="name">{{name}} <Author :uid=author />
<a :href="'#'+path" aria-hidden="true" class="header-anchor">#</a>
</h4>
<p class="example">
+66
View File
@@ -0,0 +1,66 @@
<template>
<div class="routeBlock" :id="path">
<h4 :id=path class="name">{{name}} <Author :uid=author />
<a :href="'#'+path" aria-hidden="true" class="header-anchor">#</a>
</h4>
<p class="example">
Example: <a :href="'https://rsshub.app'+ example " target="_blank">https://rsshub.app{{example}}</a>
</p>
<p class="path">
Route: <code>{{ path }}</code>
</p>
<div v-if="path.match(/(?<=:).*?(?=\/|$)/g)">
<p>
Parameters:
<ul><li class="params" v-for="(item, index) in path.match(/(?<=:).*?(?=\/|$)/g)">{{item.replace('?','')}}, {{(item.includes('?'))?'optional':'required'}} - <span v-html="renderMarkdown(paramsDesc[index])"></span></li></ul> </p>
</div>
<div v-else><p>Parameters: N/A</p></div>
<slot></slot>
</div>
</template>
<script>
import Author from "./Author.vue"
export default {
components:{
'Author': Author
},
props: {
author: {
type: String,
default: 'DIYgod'
},
name: {
type: String,
required: true
},
path: {
type: String,
required: true
},
example: {
type: String,
required: true
},
paramsDesc: {
type: [Array, String],
default: 'N/A'
}
},
methods: {
renderMarkdown(item) {
const md = require('markdown-it')({
html: true,
});
return md.render(item);
},
}
}
</script>
<style>
li.params p {
display: inline;
}
.routeBlock {
margin: 1rem 0 2rem;
}
</style>
+26 -12
View File
@@ -817,9 +817,13 @@ GitHub 官方也提供了一些 RSS:
## 程序更新
<route level="3" name="RSSHub" author="DIYgod" example="/rsshub/rss" path="/rsshub/rss"/>
### RSSHub
<route level="3" name="MIUI" author="Indexyz" example="/miui/aries" path="/miui/:device/:type?" :paramsDesc="['设备的 `codename` 例如 小米 2s 为 `aries`', '类型, 可选参数']">
<route name="有新路由啦" author="DIYgod" example="/rsshub/rss" path="/rsshub/rss"/>
### MIUI
<route name="MIUI 新版本发布" author="Indexyz" example="/miui/aries" path="/miui/:device/:type?" :paramsDesc="['设备的 `codename` 例如 小米 2s 为 `aries`', '类型, 可选参数']">
| 稳定版 | 开发版 |
| ------- | ------ |
@@ -827,7 +831,9 @@ GitHub 官方也提供了一些 RSS:
</route>
<route level="3" name="Firefox" author="fengkx" example="/firefox/release/desktop" path="/firefox/release/:platform" :paramsDesc="['操作平台']">
### Firefox
<route name="新版本发布" author="fengkx" example="/firefox/release/desktop" path="/firefox/release/:platform" :paramsDesc="['操作平台']">
| 桌面 | Android | Beta | Nightly | Android Beta | ESR |
| ------- | ------- | ---- | ------- | ------------ | ------------- |
@@ -845,15 +851,15 @@ GitHub 官方也提供了一些 RSS:
### Bugly SDK
<route level="3" name="更新日志" author="cielpy" example="/bugly/changelog/1" path="/bugly/changelog/:platform" :paramsDesc="['平台类型, 必选, 1 为 Android, 2 为 iOS']"/>
<route name="更新日志" author="cielpy" example="/bugly/changelog/1" path="/bugly/changelog/:platform" :paramsDesc="['平台类型, 必选, 1 为 Android, 2 为 iOS']"/>
### fir.im 应用
<route level="3" name="更新" author="cielpy" example="/fir/update/xcz" path="/fir/update/:id" :paramsDesc="['fir app id, 必选, 如 fir 生成的链接地址为 https://fir.im/xcz, 则 id 为 `xcz`']"/>
<route name="更新" author="cielpy" example="/fir/update/xcz" path="/fir/update/:id" :paramsDesc="['fir app id, 必选, 如 fir 生成的链接地址为 https://fir.im/xcz, 则 id 为 `xcz`']"/>
### Nvidia Web Driver
<route level="3" name="更新日志" author="cielpy" example="/nvidia/webdriverupdate" path="/nvidia/webdriverupdate"/>
<route name="更新日志" author="cielpy" example="/nvidia/webdriverupdate" path="/nvidia/webdriverupdate"/>
### App Store/Mac App Store
@@ -1337,7 +1343,9 @@ IATA 国际航空运输协会机场代码, 参见[维基百科 国际航空运
<route name="小说更新" author="jacky2001114" example="/novel/uukanshu/49621>" path="/novel/uukanshu/:id" :paramsDesc="['小说 id, 可在对应小说页 URL 中找到']"/>
<route level="3" name="文学迷" author="lengthmin" example="/novel/wenxuemi/6/6144" path="/novel/wenxuemi/:id1/:id2" :paramsDesc="['小说网站链接倒数第二部分的数字, 可在对应小说页 URL 中找到, 例如 `6` https://www.wenxuemi.com/files/article/html/6/6144/', '小说网站链接最后的数字, 可在对应小说页 URL 中找到, 例如 `6144` https://www.wenxuemi.com/files/article/html/6/6144/']"/>
### 文学迷
<route name="小说更新" author="lengthmin" example="/novel/wenxuemi/6/6144" path="/novel/wenxuemi/:id1/:id2" :paramsDesc="['小说网站链接倒数第二部分的数字, 可在对应小说页 URL 中找到, 例如 `6` https://www.wenxuemi.com/files/article/html/6/6144/', '小说网站链接最后的数字, 可在对应小说页 URL 中找到, 例如 `6144` https://www.wenxuemi.com/files/article/html/6/6144/']"/>
### 起点
@@ -1345,13 +1353,19 @@ IATA 国际航空运输协会机场代码, 参见[维基百科 国际航空运
<route name="讨论区" author="Chingyat" example="/qidian/forum/1010400217" path="/qidian/forum/:id" :paramsDesc="['小说 id, 可在对应小说页 URL 中找到']"/>
<route level="3" name="快眼看书" author="squkw" example="/novel/booksky/98619" path="/novel/booksky/:id" :paramsDesc="['小说 id, 可在对应小说页 URL 中找到, 例如 `98619` http://booksky.so/BookDetail.aspx?Level=1&bid=98619']"/>
### 快眼看书
## 中国驻外使领馆通知
<route name="小说更新" author="squkw" example="/novel/booksky/98619" path="/novel/booksky/:id" :paramsDesc="['小说 id, 可在对应小说页 URL 中找到, 例如 `98619` http://booksky.so/BookDetail.aspx?Level=1&bid=98619']"/>
<route level="3" name="大使馆" author="HenryQW" example="/embassy/us" path="/embassy/:country" :paramsDesc="['国家短代码, 见[支持国家列表](#支持国家列表)', '城市, 对应国家列表下的`领事馆城市列表`']" />
## 中国驻外使领馆
<route level="3" name="领事馆" author="HenryQW" example="/embassy/us/chicago" path="/embassy/:country/:city" :paramsDesc="['国家短代码, 见[支持国家列表](#支持国家列表)', '城市, 对应国家列表下的`领事馆城市列表`']" />
### 大使馆
<route name="大使馆重要通知" author="HenryQW" example="/embassy/us" path="/embassy/:country" :paramsDesc="['国家短代码, 见[支持国家列表](#支持国家列表)', '城市, 对应国家列表下的`领事馆城市列表`']" />
### 领事馆
<route name="领事馆重要通知" author="HenryQW" example="/embassy/us/chicago" path="/embassy/:country/:city" :paramsDesc="['国家短代码, 见[支持国家列表](#支持国家列表)', '城市, 对应国家列表下的`领事馆城市列表`']" />
### 支持国家列表
@@ -1563,7 +1577,7 @@ IATA 国际航空运输协会机场代码, 参见[维基百科 国际航空运
### Apple
<route name="更换和维修扩展计划" author="metowolf" example="/apple/exchange_repair" path="/apple/exchange_repair/:country?" :paramsDesc="['苹果官网 URL 中的国家代码, 默认 `cn`']/>
<route name="更换和维修扩展计划" author="metowolf HenryQW" example="/apple/exchange_repair" path="/apple/exchange_repair/:country?" :paramsDesc="['苹果官网 URL 中的国家代码, 默认中国 `cn`']"/>
#### App Store/Mac App Store
+96 -315
View File
@@ -136,227 +136,93 @@ If no matching results were found, the server returns only a HTTP status code `2
### RSSHub
Eg: [https://rsshub.app/rsshub/rss](https://rsshub.app/rsshub/rss)
<routeEn name="Update" path="/rsshub/rss" example="/rsshub/rss" />
Route: `/rsshub/rss`
### MIUI
Parameters: N/A
### MIUI <Author uid="Indexyz"/>
Eg: [https://rsshub.app/miui/aries/](https://rsshub.app/miui/aries/)
Route: `/miui/:device/:type?`
Parameters:
device: the device `codename` eg. `aries` for Mi 2S
type: type, optional
<routeEn name="New firmware" author="Indexyz" example="/miui/aries/" path="/miui/:device/:type?" :paramsDesc="['the device `codename` eg. `aries` for Mi 2S','type']" >
| stable | development |
| ------- | ----------- |
| release | dev |
### Firefox New Release <Author uid="fengkx"/>
</routeEn>
Eg: [https://rsshub.app/firefox/release/desktop](https://rsshub.app/firefox/release/desktop)
### Firefox
Route: `/firefox/release/:platform`
Parameters:
- platform
<routeEn name="New Release" author="fengkx" example="/firefox/release/desktop" path="/firefox/release/:platform" :paramsDesc="['the platform']" >
| Desktop | Android | Beta | Nightly | Android Beta | ESR |
| ------- | ------- | ---- | ------- | ------------ | ------------- |
| desktop | android | beta | nightly | android-beta | organizations |
</routeEn>
### Thunderbird <Author uid="garywill"/>
Eg: <https://rsshub.app/thunderbird/release>
<routeEn name="Update" author="garywill" path="/thunderbird/release" example="/thunderbird/release" />
Route: `/thunderbird/release/`
### App Store/Mac App Store
Parameters: N/A
<routeEn name="App Update" author="cielpy" example="/appstore/update/us/id697846300" path="/appstore/update/:country/:id" :paramsDesc="['App Store Country, obtain from the app URL `https://itunes.apple.com/us/app/reeder-3/id697846300?mt=8`, in this case, `us`', 'App Store app id, obtain from the app URL `https://itunes.apple.com/us/app/reeder-3/id697846300?mt=8`, in this case, `id697846300`']" />
### App Store/Mac App Store Updates <Author uid="cielpy"/>
<routeEn name="App Update" author="HenryQW" example="/appstore/price/us/mac/id1152443474" path="/appstore/price/:country/:type/:id" :paramsDesc="['App Store Country, obtain from the app URL https://itunes.apple.com/us/app/id1152443474, in this case, `us`', 'App type,either `iOS` or `mac`', 'App Store app id, obtain from the app URL https://itunes.apple.com/us/app/id1152443474, in this case, `id1152443474`']" />
Eg: [https://rsshub.app/appstore/update/us/id697846300](https://rsshub.app/appstore/update/us/id697846300)
<routeEn name="In-App-Purchase Price Drop Alert" author="HenryQW" example="/appstore/iap/us/id953286746" path="/appstore/iap/:country/:id" :paramsDesc="['App Store Country, obtain from the app URL https://itunes.apple.com/us/app/id953286746, in this case, `us`', 'App Store app id, obtain from the app URL https://itunes.apple.com/us/app/id953286746, in this case, `id953286746`']" />
Route: `/appstore/update/:country/:id`
### Greasy Fork
Parameters:
<routeEn name="Script Update" author="imlonghao" path="/greasyfork/:language/:domain?" example="/greasyfork/en/google.com" :paramsDesc="['language, located on the top right corner of Greasy Fork\'s search page, set to `all` for including all languages', 'the script\'s target domain']" />
- country, App Store Country, obtain from the app URL `https://itunes.apple.com/us/app/reeder-3/id697846300?mt=8`, in this case, `us`.
### Thunderbird
- id, App Store app id, obtain from the app URL `https://itunes.apple.com/us/app/reeder-3/id697846300?mt=8`, in this case, `id697846300`.
<routeEn name="Changelog" author="garywill" example="/thunderbird/release" path="/thunderbird/release"/>
### App Store/Mac App Store Price Drop Alert <Author uid="HenryQW"/>
### Nvidia Web Driver
Eg: [https://rsshub.app/appstore/price/us/mac/id1152443474](https://rsshub.app/appstore/price/cn/mac/id1152443474)
<routeEn name="Changelog" author="cielpy" example="/nvidia/webdriverupdate" path="/nvidia/webdriverupdate"/>
Route: `/appstore/price/:country/:type/:id`
## Social Media
Parameters:
### pixiv
- country, App Store Country, obtain from the app URL https://itunes.apple.com/us/app/id1152443474, in this case, `us`.
<routeEn name="User Bookmark" author="EYHN" path="/pixiv/user/bookmarks/:id" example="/pixiv/user/bookmarks/15288095" :paramsDesc="['user id, available in user\'s homepage URL']" />
- type, App type,either `iOS` or `mac`
<routeEn name="User Activity" author="EYHN" path="/pixiv/user/:id" example="/pixiv/user/15288095" :paramsDesc="['user id, available in user\'s homepage URL']" />
- id, App Store app id, obtain from the app URL https://itunes.apple.com/us/app/id1152443474, in this case, `id1152443474`.
<routeEn name="Rankings" author="EYHN" path="/pixiv/ranking/:mode/:date?" example="/pixiv/ranking/week" :paramsDesc="['rank type', 'format: `2018-4-25`']" >
### App Store/Mac App Store In-App-Purchase Price Drop Alert <Author uid="HenryQW"/>
| pixiv daily rank | pixiv weekly rank | pixiv monthly rank | pixiv male rank | pixiv female rank | pixiv original rank | pixiv rookie user rank |
| ---------------- | ----------------- | ------------------ | --------------- | ----------------- | ------------------- | ---------------------- |
| day | week | month | day_male | day_female | week_original | week_rookie |
Eg: [https://rsshub.app/appstore/iap/us/id953286746](https://rsshub.app/appstore/price/us/id953286746)
| pixiv R-18 daily rank | pixiv R-18 male rank | pixiv R-18 female rank | pixiv R-18 weekly rank | pixiv R-18G rank |
| --------------------- | -------------------- | ---------------------- | ---------------------- | ---------------- |
| day_r18 | day_male_r18 | day_female_r18 | week_r18 | week_r18g |
Route: `/appstore/iap/:country/:id`
</routeEN>
Parameters:
### Disqus
- country, App Store Country, obtain from the app URL https://itunes.apple.com/us/app/id953286746, in this case, `us`.
<routeEn name="Comment" path="/disqus/posts/:forum" example="/disqus/posts/diygod-me" :paramsDesc="['forum, disqus name of the target website']" />
- id, App Store app id, obtain from the app URL https://itunes.apple.com/us/app/id953286746, in this case, `id953286746`.
### Twitter
## pixiv
<routeEn name="User" path="/twitter/user/:id" example="/twitter/user/DIYgod" :paramsDesc="['twitter handler']" />
### User Bookmark <Author uid="EYHN"/>
### Instagram
Eg: [https://rsshub.app/pixiv/user/bookmarks/15288095](https://rsshub.app/pixiv/user/bookmarks/15288095)
<routeEn name="User" path="/instagram/user/:id" example="/instagram/user/diygod" :paramsDesc="['Instagram id']" />
Route: `/pixiv/user/bookmarks/:id`
### Youtube
Parameters:
<routeEn name="User" path="/youtube/user/:username" example="/youtube/user/JFlaMusic" :paramsDesc="['YouTuber id']" />
- id, user id, available in user's homepage URL
<routeEn name="Channel" path="/youtube/channel/:id" example="/youtube/channel/UCDwDMPOZfxVV0x_dz0eQ8KQ" :paramsDesc="['YouTube channel id']" />
### User Activity <Author uid="EYHN"/>
### Telegram
Eg: [https://rsshub.app/pixiv/user/11](https://rsshub.app/pixiv/user/11)
Route: `/pixiv/user/:id`
Parameters:
- id, user id, available in user's homepage URL
### Rankings <Author uid="EYHN"/>
Eg: [https://rsshub.app/pixiv/ranking/week](https://rsshub.app/pixiv/ranking/week)
Route: `/pixiv/ranking/:mode/:date?`
Parameters
- mode: rank type
| pixiv daily rank | pixiv weekly rank | pixiv monthly rank | pixiv male rank | pixiv female rank | pixiv original rank | pixiv rookie user rank |
| ---------------- | ----------------- | ------------------ | --------------- | ----------------- | ------------------- | ---------------------- |
| day | week | month | day_male | day_female | week_original | week_rookie |
| pixiv R-18 daily rank | pixiv R-18 male rank | pixiv R-18 female rank | pixiv R-18 weekly rank | pixiv R-18G rank |
| --------------------- | -------------------- | ---------------------- | ---------------------- | ---------------- |
| day_r18 | day_male_r18 | day_female_r18 | week_r18 | week_r18g |
- date: date, format: `2018-4-25`
## Disqus
### Comment
Eg: [https://rsshub.app/disqus/posts/diygod-me](https://rsshub.app/disqus/posts/diygod-me)
Route: `/disqus/posts/:forum`
Parameters:
- forum, disqus name of the target website
## Twitter
### User
Eg: [https://rsshub.app/twitter/user/DIYgod](https://rsshub.app/twitter/user/DIYgod)
Route: `/twitter/user/:id`
Parameters:
- id, twitter handler
## Instagram
### User
Eg: [https://rsshub.app/instagram/user/diygod](https://rsshub.app/instagram/user/diygod)
Route: `/instagram/user/:id`
Parameters:
- id, Instagram id
## Youtube
### User
Eg: [https://rsshub.app/youtube/user/JFlaMusic](https://rsshub.app/youtube/user/JFlaMusic)
Route: `/youtube/user/:username`
Parameters:
- username, Youtuber's username
### Channel
Eg: [https://rsshub.app/youtube/channel/UCDwDMPOZfxVV0x_dz0eQ8KQ](https://rsshub.app/youtube/channel/UCDwDMPOZfxVV0x_dz0eQ8KQ)
Route: `/youtube/channel/:id`
Parameters:
- id, channel id
## Dribbble
### Popular
Eg:
[https://rsshub.app/dribbble/popular](https://rsshub.app/dribbble/popular)
[https://rsshub.app/dribbble/popular/week](https://rsshub.app/dribbble/popular/week)
Route: `/dribbble/popular/:timeframe?`
Parameters:
- timeframe, optional, support the following values: week, month, year and ever
### User (or team)
Eg: [https://rsshub.app/dribbble/user/google](https://rsshub.app/dribbble/user/google)
Route: `/dribbble/user/:name`
Parameters:
- name, username, available in user's homepage URL
### Keyword
Eg: [https://rsshub.app/dribbble/keyword/player](https://rsshub.app/dribbble/keyword/player)
Route: `/dribbble/keyword/:keyword`
Parameters:
- keyword, the desired keyword
## Telegram
### Channel
<routeEn name="Channel" path="/telegram/channel/:username" example="/telegram/channel/awesomeDIYgod" :paramsDesc="['channel name']" >
::: tip
@@ -364,15 +230,37 @@ Bot initialization required: Add Telegram Bot [@RSSHub_bot](https://t.me/RSSHub_
:::
Eg: [https://rsshub.app/telegram/channel/awesomeDIYgod](https://rsshub.app/telegram/channel/awesomeDIYgod)
</routeEN>
Route: `/telegram/channel/:username`
## Travel
Parameters:
### All the Flight Deals
- username, channel name
<routeEn name="Flight Deals" author="HenryQW" path="/atfd/:locations/:nearby?" example="/atfd/us+new%20york,gb+london/1" :paramsDesc="['the departing city, consists of an 「ISO 3166-1 country code」 and a 「city name」. Origin\'s ISO 3166-1 country code + city name, eg. `us+new york`, [https://rsshub.app/atfd/us+new york](https://rsshub.app/atfd/us+new%20york). Multiple origins are supported via a comma separated string, eg. `us+new york,gb+london`, [https://rsshub.app/atfd/us+new york,gb+london/](https://rsshub.app/atfd/us+new%20york,gb+london/).', 'whether includes nearby airports, optional value of 0 or 1, default to 0 (exclude nearby airports)']" >
## GitHub
For ISO 3166-1 country codes please refer to [Wikipedia ISO_3166-1](https://en.wikipedia.org/wiki/ISO_3166-1)
::: tip
If the city name contains a space like `Mexico City`, replace the space with `%20`, `Mexico%20City`.
:::
</routeEn>
### Hopper
<routeEn name="Flight Deals" author="HenryQW" path="/hopper/:lowestOnly/:from/:to?" example="/hopper/1/LHR/PEK" :paramsDesc="['set to `1` will return the cheapest deal only, instead of all deals, so you don\'t get spammed', 'origin airport IATA code', 'destination airport IATA code, if unset the destination will be set to `anywhere`']" >
This route returns a list of flight deals (in most cases, 6 flight deals) for a period defined by Hopper's algorithm, which means the travel date will be totally random (could be tomorrow or 10 months from now).
For airport IATA code please refer to [Wikipedia List of airports by IATA code](https://en.wikipedia.org/wiki/List_of_airports_by_IATA_code:_A)
</routeEn>
## Programming
### GitHub
::: tip
@@ -384,67 +272,29 @@ GitHub provides some official RSS feeds:
:::
### User Repo <Author uid="dragon-yuan"/>
<routeEn name="User Repo" author="dragon-yuan" path="/github/repos/:user" example="/github/repos/DIYgod" :paramsDesc="['GitHub username']" />
Eg: [https://rsshub.app/github/repos/DIYgod](https://rsshub.app/github/repos/DIYgod)
<routeEn name="Trending" path="/github/trending/:since/:language?" example="/github/trending/daily/javascript" :paramsDesc="['time frame, available in [Trending page](https://github.com/trending/javascript?since=monthly) \'s URL, possible values are: daily, weekly or monthly', 'the feed language, available in [Trending page](https://github.com/trending/javascript?since=monthly) \'s URL']" />
Route: `/github/repos/:user`
<routeEn name="Issue" author="HenryQW" path="/github/issue/:user/:repo" example="/github/issue/DIYgod/RSSHub" :paramsDesc="['GitHub username', 'GitHub repo name']" />
Parameters:
<routeEn name="Follower" author="HenryQW" path="/github/user/follower/:user" example="/github/user/followers/HenryQW" :paramsDesc="['GitHub username']" />
- user, username
<routeEn name="Star" author="HenryQW" path="/github/stars/:user/:repo" example="/stars/DIYGod/RSSHub" :paramsDesc="['GitHub username', 'GitHub repo name']" />
### Trending
### GitLab
Eg:
<routeEn name="Explore" author="imlonghao" example="/gitlab/explore/trending" path="/gitlab/explore/:type" :paramsDesc="['type']">
[https://rsshub.app/github/trending/daily](https://rsshub.app/github/trending/daily)
| Trending | Most stars | All |
| -------- | ---------- | --- |
| trending | starred | all |
[https://rsshub.app/github/trending/daily/javascript](https://rsshub.app/github/trending/daily/javascript)
</routeEn>
Route: `/github/trending/:since/:language?`
## Uncategorized
Parameters:
- since, time frame, available in [Trending page](https://github.com/trending/javascript?since=monthly) 's URL, possible values are: daily, weekly or monthly
- language, the feed language, available in [Trending page](https://github.com/trending/javascript?since=monthly) 's URL
### Issue <Author uid="HenryQW"/>
Eg: [https://rsshub.app/github/issue/DIYgod/RSSHub](https://rsshub.app/github/issue/DIYgod/RSSHub)
Route: `/github/issue/:user/:repo`
Parameters:
- user, username
- repo, repo name
### Follower <Author uid="HenryQW"/>
Eg: [https://rsshub.app/github/user/followers/HenryQW](https://rsshub.app/github/user/followers/HenryQW)
Route: `/github/user/follower/:user`
Parameters:
- user, username
### Star <Author uid="HenryQW"/>
Eg: [https://rsshub.app/github/stars/DIYGod/RSSHub](https://rsshub.app/github/stars/DIYGod/RSSHub)
Route: `/github/stars/:user/:repo`
Parameters:
- user, username
- repo, repo name
## EZTV
### EZTV
::: tip
@@ -452,70 +302,15 @@ EZTV provides an official RSS feed of all torrents: https://eztv.ag/ezrss.xml
:::
### Torrent Lookup by IMDB ID <Author uid="Songkeys"/>
<routeEn name="Torrent Lookup by IMDB ID" author="Songkeys" path="/eztv/torrents/:imdb_id" example="/eztv/torrents/6048596" :paramsDesc="['search for the IMDB ID of the desired show, available at [IMDB](https://www.imdb.com)']" />
Eg: [https://rsshub.app/eztv/torrents/6048596](https://rsshub.app/eztv/torrent/6048596)
### Hexo Blog
Route: `/eztv/torrents/:imdb_id`
<routeEn name="Blog using Next theme" author="fengkx" path="/hexo/next/:url" example="/hexo/next/fengkx.top" :paramsDesc="['the blog URL without the protocol (http:// and https://)']" />
Parameters:
### Google
- imdb_id, search for the IMDB ID of the desired show, available at [IMDB](https://www.imdb.com)
## Hexo Blog
### Blog using Next theme <Author uid="fengkx"/>
Eg: [http://rsshub.app/hexo/next/fengkx.top](http://rsshub.app/hexo/next/fengkx.top)
Route: `/hexo/next/:url`
Parameters:
- url, the blog URL without the protocol (http:// and https://)
## Greasy Fork
### Script Update <Author uid="imlonghao"/>
Eg: [https://rsshub.app/greasyfork/en/google.com](https://rsshub.app/greasyfork/en/google.com)
Route: `/greasyfork/:language/:domain?`
Parameters:
- language, language, located on the top right corner of Greasy Fork's search page, set to `all` for including all languages
- domain, the script's target domain, optional
## All the Flight Deals
### Flight Deals <Author uid="HenryQW"/>
Eg: [https://rsshub.app/atfd/us+new york,gb+london/1](https://rsshub.app/atfd/us+new%20york,gb+london/1)
Route: `/atfd/:locations/:nearby?`
Parameters:
- locations: the departing city, consists of an 「ISO 3166-1 country code」 and a 「city name」. They are not case sensitive. :
1. Origin's ISO 3166-1 country code + city name, eg. `us+new york`, [https://rsshub.app/atfd/us+new york](https://rsshub.app/atfd/us+new%20york)
2. Multiple origins are supported via a comma separated string, eg. `us+new york,gb+london`, [https://rsshub.app/atfd/us+new york,gb+london/](https://rsshub.app/atfd/us+new%20york,gb+london/)
For ISO 3166-1 country codes please refer to [Wikipedia ISO_3166-1](https://en.wikipedia.org/wiki/ISO_3166-1)
- nearby: whether includes nearby airports, optional value of 0 or 1, default to 0 (exclude nearby airports)
::: tip
If the city name contains a space like `Mexico City`, replace the space with `%20`, `Mexico%20City`.
:::
## Google
### Google Scholar Keywords Monitoring <Author uid="HenryQW"/>
<routeEn name="Google Scholar Keywords Monitoring" author="HenryQW" path="/google/scholar/:query" example="/google/scholar/data+visualization" :paramsDesc="['query statement which supports「Basic」and「Advanced」modes']" >
::: warning
@@ -523,34 +318,20 @@ Google Scholar has strict anti-crawling mechanism implemented, the demo below do
:::
Eg: [https://rsshub.app/google/scholar/data+visualization](https://rsshub.app/google/scholar/data+visualization)
1. Basic mode, sample query is the keywords desired, eg.「data visualization」, [https://rsshub.app/google/scholar/data+visualization](https://rsshub.app/google/scholar/data+visualization).
Route: `/google/scholar/:query`
2. Advanced mode, visit [Google Scholar](https://scholar.google.com/schhp?hl=en&as_sdt=0,5), click the top left corner and select「Advanced Search」, fill in your conditions and submit the search. The URL should look like this: [https://scholar.google.com/scholar?as_q=data+visualization&as_epq=&as_oq=&as_eq=&as_occt=any&as_sauthors=&as_publication=&as_ylo=2018&as_yhi=&hl=en&as_sdt=0%2C5](https://scholar.google.com/scholar?as_q=data+visualization&as_epq=&as_oq=&as_eq=&as_occt=any&as_sauthors=&as_publication=&as_ylo=2018&as_yhi=&hl=en&as_sdt=0%2C5), copy everything after `https://scholar.google.com/scholar?` from the URL and use it as the query for this route. The complete URL for the above example should look like this: [https://rsshub.app/google/scholar/as_q=data+visualization&as_epq=&as_oq=&as_eq=&as_occt=any&as_sauthors=&as_publication=&as_ylo=2018&as_yhi=&hl=en&as_sdt=0%2C5](https://rsshub.app/google/scholar/as_q=data+visualization&as_epq=&as_oq=&as_eq=&as_occt=any&as_sauthors=&as_publication=&as_ylo=2018&as_yhi=&hl=en&as_sdt=0%2C5).
Parameters:
</routeEn>
- query, query statement which supports「Basic」and「Advanced」modes:
### Dribbble
1. Basic mode, sample query is the keywords desired, eg.「data visualization」, [https://rsshub.app/google/scholar/data+visualization](https://rsshub.app/google/scholar/data+visualization).
<routeEn name="Popular" path="/dribbble/popular/:timeframe?" example="/dribbble/popular" :paramsDesc="['support the following values: week, month, year and ever']" />
2. Advanced mode, visit [Google Scholar](https://scholar.google.com/schhp?hl=en&as_sdt=0,5), click the top left corner and select「Advanced Search」, fill in your conditions and submit the search. The URL should look like this: [https://scholar.google.com/scholar?as_q=data+visualization&as_epq=&as_oq=&as_eq=&as_occt=any&as_sauthors=&as_publication=&as_ylo=2018&as_yhi=&hl=en&as_sdt=0%2C5](https://scholar.google.com/scholar?as_q=data+visualization&as_epq=&as_oq=&as_eq=&as_occt=any&as_sauthors=&as_publication=&as_ylo=2018&as_yhi=&hl=en&as_sdt=0%2C5), copy everything after `https://scholar.google.com/scholar?` from the URL and use it as the query for this route. The complete URL for the above example should look like this: [https://rsshub.app/google/scholar/as_q=data+visualization&as_epq=&as_oq=&as_eq=&as_occt=any&as_sauthors=&as_publication=&as_ylo=2018&as_yhi=&hl=en&as_sdt=0%2C5](https://rsshub.app/google/scholar/as_q=data+visualization&as_epq=&as_oq=&as_eq=&as_occt=any&as_sauthors=&as_publication=&as_ylo=2018&as_yhi=&hl=en&as_sdt=0%2C5).
<routeEn name="User (or team)" path="/dribbble/user/:name" example="/dribbble/user/google" :paramsDesc="['username, available in user\'s homepage URL']" />
## Hopper
<routeEn name="Keyword" path="/dribbble/keyword/:keyword" example="/dribbble/keyword/player" :paramsDesc="['desired keyword']" />
### Hopper Flight Deals <Author uid="HenryQW"/>
### Apple
This route returns a list of flight deals (in most cases, 6 flight deals) for a period defined by Hopper's algorithm, which means the travel date will be totally random (could be tomorrow or 10 months from now).
Eg: London Heathrow Airport &#9992; Beijing Capital International Airport [https://rsshub.app/hopper/1/LHR/PEK](https://rsshub.app/hopper/1/LHR/PEK)
Route: `/hopper/:lowestOnly/:from/:to?`
Parameters:
- lowestOnly, set to `1` will return the cheapest deal only, instead of all deals, so you don't get spammed
- from, origin airport IATA code
- to, destination airport IATA code, optional, if unset the destination will be set to `anywhere`
For airport IATA code please refer to [Wikipedia List of airports by IATA code](https://en.wikipedia.org/wiki/List_of_airports_by_IATA_code:_A)
<routeEn name="Exchange and Repair Extension Programs" author="metowolf HenryQW" example="/apple/exchange_repair" path="/apple/exchange_repair/:country?" :paramsDesc="['country code in apple.com URL (exception: for `United States` please use `us`), default to China `cn`']"/>
-1
View File
@@ -238,7 +238,6 @@ router.get('/jike/topic/text/:id', require('./routes/jike/topicText'));
router.get('/jike/topic/square/:id', require('./routes/jike/topicSquare'));
router.get('/jike/user/:id', require('./routes/jike/user'));
router.get('/jike/daily', require('./routes/jike/daily'));
router.get('/jike/dev/:id', require('./routes/jike/topicDev'));
// 极客时间
router.get('/geektime/column/:cid', require('./routes/geektime/column'));
+4 -2
View File
@@ -47,7 +47,7 @@ module.exports = async (ctx) => {
description: $('#welcome')
.html()
.replace(/src="\//g, `src="${url.resolve(host, '.')}`),
pubDate: new Date(datelist[index].replace(/(\d+) 年 (\d+) 月 (\d+) 日/, '$1-$2-$3')),
pubDate: new Date(datelist[index].replace(/(\d+) 年 (\d+) 月 (\d+) 日/, '$1-$2-$3')).toISOString(),
};
ctx.cache.set(itemUrl, JSON.stringify(single), 24 * 60 * 60);
@@ -55,8 +55,10 @@ module.exports = async (ctx) => {
})
);
const title = ctx.params.country === 'cn' ? 'Apple 支持 -- 更换和维修扩展计划' : `Apple ${ctx.params.country.toUpperCase()} Support -- Exchange and Repair Extension Programs`;
ctx.state.data = {
title: 'Apple 支持 -- 更换和维修扩展计划',
title,
link,
item: out,
};
-60
View File
@@ -1,60 +0,0 @@
const axios = require('../../utils/axios');
module.exports = async (ctx) => {
const id = ctx.params.id;
const response = await axios({
method: 'post',
url: 'https://app.jike.ruguoapp.com/1.0/messages/history',
headers: {
Referer: `https://m.okjike.com/topics/${id}`,
'App-Version': '4.1.0',
},
data: {
loadMoreKey: null,
topic: id,
limit: 10,
},
});
const data = response.data.data;
const topic = data[0].topic;
let link = `https://web.okjike.com/topic/${id}/official`;
ctx.state.data = {
title: `${topic.content} - 即刻主题精选`,
link,
description: topic.content,
image: topic.squarePicture.picUrl || topic.squarePicture.middlePicUrl || topic.squarePicture.thumbnailUrl,
item: data.map((item) => {
let content = '';
// 处理正文内容
content += item.content || item.content.trim() !== '' ? `<div>${item.content}</div><br/> ` : '';
// 处理缩略图, WEBP + JPEG
if (item.pictures) {
item.pictures.forEach(
(pic) =>
(content += `<picture><source srcset="${pic.picUrl.split('/thumbnail/')[0]}/strip/format/webp" type="image/webp"><source srcset="${pic.picUrl.split('?imageMogr2/')[0]}" type="image/jpeg"><img src="${
pic.picUrl.split('?imageMogr2/')[0]
}"></picture>`)
);
}
// 处理外链,originalLinkUrl 优先级高于 linkUrl
if (item.linkInfo && (item.linkInfo.originalLinkUrl || item.linkInfo.linkUrl)) {
link = item.linkInfo.originalLinkUrl || item.linkInfo.linkUrl;
content += `<br/> <a href="${link}">查看外链</a>`;
}
return {
// 处理标题,无标题则使用「主题名称」有新消息
title: item.content.trim() === '' ? `「${topic.content}」有新消息` : item.content,
description: `${content}`,
pubDate: new Date(item.createdAt).toUTCString(),
link,
};
}),
};
};