feat: [eztv] Change API url && add magnet_url (#2232)

* Change API url && add magnet_url

* Update doc

更新文档
This commit is contained in:
Songkeys
2019-05-27 11:05:24 +08:00
committed by DIYgod
parent 4a344c9ede
commit da84ef9687
2 changed files with 8 additions and 6 deletions
+2 -2
View File
@@ -25,13 +25,13 @@ pageClass: routes
::: tip 提示
网站提供了全部种子的 RSS: https://eztv.ag/ezrss.xml
网站提供了全部种子的 RSS: https://eztv.io/ezrss.xml
:::
### Lookup Torrents by IMDB ID
<Route author="Songkeys" example="/eztv/torrents/6048596" path="/eztv/torrents/:imdb_id" :paramsDesc="['想搜寻的 show 的种子所对应的 IMDB ID, 可在 [IMDB](https://www.imdb.com) 官网找到']"/>
<Route author="Songkeys" example="/eztv/torrents/6048596" path="/eztv/torrents/:imdb_id" :paramsDesc="['想搜寻的 show 的种子所对应的 IMDB ID, 可在 [IMDB](https://www.imdb.com) 官网找到']" supportBT="1"/>
## JavBus
+6 -4
View File
@@ -5,9 +5,9 @@ module.exports = async (ctx) => {
const response = await axios({
method: 'get',
url: `https://eztv.ag/api/get-torrents?imdb_id=${imdb_id}`,
url: `https://eztv.io/api/get-torrents?imdb_id=${imdb_id}`,
headers: {
Referer: 'https://eztv.ag',
Referer: 'https://eztv.io',
},
});
@@ -15,11 +15,13 @@ module.exports = async (ctx) => {
ctx.state.data = {
title: `EZTV's Torrents of IMBD ID: ${imdb_id}`,
link: 'https://eztv.ag',
link: 'https://eztv.io',
description: `EZTV's Torrents of IMBD ID: ${imdb_id}`,
item: torrents.map((item) => ({
title: item.title,
description: item.magnet_url,
description: `<img src="https:${item.large_screenshot}" />`,
enclosure_url: item.magnet_url,
enclosure_type: 'application/x-bittorrent',
pubDate: new Date(item.date_released_unix * 1000).toUTCString(),
link: item.torrent_url,
})),