Subject: | Util::get_video() broken |
Date: | Sun, 19 Oct 2008 22:18:29 +0200 |
To: | bug-WebService-YouTube [...] rt.cpan.org |
From: | "Patrick Kuijvenhoven" <patrick.kuijvenhoven [...] gmail.com> |
Hi,
At https://bugs.launchpad.net/ubuntu/+source/libwebservice-youtube-perl/+bug/268443
the following patch is suggested to fix
WebService::YouTube::Util::get_video, which currently seems to be
broken.
--- /usr/share/perl5/WebService/YouTube/Util.pm.orig 2008-10-18
16:10:23.000000000 +0200
+++ /usr/share/perl5/WebService/YouTube/Util.pm 2008-10-18
16:10:50.000000000 +0200
@@ -80,7 +80,7 @@
if ( $content =~ m{"/player2\.swf\?([^"]+)",\s*"movie_player"}msx ) {
return "http://youtube.com/get_video.php?$1";
}
- if ( $content =~ m{\bt:(['"])(.+?)\1}msx ) {
+ if ( $content =~ m{,\x20(")t":\x20"([^"]+)"}msx ) {
return "http://youtube.com/get_video.php?video_id=$video_id&t=$2";
}
if ( $content =~ m{class="errorBox"[^>]*>\s*([^<]+?)\s*<}msx ) {
The regular expression is inspired on the one that is used in the
Python script that can be found at
http://www.arrakis.es/~rggi3/youtube-dl/youtube-dl
Best regards,
Patrick