2015-12-17 207 views
1

我想設在這裏的視頻的副本:下載視頻

http://www.sirecam.com/sales/Tattersalls_October_Yearling_Sale/2009

我使用檢查元素和視頻應位於: http://www.sirecam.com/2009/TOYS/TOYS2009_2.flv

,但每次我去這個鏈接我得到一個404錯誤。

我打算使用一個帶有urlretrieve的小型python腳本來下載這個視頻,但我似乎無法找到要從中檢索的鏈接。

如何找到視頻的任何幫助將是一個美妙的學習體驗。

+0

檢查您的瀏覽器網絡面板。 –

回答

2

我是如何找到使用Chrome的真實網址的?

  1. 一旦加載http://www.sirecam.com/sales/Tattersalls_October_Yearling_Sale/2009,開放Developer Tools

enter image description here

  • 根據對物質的情況下,選擇網絡選項卡的選項。
  • enter image description here

  • 點擊播放(在視頻),看看加載的資源。然後選擇「有趣」之一,看到它加載的網址:
  • enter image description here

    最後,你可以測試在另一個視頻這些步驟,看看從那裏視頻加載的前綴/域名相同(http://cdn.sirecam.com/)。如果它是相同的,那麼只需颳去視頻路徑,添加前綴並下載它。如果不一樣,你需要進一步挖掘。

    進一步挖掘:

    源代碼中,你可能在<param name="flashvars"...看到有一些配置:

    config = { 
        "key": "#$a13c066f3e6146a6195", 
        "clip": { 
         "scaling": "orig", 
         "autoPlay": true, 
         "urlResolvers": "cluster", 
         "bufferLength": 6, 
         "autoBuffering": true, 
         "url": "/2009/TOYS/TOYS2009_2.flv" 
        }, 
        "contextMenu": [{ 
         "About Sirecam ...": "function()" 
        }], 
        "canvas": { 
         "backgroundImage": "url(images/sirecam/player_bg_sales.png)", 
         "backgroundColor": "#ffffff" 
        }, 
        "plugins": { 
         "cluster": { 
          "debug": true, 
          "url": "images/flowplayer/flowplayer.cluster-3.1.1.swf", 
          "hosts": ["http://cdn.sirecam.com", "http://d103cgplnnab87.cloudfront.net", "http://s3.sirecam.com", "http://vdo.sirecam.com"], 
          "connectTimeout": 20000, 
          "failureExpiry": 20000 
         }, 
         "controls": { 
          "borderRadius": 0, 
          "timeColor": "rgba(253, 185, 49, 1)", 
          "slowForward": true, 
          "bufferGradient": "none", 
          "backgroundColor": "rgba(120, 120, 120, 1)", 
          "volumeSliderGradient": "none", 
          "slowBackward": false, 
          "timeBorderRadius": 20, 
          "time": true, 
          "progressGradient": "none", 
          "height": 22, 
          "volumeColor": "rgba(0, 51, 153, 1)", 
          "tooltips": { 
           "marginBottom": 5, 
           "scrubber": true, 
           "volume": true, 
           "buttons": false 
          }, 
          "opacity": 1, 
          "fastBackward": false, 
          "timeFontSize": 12, 
          "border": "0px", 
          "bufferColor": "rgba(0, 51, 153, 1)", 
          "volumeSliderColor": "rgba(253, 185, 49, 1)", 
          "buttonColor": "rgba(209, 209, 209, 1)", 
          "mute": false, 
          "autoHide": { 
           "enabled": false, 
           "hideDelay": 500, 
           "hideStyle": "move", 
           "mouseOutDelay": 500, 
           "hideDuration": 400, 
           "fullscreenOnly": true 
          }, 
          "backgroundGradient": [0.5, 0.2, 0], 
          "width": "100pct", 
          "display": "block", 
          "sliderBorder": "1px solid rgba(128, 128, 128, 0.7)", 
          "buttonOverColor": "#ffffff", 
          "fullscreen": true, 
          "timeBgColor": "rgba(0, 0, 0, 0.55)", 
          "scrubberBarHeightRatio": 0.2, 
          "bottom": 0, 
          "stop": false, 
          "zIndex": 1, 
          "sliderColor": "#000000", 
          "scrubberHeightRatio": 0.6, 
          "tooltipTextColor": "rgba(51, 51, 51, 1)", 
          "spacing": { 
           "time": 6, 
           "volume": 8, 
           "all": 2 
          }, 
          "sliderGradient": "none", 
          "timeBgHeightRatio": 0.8, 
          "volumeSliderHeightRatio": 0.6, 
          "timeSeparator": " ", 
          "name": "controls", 
          "volumeBarHeightRatio": 0.2, 
          "left": "50pct", 
          "tooltipColor": "rgba(253, 185, 49, 1)", 
          "playlist": false, 
          "durationColor": "rgba(255, 255, 255, 1)", 
          "play": true, 
          "fastForward": true, 
          "progressColor": "rgba(253, 185, 49, 1)", 
          "timeBorder": "0px solid rgba(0, 0, 0, 0.3)", 
          "volume": true, 
          "scrubber": true, 
          "builtIn": false, 
          "volumeBorder": "1px solid rgba(128, 128, 128, 0.7)", 
          "margins": [2, 6, 2, 12] 
         } 
        }, 
        "playerId": "player", 
        "playlist": [{ 
         "scaling": "orig", 
         "autoPlay": true, 
         "urlResolvers": "cluster", 
         "bufferLength": 6, 
         "autoBuffering": true, 
         "url": "/2009/TOYS/TOYS2009_2.flv" 
        }] 
    } 
    

    內部的配置,你會看到類似這樣的:

    "hosts": ["http://cdn.sirecam.com", "http://d103cgplnnab87.cloudfront.net", "http://s3.sirecam.com", "http://vdo.sirecam.com"], 
    

    其中包含來自其中的主機應該提供視頻。因此,在http://www.sirecam.com/sales/Tattersalls_October_Yearling_Sale/2009你會看到,路徑是/2009/TOYS/TOYS2009_2.flv,如果你玩,並嘗試加載從這些主機的視頻,所有這些可能的工作:

    正如你所看到的,這是一個調查問題。然後,您可以使用您的首選語言(Python?)開發一些腳本,以執行這些步驟並下載視頻。