mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-08 14:07:54 +08:00
feat(route): add gaze.run update notify (#9482)
* feat(route): add gaze.run update notify * feat(route): add gaze.run update notify * Update docs/multimedia.md Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/v2/gaze/radar.js Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/v2/gaze/templates/update.art Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/v2/gaze/update.js Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/v2/gaze/update.js Co-authored-by: Tony <TonyRL@users.noreply.github.com> Co-authored-by: Tony <TonyRL@users.noreply.github.com>
This commit is contained in:
@@ -389,6 +389,12 @@ BT 之家的域名会变更,本路由以 <https://www.btbtt20.com> 为默认
|
||||
|
||||
<Route author="Songkeys" example="/eztv/torrents/6048596" path="/eztv/torrents/:imdb_id" :paramsDesc="['想搜寻的 show 的种子所对应的 IMDB ID, 可在 [IMDB](https://www.imdb.com) 官网找到']" supportBT="1"/>
|
||||
|
||||
## 注视影视
|
||||
|
||||
### 更新通知
|
||||
|
||||
<Route author="zytomorrow" example="/gaze/update/5157c267ee121ab8d1b45092304a1e85" path="/gaze/update/:mid" :paramsDesc="['剧集的id。播放页面play之后的一串字符']"/>
|
||||
|
||||
## Hentaimama
|
||||
|
||||
### 近期更新
|
||||
|
||||
3
lib/v2/gaze/maintainer.js
Normal file
3
lib/v2/gaze/maintainer.js
Normal file
@@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
'/update/:mid': ['zytomorrow'],
|
||||
};
|
||||
13
lib/v2/gaze/radar.js
Normal file
13
lib/v2/gaze/radar.js
Normal file
@@ -0,0 +1,13 @@
|
||||
module.exports = {
|
||||
'gaze.run': {
|
||||
_name: '注视影视',
|
||||
'.': [
|
||||
{
|
||||
title: '更新通知',
|
||||
docs: 'https://docs.rsshub.app//multimedia.html#gaze-run',
|
||||
source: ['/play/:mid'],
|
||||
target: (params) => `/gaze/update/${params.mid}`,
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
3
lib/v2/gaze/router.js
Normal file
3
lib/v2/gaze/router.js
Normal file
@@ -0,0 +1,3 @@
|
||||
module.exports = function (router) {
|
||||
router.get('/update/:mid', require('./update'));
|
||||
};
|
||||
4
lib/v2/gaze/templates/update.art
Normal file
4
lib/v2/gaze/templates/update.art
Normal file
@@ -0,0 +1,4 @@
|
||||
<div>
|
||||
{{ data.name }}已于{{ data.update_time }}更新第{{ data.episodes }}集。<br/>
|
||||
观看地址:<a href="https://gaze.run/play/{{ data.cid }}">{{ data.name }}第{{ data.episodes }}集</a>
|
||||
</div>
|
||||
27
lib/v2/gaze/update.js
Normal file
27
lib/v2/gaze/update.js
Normal file
@@ -0,0 +1,27 @@
|
||||
const got = require('@/utils/got');
|
||||
const { art } = require('@/utils/render');
|
||||
const path = require('path');
|
||||
const { parseDate } = require('@/utils/parse-date');
|
||||
const timezone = require('@/utils/timezone')
|
||||
|
||||
// 站长提供的API
|
||||
const rootUrl = 'https://gaze.run/3e47b75000b0924b6c9ba5759a7cf15d';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const mid = ctx.params.mid;
|
||||
const response = await got.post(rootUrl, { form: { mid } });
|
||||
const data = response.data.data;
|
||||
|
||||
ctx.state.data = {
|
||||
title: `gaze.run影视更新通知 - ${data.name}`,
|
||||
link: `https://gaze.run/play/${mid}`,
|
||||
item: [
|
||||
{
|
||||
title: `${data.name}-第${data.episodes}集`,
|
||||
description: art(path.resolve(__dirname, './templates/update.art'), { data }),
|
||||
link: `https://gaze.run/play/${mid}`,
|
||||
pubDate: timezone(parseDate(data.update_time), +8),
|
||||
},
|
||||
],
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user