Package: release.debian.org Severity: normal User: release.debian....@packages.debian.org Usertags: unblock
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Please unblock package libwww-youtube-download-perl 0.56-2. The upload fixes #779985: youtube-download fails to download any video. I've added two small patches from upstream github, which are from August 2014 and just not released due to a missing upstream maintainer. My manual tests show that youtube-download works again. Diff attached. unblock libwww-youtube-download-perl/0.56-2 Cheers, gregor -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQJ8BAEBCgBmBQJU/HwWXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXREMUUxMzE2RTkzQTc2MEE4MTA0RDg1RkFC QjNBNjgwMTg2NDlBQTA2AAoJELs6aAGGSaoG92UP/0bmTbOjYDpIKWTRC7PwL7gV q7CXyBH8k/0qqy6RsDPMrtaj+DJf98ZfY+sBcyAmFokhgRzuvgAMq8O8PZURsnam SMOabCqONGd3PGrxkvA4hadgEU4ydMIDjOIrCaJNYN0eiuM0oRJRswZGUwdes+7w mBFA3vhoB5sP0rfGV9VGMzsrmr6kfH6dnqFignlm0dgDP3TW1wwskoKtKbciE6ai fcz9j7CcgO9/FCBgRakAnX8ipgyP6FTkRxbFudO4OBdLVv1zfHzUIMCmQZmOsC9R 8/ikYnc/wNL13gXp9rxUQ/JtIZbPNZyCg1hfSWEs6l0DT+1Mjok71eJv3rA5DlYy D94pM/XEL8bR9JwtNLG9qQ4pmV78sBwfptQ5JNLwqI/K6s78ESh6ls3id1V6It11 pBpzwstU5/XLLwko3qfD+2/qL/AlAVSlYKGClPvWfBeveu7B/Ldh+ZL1yu7iz9sI KH7wxr8T8FuYPxnhEPLb1UI2xX23eOm1o9gaQi7hGFvN6YOQtIpKyd//9qlsH3zq qVp0woMLRJ6mN+WenDdfwZoAYSw0fjpBsrKmmfxlqZgIHBKfUYrpUYChT6HvdiZQ aqPwYhNQox84VvN7ft6PhEdWmkBMFO2BYRAM+AOJgy+hGasaXCfzAcPSt4x0ge7G +EJMtSN+edsApPM5YDdl =iqVG -----END PGP SIGNATURE-----
diff --git a/debian/changelog b/debian/changelog index 01db0c9..d41ed71 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +libwww-youtube-download-perl (0.56-2) unstable; urgency=medium + + * Add 2 small patches from Github to adjust to YouTube changes. + + Patches are taken from PR#31 in issue #27 at + https://github.com/xaicron/p5-www-youtube-download/issues/27 + + (Closes: #779985) + + -- gregor herrmann <gre...@debian.org> Sun, 08 Mar 2015 15:35:00 +0100 + libwww-youtube-download-perl (0.56-1) unstable; urgency=low * Imported Upstream version 0.56 diff --git a/debian/patches/Dont_fail_if_we_can't_find_a_signature.patch b/debian/patches/Dont_fail_if_we_can't_find_a_signature.patch new file mode 100644 index 0000000..8e468f6 --- /dev/null +++ b/debian/patches/Dont_fail_if_we_can't_find_a_signature.patch @@ -0,0 +1,27 @@ +From 87a6a56829a2a7265953b56dbc8f55d8384367a1 Mon Sep 17 00:00:00 2001 +From: Thomas Sibley <tsib...@cpan.org> +Date: Sat, 23 Aug 2014 14:11:55 -0700 +Subject: [PATCH] Don't fail if we can't find a signature + +YouTube started offering pre-signed URLs, so at least give it a go if we +can't parse out a signature. This preserves the previous behaviour for +backwards compat if there are still older videos without pre-signed URLs +(unclear if that's so). +--- + lib/WWW/YouTube/Download.pm | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/lib/WWW/YouTube/Download.pm ++++ b/lib/WWW/YouTube/Download.pm +@@ -299,9 +299,9 @@ + my $uri = URI->new; + $uri->query($stuff); + my $query = +{ $uri->query_form }; +- my $sig = $query->{sig} || _getsig($query->{s}); ++ my $sig = $query->{sig} || ($query->{s} ? _getsig($query->{s}) : undef); + my $url = $query->{url}; +- $fmt_url_map->{$query->{itag}} = $url.'&signature='.$sig; ++ $fmt_url_map->{$query->{itag}} = $url . ($sig ? '&signature='.$sig : ''); + } + + return $fmt_url_map; diff --git a/debian/patches/Let_the_JSON_parser_stop_when_it_finds_trailing_garbage.patch b/debian/patches/Let_the_JSON_parser_stop_when_it_finds_trailing_garbage.patch new file mode 100644 index 0000000..9a2f87e --- /dev/null +++ b/debian/patches/Let_the_JSON_parser_stop_when_it_finds_trailing_garbage.patch @@ -0,0 +1,21 @@ +From dd7f116d09142a921dea266b99c9065ca6ae394d Mon Sep 17 00:00:00 2001 +From: Thomas Sibley <tsib...@cpan.org> +Date: Sat, 23 Aug 2014 14:11:14 -0700 +Subject: [PATCH] Let the JSON parser stop when it finds trailing garbage + +This is more robust than playing cat-and-mouse with the regex. +--- + lib/WWW/YouTube/Download.pm | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/lib/WWW/YouTube/Download.pm ++++ b/lib/WWW/YouTube/Download.pm +@@ -223,7 +223,7 @@ + croak 'Video not available in your country'; + } + elsif ($line =~ /^.+ytplayer\.config\s*=\s*({.*})/) { +- $data = JSON->new->utf8(1)->decode($1); ++ ($data, undef) = JSON->new->utf8(1)->decode_prefix($1); + last; + } + } diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..7e12fe0 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,2 @@ +Let_the_JSON_parser_stop_when_it_finds_trailing_garbage.patch +Dont_fail_if_we_can't_find_a_signature.patch