Changeset 170

Show
Ignore:
Timestamp:
09/15/07 13:23:37 (6 years ago)
Author:
holidays-l
Message:

Fixed get_video_uri

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/WebService-YouTube/trunk/lib/WebService/YouTube/Util.pm

    r109 r170  
    1010use LWP::UserAgent; 
    1111use URI::Escape qw(uri_escape uri_escape_utf8); 
    12 use Encode; 
     12use Encode (); 
    1313 
    1414sub rss_uri { 
     
    8181        return "http://youtube.com/get_video.php?$1"; 
    8282    } 
     83    if ( $content =~ m{\bt:(['"])(.+?)\1}msx ) { 
     84        return "http://youtube.com/get_video.php?video_id=$video_id&t=$2"; 
     85    } 
    8386    if ( $content =~ m{class="errorBox"[^>]*>\s*([^<]+?)\s*<}msx ) { 
    8487        carp "$video_id: $1"; 
     
    230233=head1 LICENSE AND COPYRIGHT 
    231234 
    232 Copyright 2006, Hironori Yoshida <yoshida@cpan.org>. All rights reserved. 
    233  
    234 This program is free software; you can redistribute it and/or modify it 
    235 under the same terms as Perl itself. See L<perlartistic>. 
     235This module is free software; you can redistribute it and/or 
     236modify it under the same terms as Perl itself. See L<perlartistic>. 
    236237 
    237238=cut