爱奇艺一级.js 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. js:
  2. let d = []; // 一级固定返回VODS变量,内置变量有 MY_CATE,detailUrl,setResult用法跟海阔相同
  3. if(MY_CATE==='16'){//网络电影
  4. input = input.replace("channel_id=16", "channel_id=1").split("three_category_id")[0];
  5. input+= "three_category_id=27401";
  6. // input+= "three_category_id=27401;must,地区;must,类型;must,规格;must";
  7. }else if(MY_CATE==='5'){//音乐
  8. input = input.replace("data_type=1", "data_type=2");
  9. }
  10. // let html = fetch(input,fetch_params);
  11. let html = request(input);
  12. let json = JSON.parse(html);
  13. if (json.code === "A00003") {
  14. fetch_params.headers['user-agent'] = PC_UA;
  15. // print(fetch_params);
  16. json = JSON.parse(fetch(input,fetch_params));
  17. }
  18. // print(json);
  19. json.data.list.forEach(function (data){
  20. if (data.channelId === 1) {
  21. desc = (data.hasOwnProperty("score") ? data.score + "分\t" : '');
  22. } else if (data.channelId === 2 || data.channelId === 4) {
  23. if (data.latestOrder === data.videoCount) {
  24. desc = (data.hasOwnProperty("score") ? data.score + "分\t" : '') + data.latestOrder + "集全";
  25. } else {
  26. if (data.videoCount) {
  27. desc = (data.hasOwnProperty("score") ? data.score + "分\t" : '') + data.latestOrder + "/" + data.videoCount + "集";
  28. } else {
  29. desc = "更新至 " + data.latestOrder + "集"
  30. }
  31. }
  32. } else if (data.channelId === 6) {
  33. desc = data.period + "期";
  34. } else if (data.channelId === 5) {
  35. desc = data.focus;
  36. } else {
  37. if (data.latestOrder) {
  38. desc = "更新至 第" + data.latestOrder + "期";
  39. } else if (data.period) {
  40. desc = data.period;
  41. } else {
  42. desc = data.focus;
  43. }
  44. }
  45. // url = "https://pcw-api.iqiyi.com/video/video/videoinfowithuser/" + data.albumId + "?agent_type=1&authcookie=&subkey=" + data.albumId + "&subscribe=1";
  46. url = MY_CATE +'$'+data.albumId;
  47. // d.push({
  48. // vod_id:url,
  49. // vod_name: data.name,
  50. // vod_remarks: desc,
  51. // vod_pic: data.imageUrl.replace('.jpg', '_390_520.jpg?caplist=jpg,webp'),
  52. // });
  53. d.push({
  54. url:url,
  55. title: data.name,
  56. desc: desc,
  57. pic_url: data.imageUrl.replace('.jpg', '_390_520.jpg?caplist=jpg,webp'),
  58. });
  59. });
  60. // VODS = d;
  61. setResult(d);