asg delete lock Revision 376465343533 (Tue Jun 14 2011 at 09:07) - Diff Link to this snippet: https://friendpaste.com/1fMX7PvjXJKxp6LQl5xKaU Embed: manni perldoc borland colorful default murphy trac fruity autumn bw emacs pastie friendly Show line numbers Wrap lines 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152//Dorothy2//caption=asg.to//version=0.00//match=http://asg.to/contentsPage.html\?mcd=\w+//author= //path=program//priority=500//endfunction(){ 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);}