Fix LiveLeak.pm (#11)
authorToni Gundogdu <legatvs.git@gmail.com>
Tue, 19 Apr 2011 07:54:19 +0000 (19 10:54 +0300)
committerToni Gundogdu <legatvs.git@gmail.com>
Tue, 19 Apr 2011 07:54:19 +0000 (19 10:54 +0300)
lib/clive/Host/Liveleak.pm

index bedebed..8c304ab 100644 (file)
@@ -35,7 +35,7 @@ sub parsePage {
 
     my %re = (
         id     => qr|token=(.*?)['&]|,
-        config => qr|'config','(.*?)'|,
+        config => qr|config: "(.*?)"|,
     );
 
     my $tmp;
@@ -63,18 +63,9 @@ sub _parseConfig {
         my %re = ( file => qr|<file>(.*?)</file>| );
         my $tmp;
         if ( clive::Util::matchRegExps( \%re, \$tmp, \$content ) == 0 ) {
-            if ( $curl->fetchToMem( $tmp->{file}, \$content, "playlist" )
-                == 0 )
-            {
-                %re = ( location => qr|<location>(.*?)</location>| );
-                $tmp = undef;
-                if (clive::Util::matchRegExps( \%re, \$tmp, \$content ) == 0 )
-                {
-                    $self->{video_link} = $tmp->{location};
-                    $self->{video_link} =~ tr/ //d;
-                    return (0);
-                }
-            }
+            $self->{video_link} = $tmp->{file};
+            $self->{video_link} =~ tr/ //d;
+            return (0);
         }
     }
     return (1);