Downloading Videos from Vimeo
You have a lecture series hosted on Vimeo, but are travelling to an area of poor internet — so what do you do?
Use your programming knowledge to download all the videos in advance of course!
Be it a flight, or you just want the videos for reference, there are many occasions where programatically downloading everything can be of use. This page describes how to do just that.
1. Get a list of your video urls
The first step is to extract a list of all urls we intend to use. For instance to get all the ‘next up’ videos in a page we may use the following javascript snippet within the console:
[...document.querySelectorAll('a[class="iris_link iris_link--gray-1"]')].map(d=>[d.href,d.innerText])
We can then take this list and paste it into a text file.
2. Using the Vimeo downloader.
We begin by installing it with
pip install vimeo_downloader
Next we load it into python and read our video:
from vimeo_downloader import Vimeo
url = "https://vimeo.com/261491481"
id = int(url.split('/')[-1])
v = Vimeo.from_video_id(video_id=str(id))