Bug#645025: clive: youtube broken
Ingo Saitz
Ingo.Saitz at stud.uni-hannover.de
Tue Oct 11 20:56:27 UTC 2011
Package: clive
Version: 2.2.25-2
Severity: normal
Tags: patch
On some(?) videos clive fails to extract the url from the page.
Example url:
$ clive http://www.youtube.com/watch?v=1I4nnbHUvwo
fetch http://www.youtube.com/watch?v=1I4nnbHUvwo ...done.
error: no match: `(?-xism:url_encoded_fmt_stream_map=(.*?)&)'
The attached patch fixes this and also seems to work with old urls.
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (800, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.1.0-rc9-pinguin20111006 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages clive depends on:
ii libclass-singleton-perl 1.4-1
ii libconfig-tiny-perl 2.14-1
ii libexpect-perl 1.21-1
ii libgetopt-argvfile-perl 1.11-1
ii libhtml-parser-perl 3.68-1+b1
ii liburi-perl 1.59-1
ii libwww-curl-perl 4.15-1+b1
ii perl 5.12.4-6
ii perl-modules [libversion-perl] 5.12.4-6
Versions of packages clive recommends:
ii clive-utils 2.1.6-1
ii libberkeleydb-perl 0.48-1
ii libterm-readkey-perl 2.30-4+b1
Versions of packages clive suggests:
ii ffmpeg 5:0.8.5-0.0
-- no debconf information
-------------- next part --------------
--- /usr/share/perl5/clive/Host/Youtube.pm.old 2011-10-11 21:33:46.970954111 +0200
+++ /usr/share/perl5/clive/Host/Youtube.pm 2011-10-11 22:36:25.285440533 +0200
@@ -33,7 +33,7 @@ sub parsePage {
my %re = (
id => qr|"video_id": "(.*?)"|,
- url_encoded_fmt_stream_map => qr|url_encoded_fmt_stream_map=(.*?)&|,
+ url_encoded_fmt_stream_map => qr|"url_encoded_fmt_stream_map": "(.*?)"|,
);
my $tmp;
@@ -44,9 +44,9 @@ sub parsePage {
require URI::Escape;
- foreach (split /,/, URI::Escape::uri_unescape ($tmp->{url_encoded_fmt_stream_map})) {
+ foreach (split /,/, $tmp->{url_encoded_fmt_stream_map}) {
my %map;
- for my $kv (split /&/) {
+ for my $kv (split /\\u0026/) {
my ($key, $value) = split /=/, $kv;
$map{$key} = URI::Escape::uri_unescape($value);
}
More information about the pkg-perl-maintainers
mailing list