Skip to main content

Download videos and retrieve metadata from Vimeo.

Project description

Vimeo Downloader

Features

Downloads Vimeo videos and retrieve metadata such as views, likes, comments, duration of the video.

  • Easy 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 autocompletion
  • Retrieve metadata such as views, likes, comments, duration of the video

Installation

pip install vimeo_downloader

Examples

1. Downloading embed only videos

embedded_on is the URL of site video is embedded on without query parameters.

from vimeo_downloader import Vimeo

# Replace these two variables to different URL to download that video
vimeo_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 stream
stream[-1].download(download_directory = 'video', filename = 'test_stream')

# Download video of particular quality, example '540p'
for s in stream:
	if s.quality == '540p':
		s.download(download_directory = 'video', filename = 'test_stream')
		break
else: # If loop never breaks
    print("Quality not found")

2. Downloading a list of videos

from vimeo_downloader import Vimeo

# Replace these with other list of videos you want to download
videos = ['https://vimeo.com/440801455',
		 'https://vimeo.com/504420495',
		 'https://vimeo.com/481277944']

for video in videos:
	v = Vimeo(video)
	stream = v.streams # List of available streams of different quality

	# Selecting and downloading '720p' video
	for s in stream:
		if s.quality == '720p': 
			s.download(download_directory = 'video', filename = v.metadata.title)
			break
	else: # If the loop never break
		print('quality not found')

Usage

>>> from vimeo_downloader import Vimeo
>>> v = Vimeo('https://vimeo.com/503166067')

Metadata

>>> meta = v.metadata
>>> meta.title
"We Don't Have To Know - Keli Holiday"
>>> meta.likes
214
>>> meta.views
8039
>>> meta._fields # List of all meta data fields
('id', 'title', 'description'...) # Truncated for readability

Download stream

>>> 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=True

Downloading private or embed only videos

>>> from vimeo_downloader import Vimeo
>>> 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=True

License

Distributed under the MIT licence. Read LICENSE for more information https://github.com/yashrathi-git/vimeo_downloader/blob/main/LICENCE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vimeo_downloader-0.2.3.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

vimeo_downloader-0.2.3-py2.py3-none-any.whl (6.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file vimeo_downloader-0.2.3.tar.gz.

File metadata

  • Download URL: vimeo_downloader-0.2.3.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5

File hashes

Hashes for vimeo_downloader-0.2.3.tar.gz
Algorithm Hash digest
SHA256 064017b40ab4e3346c3b3106e32228bc5ee825706572eab4f1251dc09f728afe
MD5 089e785f1aa71043a95d36c14e9532ba
BLAKE2b-256 c47029b3b00c63fc506b0375ff0c5763f7b22ecb56cace6173d6bdae06224deb

See more details on using hashes here.

Provenance

File details

Details for the file vimeo_downloader-0.2.3-py2.py3-none-any.whl.

File metadata

  • Download URL: vimeo_downloader-0.2.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5

File hashes

Hashes for vimeo_downloader-0.2.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 82991caf05af44c18a7a2ec264c3a410965b6b0e647000124b4a6baf2e2a04c7
MD5 e4bcd78bf161261ce49a35652fb21111
BLAKE2b-256 70a61852929b68b6c1666c5a3181c55b4b2e35cea56ad86713f200113d2a2af1

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page