Author: glen
Date: Wed Apr  1 11:22:04 2015
New Revision: 12757

Modified:
   toys/rsget.pl/Video/Kanal2
Log:
update Video/Kanal2 to match site changes


Modified: toys/rsget.pl/Video/Kanal2
==============================================================================
--- toys/rsget.pl/Video/Kanal2  (original)
+++ toys/rsget.pl/Video/Kanal2  Wed Apr  1 11:22:04 2015
@@ -1,7 +1,7 @@
 # $Id$
 # Video::Kanal2 - Video getter plugin for rsget.pl
 #
-# 2013 (c) Elan Ruusamäe <[email protected]>
+# 2013-2015 (c) Elan Ruusamäe <[email protected]>
 #              This program is free software,
 # you may distribute it under GPL v2 or newer.
 
@@ -9,36 +9,22 @@
 short: V:Kanal2
 web: "http://kanal2.ee/";
 uri: qr{kanal(?:2|11).ee/vaatasaateid/.+\?videoid=\d+}
-uri: qr{kanal2.ee/pluss/video/\?id=\d+}
+uri: qr{kanal2.ee/pluss/.+\?id=\d+}
 # limit slots bacause rtmp support is very bad
-slots: 3
-status: OK 2014-04-13
+slots: 1
+status: OK 2015-04-01
 
 start:
-       GET( $-{_uri} );
+       GET($-{_uri});
 
-       ! m{<title>(.+?) - Vaata saateid - .+</title>}
-               or m{<div class="title"><a href=".+">(.+?)</a></div>}
-               or m{<title>(.+?) - </title>};
-       my $title = $1;
        my ($domain) = $-{_uri} =~ m{^(https?://[^/]+)};
-
-       $-{file_name} = de_ml($title);
-       $-{file_name} =~ s{/}{_}g;
-
-       if (m{<div class="time" id="closed_time_block">(.+)</div>}) {
-               my $time = $1;
-               # strip <b>..</b> tags
-               $time =~ s#</?\w+>##g;
-               $-{file_name} .= " - ".de_ml($time);
-       }
-
-       ! m{videoId: '(\d+)'};
-       my $videoId = $1;
+       my ($videoId) = $-{_uri} =~ /\?id=(\d+)/;
 
        $-{api_uri} = "$domain/video/playerPlaylistApi?id=$videoId";
 
-       GET($-{api_uri}, keep_referer => 1 );
+       GET($-{api_uri}, keep_referer => 1);
+
+       ($-{file_name}) = m{<name><!\[CDATA\[(.+)\]\]></name>};
 
        if (m{<videoUrl><!\[CDATA\[(.+?)\]\]></videoUrl>}) {
                # <videoUrl><![CDATA[http://....mp4]]></videoUrl>
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to