a | b | |
---|
| 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 | + | } |
---|
... | |
---|