爱奇艺.cjs 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. // http://localhost:5757/parse/爱奇艺?url=https://www.iqiyi.com/v_ir1vbyxi4w.html
  2. async function lazy(input, params) {
  3. const url = 'http://api.zn0534.com/';
  4. const tidData = {
  5. tid: input, // 替换为实际的链接地址
  6. name: 'name',
  7. layer: 1,
  8. id: 0,
  9. page: 1,
  10. window: 'yssj',
  11. site: 252,
  12. tids: ''
  13. };
  14. const userAccount = {
  15. status: 1,
  16. msg: 'lanmei',
  17. user: {cookie_status: -1},
  18. data: {
  19. layer: 0,
  20. site: 51,
  21. site2: 0,
  22. site3: 0,
  23. page: 1,
  24. selected: 0,
  25. keyword: null,
  26. post_typeid1: null,
  27. post_typeid2: null,
  28. post_typeid3: null,
  29. post_typeid4: null,
  30. keyword1: null,
  31. keyword2: null,
  32. max_page: 1
  33. },
  34. key2: 'value=42bc9f4c7652f2ecaip1',
  35. group: 'dlzc_51',
  36. site: 51,
  37. md5: 'd0358525e24346374d424a92e0ddeb58',
  38. time: Math.floor(Date.now() / 1000),
  39. username: 'lanmei',
  40. uid: '4672'
  41. };
  42. // 请求主体数据
  43. const postData = {
  44. interaction: 1,
  45. tid: JSON.stringify(tidData),
  46. value: 95,
  47. window: 'yssj',
  48. site: 252,
  49. title: '',
  50. selected: 1,
  51. class: 'jx',
  52. user_account: JSON.stringify(userAccount),
  53. application: 'zhrs',
  54. device: 'android',
  55. width: 1440,
  56. high: 3200,
  57. version: '1.067',
  58. x1: null,
  59. x2: '33cd492810e5fb22',
  60. x3: 15,
  61. x4: 35,
  62. vip_number3448368693: ''
  63. };
  64. try {
  65. const response = await axios.post(url, postData, {
  66. headers: {
  67. 'Content-Type': 'application/json'
  68. }
  69. });
  70. const {data} = response;
  71. console.log(data);
  72. if (data && data.tid) {
  73. console.log('播放链接:', data.tid);
  74. return data.tid;
  75. } else {
  76. console.error('未找到播放链接');
  77. return input;
  78. }
  79. } catch (error) {
  80. console.error('请求失败:', error.message);
  81. return input;
  82. }
  83. }
  84. module.exports = lazy;