--- 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(/
([^<>]+)) ? 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(/(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);
+}