-
Notifications
You must be signed in to change notification settings - Fork 159
/
Copy path爱奇艺.cjs
91 lines (85 loc) · 2.21 KB
/
爱奇艺.cjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
// http://localhost:5757/parse/爱奇艺?url=https://www.iqiyi.com/v_ir1vbyxi4w.html
const axios = require('axios');
async function lazy(input, params) {
const url = 'http://api.zn0534.com/';
const tidData = {
tid: input, // 替换为实际的链接地址
name: 'name',
layer: 1,
id: 0,
page: 1,
window: 'yssj',
site: 252,
tids: ''
};
const userAccount = {
status: 1,
msg: 'lanmei',
user: {cookie_status: -1},
data: {
layer: 0,
site: 51,
site2: 0,
site3: 0,
page: 1,
selected: 0,
keyword: null,
post_typeid1: null,
post_typeid2: null,
post_typeid3: null,
post_typeid4: null,
keyword1: null,
keyword2: null,
max_page: 1
},
key2: 'value=42bc9f4c7652f2ecaip1',
group: 'dlzc_51',
site: 51,
md5: 'd0358525e24346374d424a92e0ddeb58',
time: Math.floor(Date.now() / 1000),
username: 'lanmei',
uid: '4672'
};
// 请求主体数据
const postData = {
interaction: 1,
tid: JSON.stringify(tidData),
value: 95,
window: 'yssj',
site: 252,
title: '',
selected: 1,
class: 'jx',
user_account: JSON.stringify(userAccount),
application: 'zhrs',
device: 'android',
width: 1440,
high: 3200,
version: '1.067',
x1: null,
x2: '33cd492810e5fb22',
x3: 15,
x4: 35,
vip_number3448368693: ''
};
try {
const response = await axios.post(url, postData, {
headers: {
'Content-Type': 'application/json'
}
});
const {data} = response;
console.log(data);
if (data && data.tid) {
console.log('播放链接:', data.tid);
return data.tid;
} else {
console.error('未找到播放链接');
return input;
}
} catch (error) {
console.error('请求失败:', error.message);
return input;
}
}
module.exports = lazy;