Changeset 7635

Show
Ignore:
Timestamp:
03/07/08 22:26:31 (6 years ago)
Author:
woremacx
Message:

lang/perl/misc/fetch-nico-video.pl: apply video types patch from http://www.smallstyle.com/20080307.html#p01 (thanks to id:otsune)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/misc/fetch-nico-video.pl

    r7634 r7635  
    2626    warn "Found FLV URL $flv_url"; 
    2727 
    28     my $path = "$video_id.flv"; 
     28    $flv_url =~ m!^http://[^/]+(?:smilevideo|nicovideo)\.jp/smile\?(\w)=(?:[^.]+)\.\d+(?:low)?!; 
     29    my %video_type_of = ( 
     30        v => 'flv', 
     31        m => 'mp4', 
     32        s => 'swf', 
     33    ); 
     34    my $ext = exists( $video_type_of{$1} ) ? $video_type_of{$1} : "flv"; 
     35    my $path = "$video_id.$ext"; 
    2936 
    3037    unless ( -e $path ) {