97tvs.js 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. var rule = {
  2. title:'高清MP4吧',
  3. host:'https://www.97tvs.com',
  4. homeUrl: '/',
  5. url: '/fyclass/page/fypage?',
  6. filter_url:'{{fl.class}}',
  7. filter:{
  8. },
  9. searchUrl: '/?s=**',
  10. searchable:2,
  11. quickSearch:0,
  12. filterable:0,
  13. headers:{
  14. 'User-Agent': 'PC_UA',
  15. 'Cookie':'',
  16. 'Referer': 'http://www.97tvs.com/'
  17. },
  18. 图片来源:'@Headers={"Accept":"*/*","Referer":"https://www.97tvs.com/","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36"}',
  19. timeout:5000,
  20. class_name: "动作片&科幻片&爱情片&喜剧片&剧情片&惊悚片&战争片&灾难片&罪案片&动画片&综艺&电视剧",
  21. class_url: "action&science&love&comedy&story&thriller&war&disaster&crime&cartoon&variety&sitcoms",
  22. play_parse:true,
  23. play_json:[{
  24. re:'*',
  25. json:{
  26. parse:0,
  27. jx:0
  28. }
  29. }],
  30. lazy:'',
  31. limit:6,
  32. 推荐:`js:
  33. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  34. let d = [];
  35. let html = request(input);
  36. let list = pdfa(html, 'div.mainleft ul#post_container li');
  37. list.forEach(it => {
  38. d.push({
  39. title: pdfh(it, 'div.thumbnail img&&alt'),
  40. desc: pdfh(it, 'div.info&&span.info_date&&Text') + ' / ' + pdfh(it, 'div.info&&span.info_category&&Text'),
  41. pic_url: pd(it, 'div.thumbnail img&&src', HOST),
  42. url: pd(it, 'div.thumbnail&&a&&href',HOST)
  43. });
  44. });
  45. setResult(d);
  46. `,
  47. 一级:`js:
  48. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  49. let d = [];
  50. let html = request(input);
  51. let list = pdfa(html, 'div.mainleft ul#post_container li');
  52. list.forEach(it => {
  53. d.push({
  54. title: pdfh(it, 'div.thumbnail img&&alt'),
  55. desc: pdfh(it, 'div.info&&span.info_date&&Text') + ' / ' + pdfh(it, 'div.info&&span.info_category&&Text'),
  56. pic_url: pd(it, 'div.thumbnail img&&src', HOST),
  57. url: pd(it, 'div.thumbnail&&a&&href',HOST)
  58. });
  59. })
  60. setResult(d);
  61. `,
  62. 二级:{
  63. title:"div.article_container h1&&Text",
  64. img:"div#post_content img&&src",
  65. desc:"div#post_content&&Text",
  66. content:"div#post_content&&Text",
  67. tabs:`js:
  68. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  69. TABS=[]
  70. let d = pdfa(html, 'div#post_content p');
  71. let tabsa = [];
  72. let tabsq = [];
  73. let tabsm = false;
  74. let tabse = false;
  75. let tabm3u8 = [];
  76. d.forEach(function(it) {
  77. let burl = pdfh(it, 'a&&href');
  78. if (burl.startsWith("https://www.aliyundrive.com/s/") || burl.startsWith("https://www.alipan.com/s/")){
  79. tabsa.push("阿里雲盤");
  80. }else if (burl.startsWith("https://pan.quark.cn/s/")){
  81. tabsq.push("夸克網盤");
  82. }else if (burl.startsWith("magnet")){
  83. tabsm = true;
  84. }else if (burl.startsWith("ed2k")){
  85. tabse = true;
  86. }
  87. });
  88. if (tabsm === true){
  89. TABS.push("磁力");
  90. }
  91. if (tabse === true){
  92. TABS.push("電驢");
  93. }
  94. let tmpIndex;
  95. tmpIndex=1;
  96. tabsa.forEach(function(it){
  97. TABS.push(it + tmpIndex);
  98. tmpIndex = tmpIndex + 1;
  99. });
  100. tmpIndex=1;
  101. tabsq.forEach(function(it){
  102. TABS.push(it + tmpIndex);
  103. tmpIndex = tmpIndex + 1;
  104. });
  105. tabm3u8.forEach(function(it){
  106. TABS.push(it);
  107. });
  108. log('97tvs TABS >>>>>>>>>>>>>>>>>>' + TABS);
  109. `,
  110. lists:`js:
  111. log(TABS);
  112. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  113. LISTS = [];
  114. let d = pdfa(html, 'div#post_content p');
  115. let lista = [];
  116. let listq = [];
  117. let listm = [];
  118. let liste = [];
  119. let listm3u8 = {};
  120. d.forEach(function(it){
  121. let burl = pdfh(it, 'a&&href');
  122. let title = pdfh(it, 'a&&Text');
  123. log('97tvs title >>>>>>>>>>>>>>>>>>>>>>>>>>' + title);
  124. log('97tvs burl >>>>>>>>>>>>>>>>>>>>>>>>>>' + burl);
  125. let loopresult = title + '$' + burl;
  126. if (burl.startsWith("https://www.aliyundrive.com/s/") || burl.startsWith("https://www.alipan.com/s/")){
  127. if (true){
  128. if (TABS.length==1){
  129. burl = "http://127.0.0.1:9978/proxy?do=ali&type=push&confirm=0&url=" + encodeURIComponent(burl);
  130. }else{
  131. burl = "http://127.0.0.1:9978/proxy?do=ali&type=push&url=" + encodeURIComponent(burl);
  132. }
  133. }else{
  134. burl = "push://" + burl;
  135. }
  136. loopresult = title + '$' + burl;
  137. lista.push(loopresult);
  138. }else if (burl.startsWith("https://pan.quark.cn/s/")){
  139. if (true){
  140. if (TABS.length==1){
  141. burl = "http://127.0.0.1:9978/proxy?do=quark&type=push&confirm=0&url=" + encodeURIComponent(burl);
  142. }else{
  143. burl = "http://127.0.0.1:9978/proxy?do=quark&type=push&url=" + encodeURIComponent(burl);
  144. }
  145. }else{
  146. burl = "push://" + burl;
  147. }
  148. loopresult = title + '$' + burl;
  149. listq.push(loopresult);
  150. }else if (burl.startsWith("magnet")){
  151. listm.push(loopresult);
  152. }else if (burl.startsWith("ed2k")){
  153. liste.push(loopresult);
  154. }
  155. });
  156. if (listm.length>0){
  157. LISTS.push(listm);
  158. }
  159. if (liste.length>0){
  160. LISTS.push(liste);
  161. }
  162. lista.forEach(function(it){
  163. LISTS.push([it]);
  164. });
  165. listq.forEach(function(it){
  166. LISTS.push([it]);
  167. });
  168. for ( const key in listm3u8 ){
  169. if (listm3u8.hasOwnProperty(key)){
  170. LISTS.push(listm3u8[key]);
  171. }
  172. };
  173. `,
  174. },
  175. 搜索:`js:
  176. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  177. let search_html = request(input)
  178. //log("97tvs search result>>>>>>>>>>>>>>>" + search_html);
  179. let d=[];
  180. let dlist = pdfa(search_html, 'div.mainleft ul#post_container li');
  181. dlist.forEach(function(it){
  182. let title = pdfh(it, 'div.thumbnail img&&alt').replace( /(<([^>]+)>)/ig, '');
  183. if (title.includes(KEY)){
  184. if (searchObj.quick === true){
  185. title = KEY;
  186. }
  187. let img = pd(it, 'div.thumbnail img&&src', HOST);
  188. let content = pdfh(it, 'div.article div.entry_post&&Text');
  189. let desc = pdfh(it, 'div.info&&span.info_date&&Text');
  190. let url = pd(it, 'div.thumbnail&&a&&href', HOST);
  191. d.push({
  192. title:title,
  193. img:img,
  194. content:content,
  195. desc:desc,
  196. url:url
  197. });
  198. }
  199. });
  200. setResult(d);
  201. `,
  202. }