How can I find download links for vimeo videos?

后端 未结 9 946
长发绾君心
长发绾君心 2020-12-07 21:30

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 fo

9条回答
  •  北海茫月
    2020-12-07 21:36

    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 :).

    Steps to get the video sources:

    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
    5. Then I generate the link:

      $video_link = "http://vimeo.com/moogaloop/play/clip:".$video_id."/".$request_signature."/".$request_signature_expires."/?q=".$quality."";
      
    6. Then if you are php dev, you call wget command through exec in this way

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

    7. 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]"

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

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

提交回复
热议问题