九酷.py 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. # File : 九酷.py
  4. # Author: DaShenHan&道长-----先苦后甜,任凭晚风拂柳颜------
  5. # Date : 2022/12/14
  6. import hashlib
  7. import requests
  8. import time
  9. import ujson
  10. def md5(str):
  11. return hashlib.md5(str.encode(encoding='UTF-8')).hexdigest()
  12. headers = {
  13. # 'x-requested-with':'XMLHttpRequest',
  14. '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',
  15. # 'Cookie':'ecPopup=1;crisp-client%2Fsession%2Fba128124-8ac1-44d1-8420-98420b4da478=session_8d89f90c-4b46-4895-86d8-03a74770b741'
  16. }
  17. # s = requests.session()
  18. # s.get('https://jiuku.site/index.php/vod/type/id/1.html')
  19. # print(s.cookies)
  20. fyclass = 1
  21. fypage = 1
  22. tm = int(time.time())
  23. # tm = ''
  24. print(tm)
  25. key = md5("DS"+str(tm)+"DCC147D11943AF75")
  26. print(key)
  27. data = f'type={fyclass}&page={fypage}&time={tm}&key={key}'
  28. data_dict = {}
  29. for dt in data.split('&'):
  30. data_dict[dt.split('=')[0]] = dt.split('=')[1]
  31. print(data_dict)
  32. # data_dict = ujson.dumps(data_dict)
  33. r = requests.post('https://jiuku.site/index.php/api/vod',data=data_dict,headers=headers)
  34. print(r.text)
  35. """
  36. 解析免嗅:
  37. "https://jiuku.site/addons/dp/player/dp.php?key=0&from=&id="+vod_id+"&api=&url="+"vipUrl
  38. 专线m3u8:
  39. unescape(base64Decode(jsurl))
  40. """