aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhamsterbacke <mail@artur-lutz.de>2013-03-21 03:44:58 +0100
committerNigel Taylor <njtaylor0101@gmail.com>2013-03-27 00:32:12 +0000
commitc5bfbaaff0db33c7b453c368daf6f1e07b68703b (patch)
tree50cd70ebda835bb3c72cf7bc19cd54b4c251f440
parentd7f4a4832feddce31c875f6af6da4f19a0e30ea8 (diff)
downloadget-flash-videos-c5bfbaaff0db33c7b453c368daf6f1e07b68703b.tar.gz
Update Wat.pm
I have been analysing the wat.tv flashplayer and found out, that it takes the time from the http://www.wat.tv/servertime address. The first value is the time in unixtime. This one just needs to be converted to hex and that's it. My greasemonkey script for direct playing the video with a video plugin is working with that.
-rw-r--r--lib/FlashVideo/Site/Wat.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/FlashVideo/Site/Wat.pm b/lib/FlashVideo/Site/Wat.pm
index b9cfe5b..41a99e9 100644
--- a/lib/FlashVideo/Site/Wat.pm
+++ b/lib/FlashVideo/Site/Wat.pm
@@ -13,9 +13,9 @@ die "Must have Digest::MD5 for this download\n"
sub token {
my $url = shift;
- my $hexdate = sprintf("%x",time());
- # fill up triling zeroes
- $hexdate .= "0" x (length($hexdate) - 8);
+ my $hexdate = $browser->get("http://www.wat.tv/servertime");
+ my @timestamp=split('|',$hexdate);
+ $hexdate=sprintf("%x",shift(@timestamp));
my $key = "9b673b13fa4682ed14c3cfa5af5310274b514c4133e9b3a81e6e3aba00912564";
return Digest::MD5::md5_hex($key . $url . $hexdate)."/".$hexdate;
}