@ISA = qw(videosite::GrabberBase);
use LWP::Simple qw(!get);
+use MIME::Base64;
use HTML::Parser;
-use videosite::JSArrayParser;
use Data::Dumper;
use strict;
}
# Look for the download URL
+ # This is obfuscated a little bit.
foreach $e (@text) {
- if ($e->[0] =~ m|\.setup\((.*)\);$|) {
- my $jsp;
- my $r;
-
- $self->debug("Found JSON: %s", $1);
- $jsp = videosite::JSArrayParser->new();
- $self->debug("Using %s to parse", ref($jsp));
- $r = $jsp->parse($1);
-
- unless(defined($r)) {
- $self->error("Found information hash, but could not parse");
- return undef;
- }
+ if ($e->[0] =~ m|var googleCode = '([^\x27]+)'|) {
+ my $c = $1;
- $self->debug("Parsed information: %s", Dumper($r));
+ $self->debug("Found obfuscated code: %s", $c);
+ my $d = decode_base64($c);
+ $self->debug("Decoded to: %s", $d);
- if (exists($r->{'file'})) {
- $metadata->{'DLURL'} = $r->{'file'};
+ if ($d =~ m|\.addVariable\("file",\s*"([^\x22]+)"\)|) {
+ $metadata->{'DLURL'} = $1;
}
}
}