如何找到 vimeo 视频的下载链接? [英] How can I find download links for vimeo videos?

查看:100
本文介绍了如何找到 vimeo 视频的下载链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到今天 vimeo 改变了他们播放视频的方式,我不能再播放他们的视频了.我在生成视频链接时看到了这一点,例如:

I saw that today vimeo changed the way they are streaming the videos and I can't stream their videos anymore. I saw that when I generate the link to the video, which was for example:

http://vimeo.com/moogaloop/play/clip:6649390/1eab2a25f30f1aadaf5e306d0f40fd6c/1292498602/?q=hd

它将我重定向到一个页面,上面写着权限被拒绝".我尝试使用 curl,但没有任何成功.我嗅探了流量,我看到它来自以下内容:

It's redirecting me to a page saying "Permission denied". I tried using curl, but without any success. I sniffed the traffic and I saw that it's streaming from something like:

http://av.vimeo.com/02047/623/34209065.mp4?token=1292496582_34de09a6d13212cf26af08357d311c30

有人知道如何获取视频文件的工作网址吗?

Does anybody know how to get the working URL to the video file?

我目前获取视频的方式是:

The way I'm getting the videos at the moment is:

  1. 选择链接http://vimeo.com/video_id.
  2. 仅获取video_id.
  3. 获取视频的 XML http://vimeo.com/moogaloop/load/clip:video_id;.
  4. 解析 XML 并找到必要的信息:

  1. Choose link http://vimeo.com/video_id.
  2. Get only the video_id.
  3. Get the XML for the video http://vimeo.com/moogaloop/load/clip:video_id;.
  4. parse the XML and find the necessary information:

  • request_signature
  • request_signature_expires
  • isHD

生成链接:

$video_link = "http://vimeo.com/moogaloop/play/clip:".$video_id."/".$request_signature."/".$request_signature_expires."/?q=".$quality."";

如果我通过浏览器手动执行此操作,它可以工作,但如果我通过脚本执行此操作,则不会.

If I do this manually through the browser it works, but if I do it through the script it doesn't.

推荐答案

在花了几个小时寻找如何获得 vimeo 的直接链接后,我找到了一个很好的解决方案.所以这里是那些想要直接从 vimeo 下载和流式传输视频 src 的用户的步骤.请记住,他们会阻止所有 IP 地址以及可能以这种方式下载视频的主机,所以我只是停止使用他们的服务,以后再也不会使用它们了 :)

After spending a few hours on finding out how I can get the direct link to vimeo I found a good solution. So here are the steps for the users who want to download and stream video src directly from vimeo. Keep in mind that they block all IP addresses and probably hosts which are downloading the videos in this way, so I just stopped using their services and I will never use them again :).

获取视频源的步骤:

  1. 选择链接http://vimeo.com/video_id
  2. 只获取video_id
  3. 获取视频的 xml http://vimeo.com/moogaloop/load/clip:video_id;
  4. 解析 xml,我找到了我需要的必要信息:

  1. choose link http://vimeo.com/video_id
  2. get only the video_id
  3. get the xml for the video http://vimeo.com/moogaloop/load/clip:video_id;
  4. parse the xml and I find the necessary information I need:

  • request_signature
  • request_signature_expires
  • isHD

然后我生成链接:

$video_link = "http://vimeo.com/moogaloop/play/clip:".$video_id."/".$request_signature."/".$request_signature_expires."/?q=".$quality."";

  • 那如果你是php dev,就这样通过exec调用wget命令

  • Then if you are php dev, you call wget command through exec in this way

    exec("wget -b '$video_link' -a 'wget.log' -O -");

    然后您阅读日志并找到您要查找的链接.您可以简单地解析日志文件.直接链接位于位置:"和[以下]"之间

    Then you read the log and find out the link you are looking for. You can simply parse the log file. The direct link is between "Location: " and "[following]"

    您返回直接链接并清理日志文件:)

    You return the direct link and clean the log file :)

    注意:再次记住,这不会永远有效.他们迟早会封锁你的 IP :).

    NOTE: keep in mind again that this won't work forever. Sooner or later they will block your ip :).

    这篇关于如何找到 vimeo 视频的下载链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆