mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-13 23:59:19 +00:00
Compare commits
2 Commits
3e01d94268
...
7a8a75306d
Author | SHA1 | Date | |
---|---|---|---|
7a8a75306d | |||
1cb0d33caf |
@ -13,6 +13,7 @@ import {
|
||||
BILI_RESOLUTION_LIST,
|
||||
COMMON_USER_AGENT,
|
||||
DIVIDING_LINE,
|
||||
douyinTypeMap,
|
||||
DOWNLOAD_WAIT_DETECT_FILE_TIME,
|
||||
REDIS_YUNZAI_ISOVERSEA,
|
||||
} from '../constants/constant.js';
|
||||
@ -28,7 +29,9 @@ import {
|
||||
BILI_STREAM_INFO,
|
||||
DY_LIVE_INFO,
|
||||
DY_LIVE_INFO_2,
|
||||
DY_INFO,
|
||||
BILI_SUMMARY,
|
||||
DY_TOUTIAO_INFO,
|
||||
MIYOUSHE_ARTICLE,
|
||||
} from '../constants/tools.js';
|
||||
import config from '../model/config.js';
|
||||
@ -60,8 +63,6 @@ import { redisExistKey, redisGetKey, redisSetKey } from '../utils/redis-util.js'
|
||||
import { textArrayToMakeForward } from '../utils/yunzai-util.js';
|
||||
import GeneralLinkAdapter from '../utils/general-link-adapter.js';
|
||||
import aBogus from '../utils/a-bogus.cjs';
|
||||
import * as DY_INFO from 'es-toolkit/compat';
|
||||
import * as DY_TOUTIAO_INFO from 'es-toolkit/compat';
|
||||
|
||||
export class RCtools extends plugin {
|
||||
constructor() {
|
||||
@ -372,6 +373,7 @@ export class RCtools extends plugin {
|
||||
dyApi = DY_INFO.replace('{}', douId);
|
||||
}
|
||||
// a-bogus参数
|
||||
logger.debug(dyApi);
|
||||
const abParam = aBogus.generate_a_bogus(
|
||||
new URLSearchParams(new URL(dyApi).search).toString(),
|
||||
headers['User-Agent']
|
||||
|
@ -23,6 +23,23 @@ export const TEN_THOUSAND = 10000;
|
||||
export const COMMON_USER_AGENT =
|
||||
'Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.25 Mobile Safari/537.36';
|
||||
|
||||
/**
|
||||
* 以下为抖音/TikTok类型代码
|
||||
*
|
||||
* @type {{"0": string, "55": string, "2": string, "68": string, "58": string, "4": string, "61": string, "51": string, "150": string}}
|
||||
*/
|
||||
export const douyinTypeMap = {
|
||||
2: 'image',
|
||||
4: 'video',
|
||||
68: 'image',
|
||||
0: 'video',
|
||||
51: 'video',
|
||||
55: 'video',
|
||||
58: 'video',
|
||||
61: 'video',
|
||||
150: 'image',
|
||||
};
|
||||
|
||||
/**
|
||||
* 分割线
|
||||
* @type {string}
|
||||
|
@ -20,6 +20,20 @@ export const BILI_PLAY_STREAM =
|
||||
export const DY_LIVE_INFO =
|
||||
'https://live.douyin.com/webcast/room/web/enter/?device_platform=webapp&aid=6383&channel=channel_pc_web&pc_client_type=1&version_code=190500&version_name=19.5.0&cookie_enabled=true&screen_width=1920&screen_height=1080&browser_language=zh-CN&browser_platform=Win32&browser_name=Firefox&browser_version=124.0&browser_online=true&engine_name=Gecko&engine_version=122.0.0.0&os_name=Windows&os_version=10&cpu_core_num=12&device_memory=8&platform=PC&web_rid={}&room_id_str={}';
|
||||
|
||||
/**
|
||||
* dy API
|
||||
* @type {string}
|
||||
*/
|
||||
export const DY_INFO =
|
||||
'https://www.douyin.com/aweme/v1/web/aweme/detail/?device_platform=webapp&aid=6383&channel=channel_pc_web&aweme_id={}&pc_client_type=1&version_code=190500&version_name=19.5.0&cookie_enabled=true&screen_width=1344&screen_height=756&browser_language=zh-CN&browser_platform=Win32&browser_name=Firefox&browser_version=118.0&browser_online=true&engine_name=Gecko&engine_version=109.0&os_name=Windows&os_version=10&cpu_core_num=16&device_memory=&platform=PC';
|
||||
|
||||
/**
|
||||
* 今日头条 DY API
|
||||
* @type {string}
|
||||
*/
|
||||
export const DY_TOUTIAO_INFO =
|
||||
'https://aweme.snssdk.com/aweme/v1/play/?video_id={}&ratio=1080p&line=0';
|
||||
|
||||
/**
|
||||
* DY 直播信息 二类型
|
||||
* @type {string}
|
||||
|
Loading…
x
Reference in New Issue
Block a user