提交 03476de9 编写于 作者: H hjdhnx

完成九酷一级

上级 8f3bf15a
var rule = {
title: '九酷',
host: 'https://jiuku.site',
class_name:'电影&电视剧&综艺&动漫',
class_url:'1&2&3&4',
homeUrl: '',
searchUrl: '',
searchable: 1,
quickSearch: 1,
filterable: 1,
headers:{'User-Agent':'MOBILE_UA','Cookie':'ecPopup=1'},
headers:{'User-Agent':'MOBILE_UA'},
// 分类链接fypage参数支持1个()表达式
url: '/index.php/api/vod#type=fyclass&page=fypage&time=1670922043&key=8b217b963c185115ad035883ef449788',
一级:''
url: '/index.php/api/vod#type=fyclass&page=fypage',
detailUrl:'/index.php/vod/detail/id/fyid.html',
推荐:'',
一级:'',
一级:'js:let body=input.split("#")[1];let t=Math.round(new Date/1e3).toString();let key=md5("DS"+t+"DCC147D11943AF75");let url=input.split("#")[0];body=body+"&time="+t+"&key="+key;print(body);fetch_params.body=body;let html=post(url,fetch_params);let data=JSON.parse(html);VODS=data.list;',
二级:'',
搜索:'',
}
\ No newline at end of file
......@@ -13,13 +13,13 @@ def md5(str):
return hashlib.md5(str.encode(encoding='UTF-8')).hexdigest()
headers = {
'x-requested-with':'XMLHttpRequest',
# 'x-requested-with':'XMLHttpRequest',
'user-agent':'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1',
'Cookie':'ecPopup=1;crisp-client%2Fsession%2Fba128124-8ac1-44d1-8420-98420b4da478=session_8d89f90c-4b46-4895-86d8-03a74770b741'
# 'Cookie':'ecPopup=1;crisp-client%2Fsession%2Fba128124-8ac1-44d1-8420-98420b4da478=session_8d89f90c-4b46-4895-86d8-03a74770b741'
}
s = requests.session()
s.get('https://jiuku.site/index.php/vod/type/id/1.html')
print(s.cookies)
# s = requests.session()
# s.get('https://jiuku.site/index.php/vod/type/id/1.html')
# print(s.cookies)
fyclass = 1
fypage = 1
......@@ -27,13 +27,14 @@ tm = int(time.time())
# tm = ''
print(tm)
key = md5("DS"+str(tm)+"DCC147D11943AF75")
print(key)
data = f'type={fyclass}&page={fypage}&time={tm}&key={key}'
data_dict = {}
for dt in data.split('&'):
data_dict[dt.split('=')[0]] = dt.split('=')[1]
print(data_dict)
data_dict = ujson.dumps(data_dict)
r = s.post('https://jiuku.site/index.php/api/vod',data=data_dict,headers=headers)
# data_dict = ujson.dumps(data_dict)
r = requests.post('https://jiuku.site/index.php/api/vod',data=data_dict,headers=headers)
print(r.text)
"""
......
js:
let body = input.split('#')[1];
let t = Math.round(new Date() / 1000).toString();
let key = md5("DS"+t+"DCC147D11943AF75");
let url = input.split('#')[0];
body=body+'&time='+t+'&key='+key;
print(body);
fetch_params.body = body;
fetch_params.headers['x-requested-with'] = 'XMLHttpRequest';
// fetch_params.headers['cookie'] = 'PHPSESSID=e7ht5hvema4sg0o8l1o5k0bqt1; Hm_lvt_eebb854b7348edadfb6b433786f5d059=1666239708; Hm_lpvt_eebb854b7348edadfb6b433786f5d059=1666244071';
let url = input.split('?')[0];
let html = post(url,fetch_params);
print(html);
let data = JSON.parse(html);
\ No newline at end of file
// print(html);
let data = JSON.parse(html);
VODS = data.list;
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册