360吧.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. globalThis.getVideos = function(link, key) {
  2. let html = request(link);
  3. let json = JSON.parse(html);
  4. let data = json.data;
  5. data = data[key];
  6. let videos = data.map((n) => {
  7. let id = n.url;
  8. let name = n.league_name_zh + ' ' + n.home_team_zh + ' VS ' + n.away_team_zh;
  9. let pic = n.cover;
  10. let remarks = n.nickname;
  11. return {
  12. vod_id: id,
  13. vod_name: name,
  14. vod_pic: pic,
  15. vod_remarks: remarks,
  16. };
  17. });
  18. return videos
  19. }
  20. var rule = {
  21. 类型: '影视', //影视|听书|漫画|小说
  22. title: '360吧[球]',
  23. host: 'https://m.360ba.co/',
  24. homeUrl: '/api/web/h5_index',
  25. url: '/api/web/live_lists/fyclass',
  26. searchUrl: '/api/web/search?keyword=**',
  27. searchable: 2,
  28. quickSearch: 0,
  29. filterable: 0,
  30. headers: {
  31. 'User-Agent': 'MOBILE_UA',
  32. },
  33. timeout: 5000,
  34. class_name: '全部&足球&篮球&综合',
  35. class_url: '1&2&3&99',
  36. play_parse: true,
  37. pagecount: {
  38. "1": 1,
  39. "2": 1,
  40. "3": 1,
  41. "99": 1,
  42. },
  43. lazy: $js.toString(() => {
  44. input = {
  45. parse: 0,
  46. url: input,
  47. header: rule.headers
  48. };
  49. }),
  50. 预处理: $js.toString(() => {
  51. Object.assign(rule.headers, {
  52. 'Referer': rule.host,
  53. 'Origin': rule.host,
  54. });
  55. }),
  56. 推荐: $js.toString(() => {
  57. VODS = getVideos(input, 'hot_matches');
  58. }),
  59. 一级: $js.toString(() => {
  60. VODS = [];
  61. if (MY_PAGE <= 1) {
  62. VODS = getVideos(input, 'data');
  63. }
  64. }),
  65. 二级: '*',
  66. 搜索: $js.toString(() => {
  67. VODS = [];
  68. if (MY_PAGE <= 1) {
  69. VODS = getVideos(input, 'ball');
  70. }
  71. }),
  72. }