From 03476de9eb8e05b819d06ab628b8ba82fb0ebc0d Mon Sep 17 00:00:00 2001 From: hjdhnx Date: Wed, 14 Dec 2022 17:25:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E4=B9=9D=E9=85=B7=E4=B8=80?= =?UTF-8?q?=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "js/\344\271\235\351\205\267.js" | 13 ++++++++++--- "py/\344\271\235\351\205\267.py" | 15 ++++++++------- ...71\235\351\205\267\344\270\200\347\272\247.js" | 12 +++++++----- 3 files changed, 25 insertions(+), 15 deletions(-) diff --git "a/js/\344\271\235\351\205\267.js" "b/js/\344\271\235\351\205\267.js" index c77ff21..dad7bae 100644 --- "a/js/\344\271\235\351\205\267.js" +++ "b/js/\344\271\235\351\205\267.js" @@ -1,13 +1,20 @@ 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 diff --git "a/py/\344\271\235\351\205\267.py" "b/py/\344\271\235\351\205\267.py" index 44a3880..bccb11f 100644 --- "a/py/\344\271\235\351\205\267.py" +++ "b/py/\344\271\235\351\205\267.py" @@ -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) """ diff --git "a/py/\344\271\235\351\205\267\344\270\200\347\272\247.js" "b/py/\344\271\235\351\205\267\344\270\200\347\272\247.js" index c1e59df..d75c7ef 100644 --- "a/py/\344\271\235\351\205\267\344\270\200\347\272\247.js" +++ "b/py/\344\271\235\351\205\267\344\270\200\347\272\247.js" @@ -1,10 +1,12 @@ 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 -- GitLab