fix(route): update domain to mp4kan.com for domp4 (#12225)

This commit is contained in:
Ethan Shen 2023-04-04 02:20:28 +08:00 committed by GitHub
parent 1373acf94c
commit 01e29c18d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 6 deletions

View File

@ -426,7 +426,7 @@ BT 之家的域名会变更,本路由以 <https://www.btbtt20.com> 为默认
### 剧集订阅
<Route author="savokiss" example="/domp4/detail/LBTANI22222I" path="/domp4/detail/:id" :paramsDesc="['从剧集详情页 URL 处获取,如:`https://www.domp4.cc/html/LBTANI22222I.html`,取 `.html` 前面部分']" radar="1" supportBT="1"/>
<Route author="savokiss" example="/domp4/detail/LBTANI22222I" path="/domp4/detail/:id" :paramsDesc="['从剧集详情页 URL 处获取,如:`https://www.mp4kan.com/html/LBTANI22222I.html`,取 `.html` 前面部分']" radar="1" supportBT="1"/>
:::tip
由于大部分详情页是 `/html/xxx.html`,还有部分是 `/detail/123.html`所以此处做了兼容id 取 `xxx` 或者 `123` 都可以。

View File

@ -1,8 +1,6 @@
const cheerio = require('cheerio');
const got = require('@/utils/got');
const { decodeCipherText, composeMagnetUrl, getUrlType } = require('./utils');
const baseUrl = 'https://www.domp4.cc';
const { baseUrl, decodeCipherText, composeMagnetUrl, getUrlType } = require('./utils');
function getItemList($, detailUrl) {
const encoded = $('.article script[type]')

View File

@ -1,8 +1,9 @@
const got = require('@/utils/got');
const cheerio = require('cheerio');
const baseUrl = 'https://www.domp4.cc';
const latestUrl = 'https://www.domp4.cc/custom/update.html';
const { baseUrl } = require('./utils');
const latestUrl = `${baseUrl}/custom/update.html`;
function getItemList($, type) {
const list = $(`#${type} .list-group-item`)

View File

@ -1,3 +1,5 @@
const baseUrl = 'https://www.mp4kan.com';
/**
* trackers from https://www.domp4.cc/Style/2020/js/base.js?v=2
*/
@ -79,6 +81,7 @@ function decodeCipherText(p, a, c, k, e, d) {
}
module.exports = {
baseUrl,
magnetTrackers,
getUrlType,
composeMagnetUrl,