44 filterable: 1,
55 quickSearch: 0,
66 title: '360影视[官]',
7- lang: 'dr2'
7+ '类型': '影视',
8+ lang: 'ds'
89})
910*/
1011
@@ -29,18 +30,17 @@ var rule = {
2930 multi : 1 ,
3031 searchable : 2 ,
3132 play_parse : true ,
32- lazy : 'js:input=input.split("?")[0];log(input);' ,
33- // 疑似t4专用的
34- // lazy:'js:input={parse: 1, playUrl: "", jx: 1, url: input.split("?")[0]}',
35- // 手动调用解析请求json的url,此lazy不方便
36- // lazy:'js:input="https://cache.json.icu/home/api?type=ys&uid=292796&key=fnoryABDEFJNPQV269&url="+input.split("?")[0];log(input);let html=JSON.parse(request(input));log(html);input=html.url||input',
33+ lazy : async function ( ) {
34+ let { input} = this ;
35+ return input . split ( "?" ) [ 0 ] ;
36+ } ,
3737 推荐 : 'json:data;title;cover;comment;cat+ent_id;description' ,
3838 一级 : 'json:data.movies;title;cover;pubdate;id;description' ,
39- 二级 : '' ,
40- 二级 : $js . toString ( ( ) => {
41- let html = JSON . parse ( fetch ( input , fetch_params ) ) ;
39+ 二级 : async function ( ) {
40+ let { input , fetch_params } = this ;
41+ let html = JSON . parse ( await request ( input , fetch_params ) ) ;
4242 let data = html . data ;
43- let tilte = data . title ;
43+ let title = data . title ;
4444 let img = data . cdncover ;
4545 let vod_type = data . moviecategory . join ( "," ) ;
4646 let area = data . area . join ( "," ) ;
@@ -49,29 +49,29 @@ var rule = {
4949 let content = data . description ;
5050 let base_vod = {
5151 vod_id : input ,
52- vod_name : tilte ,
52+ vod_name : title ,
5353 type_name : vod_type ,
5454 vod_actor : actor ,
5555 vod_director : director ,
5656 vod_content : content ,
5757 vod_remarks : area ,
58- vod_pic : urljoin2 ( input , img )
58+ vod_pic : urljoin ( input , img )
5959 } ;
6060 let delta = 50 ;
6161 let vod_play = { } ;
6262 let sites = data . playlink_sites ;
63- sites . forEach ( function ( site ) {
63+ for ( const site of sites ) {
6464 let playList = "" ;
6565 let vodItems = [ ] ;
66- print ( data )
66+ // print(data)
6767 if ( data . allupinfo ) {
6868 let total = parseInt ( data . allupinfo [ site ] ) ;
69- print ( total )
69+ // print(total)
7070 for ( let j = 1 ; j < total ; j += delta ) {
7171 let end = Math . min ( total , j + delta - 1 ) ;
72- print ( end )
73- let url2 = buildUrl ( input , { start : j , end : end , site : site } ) ;
74- let vod_data = JSON . parse ( fetch ( url2 ) , fetch_params ) . data ;
72+ // print(end)
73+ let url2 = buildUrl ( input , { start : j , end : end , site : site } ) ;
74+ let vod_data = JSON . parse ( await request ( url2 ) , fetch_params ) . data ;
7575 if ( vod_data != null ) {
7676 if ( vod_data . allepidetail ) {
7777 vod_data = vod_data . allepidetail [ site ] ;
@@ -89,21 +89,28 @@ var rule = {
8989 } else {
9090 let item = data . playlinksdetail [ site ] ;
9191 vodItems . push ( ( item . sort || "" ) + "$" + urlDeal ( item . default_url || "" ) )
92- } if ( vodItems . length > 0 ) {
92+ }
93+ if ( vodItems . length > 0 ) {
9394 playList = vodItems . join ( "#" )
94- } if ( playList . length < 1 ) {
95- return
96- } vod_play [ site ] = playList
97- } ) ;
95+ }
96+ if ( playList . length < 1 ) {
97+ continue ;
98+ }
99+ vod_play [ site ] = playList
100+ }
98101 let tabs = Object . keys ( vod_play ) ;
99- let playUrls = [ ] ; for ( let id in tabs ) {
100- print ( "id:" + id ) ; playUrls . push ( vod_play [ tabs [ id ] ] )
101- } if ( tabs . length > 0 ) {
102- let vod_play_from = tabs . join ( "$$$" ) ; let vod_play_url = playUrls . join ( "$$$" ) ;
102+ let playUrls = [ ] ;
103+ for ( let id in tabs ) {
104+ // print("id:" + id);
105+ playUrls . push ( vod_play [ tabs [ id ] ] )
106+ }
107+ if ( tabs . length > 0 ) {
108+ let vod_play_from = tabs . join ( "$$$" ) ;
109+ let vod_play_url = playUrls . join ( "$$$" ) ;
103110 base_vod . vod_play_from = vod_play_from ;
104111 base_vod . vod_play_url = vod_play_url
105112 }
106- VOD = base_vod ;
107- } ) ,
113+ return base_vod ;
114+ } ,
108115 搜索 : 'json:data.longData.rows;titleTxt||titlealias;cover;cat_name;cat_id+en_id;description' ,
109116}
0 commit comments