r71667 - in /branches/upstream/libwww-youtube-download-perl/current: Changes MANIFEST META.yml lib/WWW/YouTube/Download.pm t/private/video_id.t

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Sat Mar 19 01:14:47 UTC 2011


Author: jawnsy-guest
Date: Sat Mar 19 01:14:40 2011
New Revision: 71667

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=71667
Log:
[svn-upgrade] new version libwww-youtube-download-perl (0.25)

Modified:
    branches/upstream/libwww-youtube-download-perl/current/Changes
    branches/upstream/libwww-youtube-download-perl/current/MANIFEST
    branches/upstream/libwww-youtube-download-perl/current/META.yml
    branches/upstream/libwww-youtube-download-perl/current/lib/WWW/YouTube/Download.pm
    branches/upstream/libwww-youtube-download-perl/current/t/private/video_id.t

Modified: branches/upstream/libwww-youtube-download-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-youtube-download-perl/current/Changes?rev=71667&op=diff
==============================================================================
--- branches/upstream/libwww-youtube-download-perl/current/Changes (original)
+++ branches/upstream/libwww-youtube-download-perl/current/Changes Sat Mar 19 01:14:40 2011
@@ -1,4 +1,7 @@
 Revision history for Perl extension WWW::YouTube::Download
+
+0.25    Sat Mar 19 00:39:41 2011
+        - added few more match URLs (mikolaj++)
 
 0.24    Fri Mar  4 01:45:20 2011
         - fixed could not fetch json data problem (akiym++)

Modified: branches/upstream/libwww-youtube-download-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-youtube-download-perl/current/MANIFEST?rev=71667&op=diff
==============================================================================
--- branches/upstream/libwww-youtube-download-perl/current/MANIFEST (original)
+++ branches/upstream/libwww-youtube-download-perl/current/MANIFEST Sat Mar 19 01:14:40 2011
@@ -15,7 +15,7 @@
 inc/Test/More.pm
 lib/WWW/YouTube/Download.pm
 Makefile.PL
-MANIFEST
+MANIFEST			This list of files
 META.yml
 README
 t/00_compile.t

Modified: branches/upstream/libwww-youtube-download-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-youtube-download-perl/current/META.yml?rev=71667&op=diff
==============================================================================
--- branches/upstream/libwww-youtube-download-perl/current/META.yml (original)
+++ branches/upstream/libwww-youtube-download-perl/current/META.yml Sat Mar 19 01:14:40 2011
@@ -26,5 +26,5 @@
   perl: 5.8.1
 resources:
   license: http://dev.perl.org/licenses/
-  repository: git://github.com/xaicron/p5-www-youtube-download
-version: 0.24
+  repository: git://github.com/xaicron/p5-www-youtube-download.git
+version: 0.25

Modified: branches/upstream/libwww-youtube-download-perl/current/lib/WWW/YouTube/Download.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-youtube-download-perl/current/lib/WWW/YouTube/Download.pm?rev=71667&op=diff
==============================================================================
--- branches/upstream/libwww-youtube-download-perl/current/lib/WWW/YouTube/Download.pm (original)
+++ branches/upstream/libwww-youtube-download-perl/current/lib/WWW/YouTube/Download.pm Sat Mar 19 01:14:40 2011
@@ -4,7 +4,7 @@
 use warnings;
 use 5.008001;
 
-our $VERSION = '0.24';
+our $VERSION = '0.25';
 
 use Carp ();
 use URI ();
@@ -216,10 +216,10 @@
 
 sub _video_id {
     my $stuff = shift;
-    if ($stuff =~ m{/watch\?.*?v=([^&]+)}) {
+    if ($stuff =~ m{/.*?[?&;]v=([^&#?=/;]+)}) {
         return $1;
     }
-    elsif ($stuff =~ m{/(?:v|embed)/([^&]+)}) {
+    elsif ($stuff =~ m{/(?:e|v|embed)/([^&#?=/;]+)}) {
         return $1;
     }
     elsif ($stuff =~ m{#p/(?:u|search)/\d+/([^&?/]+)}) {

Modified: branches/upstream/libwww-youtube-download-perl/current/t/private/video_id.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-youtube-download-perl/current/t/private/video_id.t?rev=71667&op=diff
==============================================================================
--- branches/upstream/libwww-youtube-download-perl/current/t/private/video_id.t (original)
+++ branches/upstream/libwww-youtube-download-perl/current/t/private/video_id.t Sat Mar 19 01:14:40 2011
@@ -53,5 +53,25 @@
     'ZgDKIyxaK8A',
 );
 
+test_video_id(
+    'http://www.youtube.com/e/UpaxndP5G2Y',
+    'UpaxndP5G2Y',
+);
+
+test_video_id(
+    'www.youtube.com/?v=AfooxdRYeJU',
+    'AfooxdRYeJU',
+);
+
+test_video_id(
+    'http://www.youtube.com/embed/0zM3nApSvMg?rel=0',
+    '0zM3nApSvMg',
+);
+
+test_video_id(
+    'http://www.youtube.com/v/INsSU8Jnx-4?fs=1&hl=en',
+    'INsSU8Jnx-4',
+);
+
 done_testing;
 




More information about the Pkg-perl-cvs-commits mailing list