Package: vimeo-downloader
Vimeo DownloaderDownloads Vimeo videos and retrieve metadata such as views, likes, comments, duration of the video.FeaturesInstallationUsageMetadataDownload videoDownload embed only videosDownloading videos that require loginDownload with video IDExamplesFeaturesEasy to use and friendly API.Support for downloading private or embed only Vimeo videos.Retrieve direct(.mp4 file) URL for the video.Uses type-hints for better editor autocompletionRetrieve metadata such as views, likes, comments, duration of the videoTested for python 3.6 and aboveInstallationpipinstallvimeo_downloaderor download the latest version:pipinstallgit+https://github.com/yashrathi-git/vimeo_downloaderUsage>>fromvimeo_downloaderimportVimeo>>v=Vimeo('https://vimeo.com/503166067')Metadata>>meta=v.metadata>>meta.title"We Don't Have To Know - Keli Holiday">>meta.likes214>>meta.views8039>>meta._fields# List of all meta data fields('id','title','description'...)# Truncated for readabilityDownload video>>s=v.streams>>s[Stream(240p),Stream(360p),Stream(540p),Stream(720p),Stream(1080p)]>>best_stream=s[-1]# Select the best stream>>best_stream.filesize'166.589421 MB'>>best_stream.direct_url'https://vod-progressive.akamaized.net.../2298326263.mp4'>>best_stream.download(download_directory='DirectoryName',filename='FileName')# Download video with progress bar and other information,# to disable this behaviour use mute=TrueDownloading embed only videos>>fromvimeo_downloaderimportVimeo>>v=Vimeo('https://player.vimeo.com/video/498617513',embedded_on='https://atpstar.com/plans-162.html')For embed only videos, also provide embedded_on parameter to specify the URL on which video is embedded without query
parameters.>>v.streams[Stream(240p),Stream(360p),Stream(540p),Stream(720p),Stream(1080p)]>>v.streams[-1].download(download_directory='DirectoryName',filename='FileName')# Downloads the best stream with progress bar and other information,# to disable this behaviour use mute=TrueDownloading videos that require loginIt uses cookie to authenticate. You could get cookie like this:While logged into your account, go to the video URL. Press Command + Shift + C or Control + Shift + C to get to
developer tools. Go to network tab and reload the page. You would see all requests that were made. Click on the top
one (request made to same URL you're on) and scroll down to "Request Headers", there you would find cookie parameter,
copy its value.fromvimeo_downloaderimportVimeocookies="""cookie""".strip()v=Vimeo(url="URL",cookies=cookies,)best_stream=v.best_streammp4_url=best_stream.direct_urltitle=best_stream.title## Downloadbest_stream.download()Download video with video ID(New in 0.3.2)
If the above methods, don't work it, you would most likely be able to download video using its vimeo video ID.fromvimeo_downloaderimportVimeo# url: https://vimeo.com/79761619# video ID: '79761619'v=Vimeo.from_video_id(video_id='79761619')Examples1. Downloading embed only videosembedded_onis the URL of site video is embedded on without query parameters.fromvimeo_downloaderimportVimeo# Replace these two variables to different URL to download that videovimeo_url='https://player.vimeo.com/video/498617513'embedded_on='https://atpstar.com/plans-162.html'# embedded_on is  the URL of site video is embedded on without query parameters.v=Vimeo(vimeo_url,embedded_on)stream=v.streams# List of available streams of different quality# >> [Stream(240p), Stream(360p), Stream(540p), Stream(720p), Stream(1080p)]# Download best streamstream[-1].download(download_directory='video',filename='test_stream')# Download video of particular quality, example '540p'forsinstream:ifs.quality=='540p':s.download(download_directory='video',filename='test_stream')breakelse:# If loop never breaksprint("Quality not found")2. Downloading a list of videosfromvimeo_downloaderimportVimeo# Replace these with other list of videos you want to downloadvideos=['https://vimeo.com/440801455','https://vimeo.com/504420495','https://vimeo.com/481277944']forvideoinvideos:v=Vimeo(video)stream=v.streams# List of available streams of different quality# Selecting and downloading '720p' videoforsinstream:ifs.quality=='720p':s.download(download_directory='video',filename=v.metadata.title)breakelse:# If the loop never breakprint('quality not found')LicenseDistributed under the MIT licence. ReadLICENSEfor more informationhttps://github.com/yashrathi-git/vimeo_downloader/blob/main/LICENCE