1fMX7PvjXJKxp6LQl5xKaU changeset

Changeset376465343533 (b)
ParentNone (a)
ab
0+//Dorothy2
0+//caption=asg.to
0+//version=0.00
0+//match=http://asg.to/contentsPage.html\?mcd=\w+
0+//author= 
0+//path=program
0+//priority=500
0+//end
0+
0+function(){
0+        common_load('download', 'post', 'character_references');
0+       
0+        //-------------------------------
0+       
0+        var http = download(urlinfo.url);
0+        if(http.responseHeader.code != 200) {  println('error---> page ' + http.responseHeader.code);  exit();  }
0+       
0+        var cookie = http.responseHeader.cookie.data;
0+       
0+        var mcd = http.data.match(/>urauifla\("mcd=(\w+)/) ? RegExp.$1 : null;
0+        println("mcd --> " + mcd);
0+        if( mcd == null ) {  println('error---> mcd');  exit();  }
0+       
0+        var pt = http.data.match(/>urauifla\("[^"]+?&pt=(\w+)/) ? RegExp.$1 : null;
0+        println("pt --> " + pt);
0+        if( pt == null ) {  println('error---> pt');  exit();  }
0+       
0+        var title = http.data.match(/<h2 id="bookmarktitle">([^<>]+)</) ? character_references(RegExp.$1.fromEUCtoSJIS()) : '?';
0+        println("title = " + title);
0+       
0+        var st = MD5.calc("---===XERrr3nmsdf8874nca===---" + mcd + pt.substring(0, 8));
0+       
0+        var postdata = 'burn=' + ('' + Math.random()).replace(/\./, '%2E');
0+       
0+        var xmlUrl = 'http://asg.to/contentsPage.xml?mcd=' + mcd + '&pt=' + pt + '&st=' + st;
0+       
0+        //-------------------------------
0+       
0+        http = post(xmlUrl, postdata, {'Cookie':cookie});
0+        if(http.responseHeader.code != 200) {  println('error---> xml ' + http.responseHeader.code);  exit();  }
0+       
0+        var url = http.data.match(/<movieurl>(http[^<>]+)</) ? RegExp.$1 : null;
0+        if(!url) {  println("error---> url not found");  exit();  }
0+       
0+        //-------------------------------
0+       
0+        var ext = url.match(/\.mp4/) ? '.mp4' : '.flv';
0+       
0+        urlinfo.url = (new URL(url)).url;
0+        headers['Host'] = (new URL(urlinfo.url)).host;
0+        Dorothy.fileName = changeFileName(title + ' asg=' + mcd + ext);
0+}
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
--- Revision None
+++ Revision 376465343533
@@ -0,0 +1,52 @@
+//Dorothy2
+//caption=asg.to
+//version=0.00
+//match=http://asg.to/contentsPage.html\?mcd=\w+
+//author= 
+//path=program
+//priority=500
+//end
+
+function(){
+ common_load('download', 'post', 'character_references');
+
+ //-------------------------------
+
+ var http = download(urlinfo.url);
+ if(http.responseHeader.code != 200) { println('error---> page ' + http.responseHeader.code); exit(); }
+
+ var cookie = http.responseHeader.cookie.data;
+
+ var mcd = http.data.match(/>urauifla\("mcd=(\w+)/) ? RegExp.$1 : null;
+ println("mcd --> " + mcd);
+ if( mcd == null ) { println('error---> mcd'); exit(); }
+
+ var pt = http.data.match(/>urauifla\("[^"]+?&pt=(\w+)/) ? RegExp.$1 : null;
+ println("pt --> " + pt);
+ if( pt == null ) { println('error---> pt'); exit(); }
+
+ var title = http.data.match(/<h2 id="bookmarktitle">([^<>]+)</) ? character_references(RegExp.$1.fromEUCtoSJIS()) : '?';
+ println("title = " + title);
+
+ var st = MD5.calc("---===XERrr3nmsdf8874nca===---" + mcd + pt.substring(0, 8));
+
+ var postdata = 'burn=' + ('' + Math.random()).replace(/\./, '%2E');
+
+ var xmlUrl = 'http://asg.to/contentsPage.xml?mcd=' + mcd + '&pt=' + pt + '&st=' + st;
+
+ //-------------------------------
+
+ http = post(xmlUrl, postdata, {'Cookie':cookie});
+ if(http.responseHeader.code != 200) { println('error---> xml ' + http.responseHeader.code); exit(); }
+
+ var url = http.data.match(/<movieurl>(http[^<>]+)</) ? RegExp.$1 : null;
+ if(!url) { println("error---> url not found"); exit(); }
+
+ //-------------------------------
+
+ var ext = url.match(/\.mp4/) ? '.mp4' : '.flv';
+
+ urlinfo.url = (new URL(url)).url;
+ headers['Host'] = (new URL(urlinfo.url)).host;
+ Dorothy.fileName = changeFileName(title + ' asg=' + mcd + ext);
+}