Revision 393737623535 () - Diff

Link to this snippet: https://friendpaste.com/wCvPkUnZLQTPt4zGTbvUV
Embed:
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
//Dorothy2
//caption=TokyoPornTube
//version=0.00
//match=http://www.tokyo-porn-tube.com/video/\d+/
//author= 
//path=program
//priority=500
//end

function(){
common_load('download', 'character_references');
var id = urlinfo.url.match(/\/video\/(\d+)\//) ? RegExp.$1 : '0';
var http = download(urlinfo.url);
if(http.responseHeader.code != 200) { println("error---> page " + http.responseHeader.code); exit(); }
var title = http.data.match(/<h2>([^<>]+)</) ? character_references(RegExp.$1.fromUTF8toSJIS()).trim() : '?';
println("title = " + title);
http = download('http://www.tokyo-porn-tube.com/media/player/config.php?vkey=' + id);
if(http.responseHeader.code != 200) { println("error---> xml " + http.responseHeader.code); exit(); }
var url = http.data.match(/<src>(http[^<>]+)<\/src>/) ? RegExp.$1.replace(/&amp;/g,'&') : null;
if(http.data.match(/<hd>(http[^<>]+)<\/hd>/)) {
url = RegExp.$1.replace(/&amp;/g,'&');
println("HD");
}
if(!url) { println("error---> url not found"); exit(); }
urlinfo.url = (new URL(url)).url;
headers['Host'] = (new URL(urlinfo.url)).host;
headers['Referer'] = '';
Dorothy.fileName = changeFileName(title + ' tpt=' + id + '.flv');
}