Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sogladev/record-twitch
Record Twitch.tv shows on Windows, Ubuntu 18.04+ (or similar)
https://github.com/sogladev/record-twitch
Last synced: about 1 month ago
JSON representation
Record Twitch.tv shows on Windows, Ubuntu 18.04+ (or similar)
- Host: GitHub
- URL: https://github.com/sogladev/record-twitch
- Owner: sogladev
- Created: 2019-01-12T12:10:04.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-04-07T18:52:26.000Z (9 months ago)
- Last Synced: 2024-05-09T16:12:34.048Z (8 months ago)
- Language: Python
- Homepage:
- Size: 39.1 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# record-critrole
Record Twitch.tv shows on Windows, Ubuntu 18.04+ (or similar)In essence, this is a CLI wrapper to call `streamlink`. As of writing this, it offers more reliable recordings by auto-retrying if connection is lost or the stream disconnects.
Allows you to set a duration (optional) and a time until recording (optional).
There are files with .py for both windows/linux, a linux shell .sh script + cronjob and a windows batch .bat + scheduled task.
Initially created to record [Critical Role](https://critrole.com). One feature is to parse the website http://wheniscriticalrole.com to see when the show airs.
## record.py
```
❯ python3 record.py --help
usage: record.py [-h] [-u URL] [-o OUT_DIR] [-s SLEEP_TIME] [-n] [--offset OFFSET]Process arguments
options:
-h, --help show this help message and exit
-u URL, --url URL url to twitch channel
-o OUT_DIR, --out OUT_DIR
directory where to save video
-s SLEEP_TIME, --sleep SLEEP_TIME
time to sleep in seconds before recording starts
-n, --now start recording right now
--offset OFFSET amount of minutes to start recording before stream is online. Default is 5```
## TODO
- [ ] Package with PyInstall. Has support for python3+, Windows and Linux, one file
executable
- [x] Rewriting below scripts into python only
- [x] Read time until critical role from website
- [x] Update cronjob to launch python script in virtualenv
## Requirements[Streamlink](https://github.com/streamlink/streamlink)
```
(optional) Selenium with Firefox driver to parse wheniscriticalrole.com
```
(example) python3 record.py -u twitch.tv/criticalrole -w 3600 -o outdir
```
Omitting `-n` or `-w` option defaults to using Selenium to parse the above
mentioned website and gets the most accurate time automatically. You will need
Selenium and a Firefox driver available in your Path