首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >下载视频

下载视频
EN

Stack Overflow用户
提问于 2015-12-18 05:59:25
回答 1查看 473关注 0票数 0

我想要一份位于此处的视频副本:

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

我使用了inspect元素,视频应该位于:http://www.sirecam.com/2009/TOYS/TOYS2009_2.flv

但每次我转到这个链接时,我都会得到一个404错误。

我打算使用一个小的python脚本和urlretrieve来下载这个视频,但是我似乎找不到要检索的链接。

任何关于如何找到视频的帮助都将是一次美妙的学习经历。

EN

回答 1

Stack Overflow用户

发布于 2015-12-18 11:09:38

我是如何使用Chrome找到真正的网址的?

  1. 加载http://www.sirecam.com/sales/Tattersalls_October_Yearling_Sale/2009后,打开Developer Tools

  1. 根据问题的大小写选择网络选项卡选项。

  1. 单击播放(在视频上)并查看加载的资源。然后选择“有趣的”一个并查看它加载的网址:

最后,您可以在另一个视频上测试这些步骤,并查看加载视频的前缀/域是否相同(http://cdn.sirecam.com/)。如果相同,只需抓取视频路径,添加前缀并下载即可。如果不是这样的话,你需要进一步挖掘。

进一步挖掘

在源代码内部,正如您可能在<param name="flashvars"... value中看到的那样,有一些配置:

代码语言:javascript
复制
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"
    }]
}

在该配置中,您将看到类似以下内容:

代码语言:javascript
复制
"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,如果您播放并尝试从这些主机加载视频,所有这些都可能工作:

  • http://cdn.sirecam.com/2009/TOYS/TOYS2009_2.flv
  • http://d103cgplnnab87.cloudfront.net/2009/TOYS/TOYS2009_2.flv
  • http://s3.sirecam.com/2009/TOYS/TOYS2009_2.flv
  • http://vdo.sirecam.com/2009/TOYS/TOYS2009_2.flv

如你所见,这是一个调查问题。然后,您可以用您喜欢的语言(Python?)开发一些脚本来执行这些步骤并下载视频。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34345044

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档