SVN: toys/rsget.pl/Video/Veoh
sparky
sparky at pld-linux.org
Thu Oct 8 00:12:17 CEST 2009
Author: sparky
Date: Thu Oct 8 00:12:17 2009
New Revision: 10720
Modified:
toys/rsget.pl/Video/Veoh
Log:
- use unify
Modified: toys/rsget.pl/Video/Veoh
==============================================================================
--- toys/rsget.pl/Video/Veoh (original)
+++ toys/rsget.pl/Video/Veoh Thu Oct 8 00:12:17 2009
@@ -6,15 +6,14 @@
slots: 8
status: OK 2009-10-06
-start:
- my $uri = $-{_uri};
-
+unify:
my $id;
- $id = $1 if $-{_uri} =~ m{.*/(?:watch|videos)/(v.*?)(#.*)?$};
- $id = $1 if $-{_uri} =~ m{#watch%3D(v.*)$};
- $uri = "http://www.veoh.com/browse/videos/watch/" . $id if $id;
+ $id = $1 if m{.*/(?:watch|videos)/(v.*?)(#.*)?$};
+ $id = $1 if m{#watch%3D(v.*)$};
+ return "http://www.veoh.com/browse/videos/watch/" . $id if $id;
- GET( $uri );
+start:
+ GET( unify( $-{_uri} ) );
! m/"videoId":"(.*?)",/;
my $id = $1;
More information about the pld-cvs-commit
mailing list