2016-07-20 5 views
0

https://developer.apple.com/devcenter/download.action?path=/videos/wwdc_2010__hd/session_122__accessibility_on_iphone_os.mov現在WWDC 2010のビデオをカールやwgetでダウンロードするには?例えば

私は

curl https://developer.apple.com/devcenter/download.action?path=/videos/wwdc_2010__hd/session_122__accessibility_on_iphone_os.mov > ~/Desktop/122.mov

または

wget https://developer.apple.com/devcenter/download.action?path=/videos/wwdc_2010__hd/session_122__accessibility_on_iphone_os.mov > ~/Desktop/122.mov

どちらも失敗を入力し、のみ333キロバイトのファイルをダウンロードしてください。

答えて

0

入手したmovファイルは、ネットワーク接続のファイルを修正するための選択に使用される参照ファイルです。

mplayerがある場合は、mplayer <url> -dumpstream -dumpfile <filename>を試すことができます。

ファイルを開いて、ファイル名を正しい実際のファイルにすることもできます。

また、参照ファイルを解析するスクリプトを書くこともできます。

sub parseMov 
{ 
    $uri = $_[0]; 
    $result_uri = ""; 
    @arr_uris =(); 

    my $content = get $uri; 

    $content =~ "/[^[:print:]]//g"; 

    @arr_movs = split("rmdr", $content); 

    foreach (@arr_movs) 
    { 
     @arr_parts = split("url", $_); 
     my $file = $arr_parts[-1]; 

     if (index($file, ".mov") != -1 || index($file, ".3gp") != -1 || index($file, ".m4v") != -1) 
     { 
      #remove first char 
      $file = trim($file); 
      $file = substr($file,4); 
      push(@arr_uris, $file); 
     } 
    } 

    #determine basePath 
    my @pathComponents = split("/", $uri); 
    $basePath = $uri; 
    $basePath =~ s/$pathComponents[-1]//; 

    my $biggestSize = 0; 

    #get biggest file 
    foreach (@arr_uris) 
    { 
     $uri_item = "$basePath$_"; 

     my $size = getFilesize($uri_item); 

     if ($size > $biggestSize) 
     { 
      $finalURL = $uri_item; 
      $biggestSize = $size; 
     } 

    } 

    #remove %00 and %10 chars 
    $finalURL =~ s/\x10//; 
    $finalURL =~ s/\x00*//g; 

    return $finalURL; 

}

+0

はどうもありがとうございました: は、ここで私はMOV refのファイルを解析するperlで書いた関数です。ここで入力したスクリプトを実行します。エラーメッセージ "オブジェクトメソッドを見つけることができません"が表示される "パッケージ経由で"取得、任意の助言? – seguedestination

+0

ターミナル 'cpan install LWP HTTP :: Request'にLWPをインストールする必要があります –

関連する問題