@@ -74,43 +74,47 @@ const ex = {
7474 domain : 'streamcloud.eu' ,
7575 runner : 'url' ,
7676 exec : async ( { url, runners} ) => {
77- const dataRegex = new RegExp ( / \/ ( [ ^ \/ . ] + ) \/ ( .* ) \. [ ^ . ] + / , 'gi ' ) ;
78- const data = dataRegex . execAll ( url ) ;
79- if ( data . length <= 0 || data [ 0 ] . length <= 2 )
77+ const dataRegex = new RegExp ( / \/ ( [ ^ \/ . ] + ) \/ ( .* ) \. [ ^ . ] + / , 'i ' ) ;
78+ const data = dataRegex . exec ( url ) ;
79+ if ( data . length <= 2 )
8080 return null ;
81- const id = data [ 0 ] [ 1 ] ;
82- const name = data [ 0 ] [ 2 ] ;
83- if ( ! id || ! name || ! ( 'puppeteer' in runners ) )
81+ const id = data [ 1 ] ;
82+ const name = data [ 2 ] ;
83+ if ( ! id || ! name )
8484 return null ;
8585
8686 const html = await runners . html . run ( {
8787 url : url ,
8888 scrapper : ( { html} ) => removeNewline ( html ) ,
8989 options : {
90- method : 'post' ,
91- headers : {
92- 'Referer' : url ,
93- 'Content-Type' : 'application/x-www-form-urlencoded' ,
94- 'Cache-Control' : 'no-cache' ,
95- 'Connection' : 'Keep-Alive'
96- } ,
97- data : queryString . stringify ( {
98- fname : name ,
99- hash : '' ,
100- id : id ,
101- op : 'download1' ,
102- referer : '' ,
103- usr_login : '' ,
104- imhuman : 'Weiter+zum+Video'
105- } )
90+ axios : {
91+ config : {
92+ method : 'post' ,
93+ headers : {
94+ 'Referer' : url ,
95+ 'Content-Type' : 'application/x-www-form-urlencoded' ,
96+ 'Cache-Control' : 'no-cache' ,
97+ 'Connection' : 'Keep-Alive'
98+ } ,
99+ data : queryString . stringify ( {
100+ fname : name ,
101+ hash : '' ,
102+ id : id ,
103+ op : 'download1' ,
104+ referer : '' ,
105+ usr_login : '' ,
106+ imhuman : 'Weiter+zum+Video'
107+ } )
108+ }
109+ }
106110 }
107111 } ) ;
108112
109113 const configRegex = new RegExp ( / j w p l a y e r \( " [ ^ " ] + " \) .s e t u p \( { ( .* ?) } \) ; / , 'i' ) ;
110114 const propRegex = new RegExp ( / ( \w + ) \s * : \s * " ? ( .* ?) " ? \s * , / , 'ig' ) ;
111115 const tabRegex = / (?: \\ t | \t ) / g;
112116 const configData = configRegex . exec ( html ) ;
113- if ( configData . length < 1 )
117+ if ( ! configData || configData . length < 1 )
114118 return null ;
115119 const configRAW = configData [ 1 ] . replace ( tabRegex , '' ) ;
116120 const propData = propRegex . execAll ( configRAW ) ;
@@ -310,9 +314,9 @@ const ex = {
310314 resourceType === 'image' ||
311315 resourceType === 'font' ||
312316 resourceType === 'stylesheet'
313- //||
314- //url.includes('2mdnsys.com') ||
315- //url.includes('ti553.com')
317+ //||
318+ //url.includes('2mdnsys.com') ||
319+ //url.includes('ti553.com')
316320 }
317321 }
318322 } ,
0 commit comments