4kav.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. rule = {
  2. host: 'https://4k-av.com',
  3. homeVod: '#recommlist li;.title&&Text;.title a&&href;img&&src;span&&Text',
  4. class_name: '电视剧&电影',
  5. class_url: 'tv&movie',
  6. headers: {
  7. 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1',
  8. },
  9. homeVod: '#recommlist li;.title&&Text;.title a&&href;img&&src;span&&Text',
  10. categoryVodJS: `
  11. let url = HOST + '/'+classId+'/';
  12. if (page > 1 && page <= pagecount) url = url + 'page-' + (pagecount-page+1) + '.html';
  13. request(url);|||
  14. const $ = load(html);
  15. pagecount = $('span.page-number').first().text().split('/')[1];
  16. videos = _.map($('.NTMitem'), item => {
  17. return {
  18. vod_id: $('a', item).attr('href'),
  19. vod_name: $('a', item).attr('title'),
  20. vod_pic: $('img', item).attr('src'),
  21. vod_remarks: $('.resyear label', item).first().text(),
  22. vod_year: $('.resyear label', item).last().text(),
  23. }
  24. });
  25. `,
  26. detailVodJS: `
  27. request(HOST + input);|||
  28. var $ = load(html);
  29. var vod = {
  30. vod_year: $('.videodetail a').text(),
  31. type_name: $('.tags a').text(),
  32. vod_content: $('.cnline').text(),
  33. vod_play_from: 'leospring',
  34. }
  35. if ($('li .screenshot').length > 0) {
  36. vod.vod_play_url = _.map($('li .screenshot'), item => {
  37. let url = input;
  38. if($(item).find('a').attr('href') != undefined) url = $(item).find('a').attr('href');
  39. return $(item).find('span').text() + '$' + url;
  40. }).join('#');
  41. } else {
  42. vod.vod_play_url = 'leospring开发$'+input;
  43. }
  44. videos.push(vod);
  45. `,
  46. lazy: `
  47. request(HOST + input);|||
  48. const $ = load(html);
  49. playUrl = $('source').attr('src');
  50. `,
  51. searchUrl: '/s?q=**',
  52. searchVod: '.NTMitem;.title a&&title;.title a&&href;img&&src;.resyear label:eq(0)&&Text',
  53. }