Damonwei

dygang

Nov 2nd, 2022 (edited)
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 7.68 KB | None | 0 0
  1. var rule = {
  2.     title:'电影港[磁]',
  3.     编码:'gb2312',
  4.     搜索编码:'gb2312',
  5.     host:'https://www.dygang.tv',
  6.     homeUrl:'/',
  7.     url: '/fyclass/index_fypage.htm?',
  8.     filter_url:'{{fl.class}}',
  9.     filter:{
  10.     },
  11.     searchUrl: '/e/search/index123.php#tempid=1&tbname=article&keyborad=**&show=title%2Csmalltext&Submit=%CB%D1%CB%F7;post',
  12.     searchable:2,
  13.     quickSearch:0,
  14.     filterable:0,
  15.     headers:{
  16.         'User-Agent': 'MOBILE_UA',
  17.         'Referer': 'https://www.dygang.tv/'
  18.     },
  19.     timeout:5000,
  20.     class_name:'最新电影&经典高清&国配电影&经典港片&国剧&日韩剧&美剧&综艺&动漫&纪录片&高清原盘&4K高清区&3D电影&电影专题',
  21.     class_url:'ys&bd&gy&gp&dsj&dsj1&yx&zy&dmq&jilupian&1080p&4K&3d&dyzt',
  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.     推荐:'div#tl tr:has(>td>table.border1>tbody>tr>td>a>img);table.border1 img&&alt;table.border1 img&&src;table:eq(2)&&Text;a&&href',
  33.     一级:`js:
  34.         pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  35.         let d = [];
  36.         let turl = (MY_PAGE === 1)? '/' : '/index_'+ MY_PAGE + '.htm';
  37.         input = rule.homeUrl + MY_CATE + turl;
  38.         let html = request(input);
  39.         let list = pdfa(html, 'tr:has(>td>table.border1)');
  40.         list.forEach(it => {
  41.             let title = pdfh(it, 'table.border1 img&&alt');
  42.             if (title!==""){
  43.                 d.push({
  44.                     title: title,
  45.                     desc: pdfh(it, 'table:eq(1)&&Text'),
  46.                     pic_url: pd(it, 'table.border1 img&&src', HOST),
  47.                     url: pdfh(it, 'a&&href')
  48.                 });
  49.             }
  50.         })
  51.         setResult(d);
  52.     `,
  53.     二级:{
  54.         title:"div.title a&&Text",
  55.         img:"#dede_content img&&src",
  56.         desc:"#dede_content&&Text",
  57.         content:"#dede_content&&Text",
  58.         tabs:`js:
  59. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  60. TABS=[]
  61. let d = pdfa(html, '#dede_content table tbody tr');
  62. let tabsa = [];
  63. let tabsq = [];
  64. let tabsm = false;
  65. let tabse = false;
  66. let tabm3u8 = [];
  67. d.forEach(function(it) {
  68.     let burl = pd(it, 'a&&href',HOST);
  69.     if (burl.startsWith("https://www.aliyundrive.com/s/")){
  70.         tabsa.push("阿里雲盤");
  71.     }else if (burl.startsWith("https://pan.quark.cn/s/")){
  72.         tabsq.push("夸克網盤");
  73.     }else if (burl.startsWith("magnet")){
  74.         tabsm = true;
  75.     }else if (burl.startsWith("ed2k")){
  76.         tabse = true;
  77.     }
  78. });
  79. if (false){
  80. d = pdfa(html, 'div:has(>div#post_content) div.widget:has(>h3)');
  81. d.forEach(function(it) {
  82.     tabm3u8.push(pdfh(it, 'h3&&Text'));
  83. });
  84. }
  85. if (tabsm === true){
  86.     TABS.push("磁力");
  87. }
  88. if (tabse === true){
  89.     TABS.push("電驢");
  90. }
  91. if (false && tabsa.length + tabsq.length > 1){
  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('dygang 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, '#dede_content table tbody tr');
  115. let lista = [];
  116. let listq = [];
  117. let listm = [];
  118. let liste = [];
  119. let listm3u8 = {};
  120. d.forEach(function(it){
  121.     let burl = pd(it, 'a&&href',HOST);
  122.     let title = pdfh(it, 'a&&Text');
  123.     log('dygang title >>>>>>>>>>>>>>>>>>>>>>>>>>' + title);
  124.     log('dygang burl >>>>>>>>>>>>>>>>>>>>>>>>>>' + burl);
  125.     let loopresult = title + '$' + burl;
  126.     if (burl.startsWith("https://www.aliyundrive.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.     },
  176.     搜索:`js:
  177. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  178. let params = 'tempid=1&tbname=article&keyboard=' + KEY + '&show=title%2Csmalltext&Submit=%CB%D1%CB%F7';
  179. let _fetch_params = JSON.parse(JSON.stringify(rule_fetch_params));
  180. let postData = {
  181.     method: "POST",
  182.     body: params
  183. };
  184. delete(_fetch_params.headers['Content-Type']);
  185. Object.assign(_fetch_params, postData);
  186. log("dygang search postData>>>>>>>>>>>>>>>" + JSON.stringify(_fetch_params));
  187. let search_html = request( HOST + '/e/search/index123.php', _fetch_params, true);
  188. //log("dygang search result>>>>>>>>>>>>>>>" + search_html);
  189. let d=[];
  190. let dlist = pdfa(search_html, 'table.border1');
  191. dlist.forEach(function(it){
  192.     let title = pdfh(it, 'img&&alt');
  193.     if (searchObj.quick === true){
  194.         if (false && title.includes(KEY)){
  195.             title = KEY;
  196.         }
  197.     }
  198.     let img = pd(it, 'img&&src', HOST);
  199.     let content = pdfh(it, 'img&&alt');
  200.     let desc = pdfh(it, 'img&&alt');
  201.     let url = pd(it, 'a&&href', HOST);
  202.     d.push({
  203.         title:title,
  204.         img:img,
  205.         content:content,
  206.         desc:desc,
  207.         url:url
  208.         })
  209. });
  210. setResult(d);
  211. `,
  212. }
  213. /*
  214. {
  215. "author":"Dwei-0819",
  216. "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.42",
  217. "homeUrl": "https://www.jiyingw.vip",
  218. "cateManual": {"电视剧":"tv","电影": "movie","动漫": "cartoon","综艺": "movie/variety"},
  219. "cateUrl": "https://www.jiyingw.vip/{cateId}/page/2",
  220. "cateVodNode": "//ul[@id='post_container']/li",
  221. "cateVodName": "/div/a/@title",
  222. "cateVodId": "/div/a/@href",
  223. "cateVodImg": "/div/a/img/@src",
  224. "cateVodImgR": "",
  225. "cateVodMark": "",
  226. "dtUrl": "{vid}",
  227. "dtNode": "//body",
  228. "dtName": "[substring-before(//h1/text(),'迅雷下载')]",
  229. "dtImg": "//div[@id='post_content']/p/img/@src",
  230. "dtImgR": "",
  231. "dtCate": "concat(//span[contains(text(),'类型')]/following-sibling::*[1]//text(),//div[@id='post_content']/p[contains(.//text(),'导演')]/a/text())",
  232. "dtCateR": "",
  233. "dtYear": "",
  234. "dtYearR": "",
  235. "dtArea": "//span[contains(text(),'地区')]/following-sibling::*[1]//text()",
  236. "dtAreaR": "",
  237. "dtMark": "",
  238. "dtMarkR": "",
  239. "dtActor": "concat(//span[contains(text(),'主演')]/following-sibling::*[1]//text(),//div[@id='post_content']/p[contains(.//text(),'导演')]/text()[3])",
  240. "dtActorR": "",
  241. "dtDirector": "concat(//span[contains(text(),'导演')]/following-sibling::*[1]//text(),//div[@id='post_content']/p[contains(.//text(),'导演')]/text()[1])",
  242. "dtDirectorR": "",
  243. "dtDesc": "concat(//div[contains(@class,'movie-introduce')]/p/text(),//div[@class='indent']/span/text())",
  244. "dtDescR": "",
  245. "dtFromNode": "//div[@id='post_content']",
  246. "dtFromName": "'DweiTV'",
  247. "dtFromNameR": "",
  248. "dtUrlNode": "//div[@id='post_content']",
  249. "dtUrlSubNode": "//p[contains(.//@href,'magnet:')]//a[contains(@href, 'magnet') and not(contains(@class, 'torrent'))]",
  250. "dtUrlId": "/@href",
  251. "dtUrlIdR": "",
  252. "dtUrlName": "//text()[1]",
  253. "dtUrlNameR": "",
  254. "playUrl": "{playUrl}",
  255. "searchUrl": "https://www.jiyingw.net/?s={wd}",
  256. "scVodNode": "//ul[@id = 'post_container']/li",
  257. "scVodName": "/div[1]/a/@title",
  258. "scVodId": "/div[1]/a/@href",
  259. "scVodIdR": "",
  260. "scVodImg": "/div[1]/a/img/@src",
  261. "scVodMark": ""
  262. }
  263. */
Add Comment
Please, Sign In to add comment