爱奇艺推荐.js 613 B

123456789101112131415161718192021222324252627282930
  1. js:
  2. let d =[];
  3. // print(input);
  4. // print(HOST);
  5. fetch_params.headers['user-agent'] = PC_UA;
  6. // print(fetch_params);
  7. pdfh = jsp.pdfh;
  8. pdfa = jsp.pdfa;
  9. pd = jsp.pd;
  10. let html = fetch(HOST,fetch_params);
  11. let lists = pdfa(html,'.qy-mod-li');
  12. // print(lists.length);
  13. lists.forEach(function (it){
  14. try {
  15. let title = pdfh(it,'p.sub&&title');
  16. let desc = pdfh(it,'.qy-mod-label&&Text');
  17. let pic_url = pd(it,'img&&src');
  18. d.push({
  19. title:title,
  20. desc:desc,
  21. img:pic_url,
  22. });
  23. }catch(e){
  24. // print(e.message);
  25. }
  26. });
  27. // print(d);
  28. res = setResult(d);
  29. // print(res);