Metadata-Version: 2.1
Name: tvod
Version: 2.0.0
Summary: A package to retrieve Twitch VOD
Home-page: https://gitlab.com/jjocram/twitch-vod
License: GPL-3.0-or-later
Author: Marco Ferrati
Author-email: marco.ferrati@protonmail.com
Requires-Python: >=3.10,<4.0
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3
Requires-Dist: requests (>=2.28.0,<3.0.0)
Project-URL: Bug Tracker, https://gitlab.com/jjocram/twitch-vod/-/issues
Project-URL: Repository, https://gitlab.com/jjocram/twitch-vod
Description-Content-Type: text/markdown

# Twitch VOD
Tool to retrieve Twitch's VOD from the video ID

## Install
This package is published on PiPy at this [link](https://pypi.org/project/tvod/). Up to you choose how to install it. 

## Use as is
1. Execute the tool from a terminal 
```bash
tvod
```

2. 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`

3. It will ask at which resolution watch

4. 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` and a dictionary of resolutions from which to choss one
- `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 from the dictionary returned by `get_video_info`
  - return the url to the video at the chosen resolution

