奇优搜索.js 517 B

123456789101112131415161718192021
  1. js:
  2. // log(input);
  3. let url=input.split(";")[0];
  4. let d = [];
  5. let body={searchword:input.split(";")[1]};
  6. fetch_params.body=body;
  7. let html = post(url,fetch_params);
  8. // print(html);\
  9. let pdfa = jsp.pdfa;
  10. let pdfh = jsp.pdfh;
  11. let pd = jsp.pd;
  12. let lists = pdfa(html,'ul.stui-vodlist__media&&li');
  13. lists.forEach(function (it){
  14. d.push({
  15. title:pdfh(it,'.title&&Text'),
  16. url:pd(it,'a&&href'),
  17. desc:pdfh(html,'.pic-text&&Text'),
  18. pic_url:pd(html,'.lazyload&&data-original'),
  19. });
  20. });
  21. setResult(d);