搜索一级.js 703 B

1234567891011121314151617
  1. js:
  2. let d = [];
  3. let html = request(input);
  4. html = JSON.parse(html);
  5. let list = html.listData.results;
  6. list.forEach(function (it){
  7. let desc1 = it.ipad_play_for_list.finish_episode?it.ipad_play_for_list.episode===it.ipad_play_for_list.finish_episode?"全集"+it.ipad_play_for_list.finish_episode:"连载"+it.ipad_play_for_list.episode+"/"+it.ipad_play_for_list.finish_episode:"";
  8. let desc2 = it.score?'评分:'+it.score:'';
  9. let desc3 = it.date?'更至:'+it.date:'';
  10. d.push({
  11. title: it.name,
  12. img: it.v_picurl,
  13. url: "https://v.sogou.com" + it.url.replace('teleplay', 'series').replace('cartoon', 'series'),
  14. desc: desc1||desc2||desc3,
  15. });
  16. });
  17. setResult(d);