2015-12-17 213 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?)开发一些脚本,以执行这些步骤并下载视频。