fix(route): 哔嘀影视种子链接 (#7751)

This commit is contained in:
Ethan Shen
2021-06-27 08:00:41 +08:00
committed by GitHub
parent a64555d8fb
commit f85a40d4ad
3 changed files with 6 additions and 5 deletions

View File

@@ -687,7 +687,7 @@ pageClass: routes
### 首页
<Route author="nczitzk" example="/bde4" path="/bde4/:type?/:caty?/:area?/:year?/:order?" :paramsDesc="['资源分类,见下表,默认为 `all` 即不限', '影视类型,见下表,默认为 `all` 即不限','制片地区,见下表,默认为 `all` 即不限','上映时间此处填写年份不小于2000默认为 `all` 即不限','影视排序,见下表,默认为更新时间']">
<Route author="nczitzk" example="/mp4er" path="/mp4er/:type?/:caty?/:area?/:year?/:order?" :paramsDesc="['资源分类,见下表,默认为 `all` 即不限', '影视类型,见下表,默认为 `all` 即不限','制片地区,见下表,默认为 `all` 即不限','上映时间此处填写年份不小于2000默认为 `all` 即不限','影视排序,见下表,默认为更新时间']">
#### 资源分类

View File

@@ -3850,7 +3850,8 @@ router.get('/voa/:language/:channel?', require('./routes/voa/index'));
router.get('/6park/:id?/:type?/:keyword?', require('./routes/6park/index'));
// 哔嘀影视
router.get('/bde4/:type?/:caty?/:area?/:year?/:order?', require('./routes/bde4/index'));
router.get('/mp4er/:type?/:caty?/:area?/:year?/:order?', require('./routes/mp4er/index'));
router.get('/bde4/:type?/:caty?/:area?/:year?/:order?', require('./routes/mp4er/index'));
// 上海证券交易所
router.get('/sse/sserules/:slug?', require('./routes/sse/sserules'));

View File

@@ -8,7 +8,7 @@ module.exports = async (ctx) => {
const year = ctx.params.year || 'all';
const order = ctx.params.order || '0';
const rootUrl = 'https://bde4.icu';
const rootUrl = 'https://www.mp4er.com';
const currentUrl = `${rootUrl}/s/${caty}?${type === 'all' ? '' : '&type=' + type}${area === 'all' ? '' : '&area=' + area}${year === 'all' ? '' : '&year=' + year}&order=${order}`;
const response = await got({
method: 'get',
@@ -28,7 +28,7 @@ module.exports = async (ctx) => {
return {
title: item.attr('title'),
link: `${rootUrl}${link[0]}`,
pubDate: new Date(item.parent().find('.meta span').text()).toUTCString(),
pubDate: Date.parse(item.parent().find('.meta span').text()),
};
})
.get();
@@ -61,7 +61,7 @@ module.exports = async (ctx) => {
const torrents = content('#torrent-list .list');
item.description = content('.info0').html() + `<div><b>下载地址:</b>${downloadLinks}</div>` + `${torrents.html() ? `<div><b>种子列表:</b>${torrents.html()}</div>` : ''}`;
item.enclosure_url = torrents.html() ? torrents.find('a.header').last().attr('href') : downloadResponse.data.pop().url;
item.enclosure_url = torrents.html() ? `${rootUrl}${torrents.find('a.header').last().attr('href')}` : downloadResponse.data.pop().url;
item.enclosure_type = 'application/x-bittorrent';
return item;