Skip to main content

A package to retrieve Twitch VOD

Project description

Twitch VOD

Tool to retrieve Twitch's VOD from the video ID

Install

This package is published on PyPi at this link. Up to you choose how to install it.

Use as is

  1. a client_id and a client_secret are required in order to use this tool. Check here on how to get them. Set them as environment variables:
  • export client_id=<YOUR CLIENT ID>
  • export client_secret=<YOUR CLIENT SECRET>
  1. Execute the tool from a terminal
tvod
  1. It will ask the video ID (you can find it in twitch's video page). In this (https://www.twitch.tv/videos/1234567890) case the ID is 1234567890

  2. It will ask at which resolution watch

  3. It will use your browser to watch it.

Use as package

You can import it in your python script. The available methods are:

  • get_video_info(video_id, video_info_error_handler)
    • video_id: is the id of the twich vod you want to retrieve the info
    • video_info_error_handler: is a function (a lambda is good) that will be called if something goes wrong
    • returns the url to pass to the fuction get_video_url
  • get_video_url(animated_preview_url, resolution_name)
    • animated_preview_url: is the returned url by get_video_info
    • resolution_name: is the key of the chosen resolution. Some examples are:
      • 360p60
      • 720p60
      • ...
    • return the url to the video at the chosen resolution

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

tvod-2.0.1.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tvod-2.0.1-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file tvod-2.0.1.tar.gz.

File metadata

  • Download URL: tvod-2.0.1.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.1 CPython/3.11.2 Darwin/22.4.0

File hashes

Hashes for tvod-2.0.1.tar.gz
Algorithm Hash digest
SHA256 e54e186e27e6e8c43592836678d7cca6558a66231e2713cc3c3bf6a3ad8124b6
MD5 cd73f3c3a129b1d99c1603e1ae750bf3
BLAKE2b-256 4f066f146bc91baf202af0e90ed53349d5f17a5b5331cfc51e5f17e358e07b3b

See more details on using hashes here.

File details

Details for the file tvod-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: tvod-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.1 CPython/3.11.2 Darwin/22.4.0

File hashes

Hashes for tvod-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 932faf5de27d141841d4bbee0ddc20cf0d55ff9126c20dc7f63ba5541209d243
MD5 f8ed3605caf881748dac9155d2e3f220
BLAKE2b-256 1020afc5e721444cc1a3a2c2b924e609ff51b24a275c30b445a9b00cf784cdff

See more details on using hashes here.

Supported by

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