低端选集.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. js:
  2. log(TABS);
  3. let d=[];
  4. pdfh = jsp.pdfh;
  5. pdfa = jsp.pdfa;
  6. if(typeof(play_url)==='undefined'){
  7. var play_url = '';
  8. }
  9. // play_url = play_url.replace('&play_url=','&type=json&play_url=');
  10. function getLists(html){
  11. let src=pdfh(html,'.wp-playlist-script&&Html');
  12. src=JSON.parse(src).tracks;
  13. let list1=[];
  14. let list2=[];
  15. src.forEach(function(it){
  16. let src0=it.src0;
  17. let src1=it.src1;
  18. let src2=it.src2;
  19. let title=it.caption;
  20. let url1 = "https://ddys.tv/getvddr/video?id=" + src1+"&dim=1080P+&type=mix";
  21. let url2="https://w.ddys.tv" + src0 + "?ddrkey=" + src2;
  22. let zm = "https://ddys.tv/subddr/" + it.subsrc;
  23. list1.push({
  24. title:title,
  25. url:url1,
  26. desc:zm,
  27. });
  28. list2.push({
  29. title:title,
  30. url:url2,
  31. desc:zm,
  32. });
  33. });
  34. return {
  35. list1:list1,
  36. list2:list2
  37. }
  38. }
  39. var data=getLists(html);
  40. var list1=data.list1;
  41. var list2=data.list2;
  42. let nums=pdfa(html,'body&&.post-page-numbers');
  43. nums.forEach(function(it){
  44. let num=pdfh(it,'body&&Text');
  45. log(num);
  46. let nurl=input+num+'/';
  47. if(num==1){
  48. return
  49. }
  50. log(nurl);
  51. let html=request(nurl);
  52. let data=getLists(html);
  53. list1=list1.concat(data.list1);
  54. list2=list2.concat(data.list2);
  55. });
  56. list1 = list1.map(function (item){return item.title+'$'+play_url+urlencode(item.url+'|'+input+'|'+item.desc)});
  57. list2 = list2.map(function (item){return item.title+'$'+play_url+urlencode(item.url+'|'+input+'|'+item.desc)});
  58. LISTS=[list1, list2]