酷云免嗅.js 1.3 KB

123456789101112131415161718192021222324252627282930
  1. js:
  2. function GetPlayUrl(playUrl) {
  3. let realPlay = {parse:0,url:playUrl};
  4. if (/mgtv|sohu/.test(playUrl)) {
  5. realPlay.headers = {'User-Agent':'Mozilla/5.0'};
  6. } else if (/bili/.test(playUrl)) {
  7. realPlay.headers ={'User-Agent':'Mozilla/5.0','Referer':'https://www.bilibili.com'};
  8. } else if (/ixigua/.test(playUrl)) {
  9. realPlay.headers = {'User-Agent':'Mozilla/5.0','Referer':'https://www.ixigua.com'};
  10. }
  11. return realPlay
  12. }
  13. if (/\.m3u8|\.mp4/.test(input)) {
  14. input={parse:0,url:input};
  15. } else {
  16. try {
  17. let jxUrl = 'http://api.kunyu77.com/api.php/provide/parserUrl?url=';
  18. var t = Math.floor(new Date().getTime() /1000).toString();
  19. let jxExt = "&retryNum=0&pcode=010110002&version=2.1&devid=f9c9ce5bb5827a266829383718e6131a&package=com.sevenVideo.app.android&sys=android&sysver=12&brand=Xiaomi&model=Mi_10_Pro&sj="+t;
  20. let url = jxUrl+input+jxExt;
  21. let TK = "/api.php/provide/parserUrl"+"Xiaomif9c9ce5bb5827a266829383718e6131aMi_10_Procom.sevenVideo.app.android010110002"+0+t+"android12"+ encodeURIComponent(vipUrl) + "2.1"+t+"XSpeUFjJ";
  22. let html = request(url,{headers:{Referer:jxUrl,'User-Agent':'okhttp/3.12.0','TK':md5(TK)}});
  23. let urll = JSON.parse(html).data.url;
  24. let playhtml = request(urll);
  25. let playurl = JSON.parse(playhtml).url;
  26. input = GetPlayUrl(playurl);
  27. }catch (e) {
  28. input = {parse:1,jx:1,url:input};
  29. }
  30. }