twitch-video-downloader

command module
v0.0.0-...-3f1886c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 1, 2024 License: MIT Imports: 13 Imported by: 0

README

Twitch Video Downloader

Script that downloads the last VOD from a Twitch channel and uploads it to a private Google Drive. It requires TwitchDownloader installed on your machine.

Why?

  • I want to play with Go
  • I want to download the previous night VOD of a streamer to watch it while commuting, since the connection in the train is bad...

Prerequisites

  • Install Go
  • Install TwitchDownloader
  • On Twitch
    • Register a new application from the dev portal
    • Note down the client id and client secret
  • On Google Cloud
    • Create a new project from the Google Cloud Console
    • Add the private Gmail user address to the test users
    • Add the Google Drive API service
    • Create a service account
    • Generate and store a JSON key for that account

Clone the project

git clone https://github.com/pippokairos/twitch-video-downloader.git

Set the environment variables

Just copy the .env.example file to .env and fill the variables.

Build the executable

go build

Run the script

./twitch-video-downloader

With options:

Option Description Required Default
`-name` The Twitch channel name True
`-quality` Set the video quality False 720p60
`-start` Set the video start time in seconds False 0
`-end` Set the video end time in second False [last second]

Example:

./twitch-video-downloader -name dada -quality 360p -start 3600 -end 7200

Note: the script will delete all the other files from that channel

TwitchDownloaderCLI 1.53.2 Copyright (c) 2019 lay295 and contributors
[STATUS] - Fetching Video Info [1/5]
[STATUS] - Downloading 100% [2/5]
[STATUS] - Verifying Parts 100% [3/5]
[STATUS] - Combining Parts 100% [4/5]
[STATUS] - Finalizing Video 100% [5/5]
Parent folder found
File uploaded successfully. File ID: 4FNVZGhWFCIxDFthAj_OPUKJ1WN50oYel
File shared successfully with example@gmail.com
Old file deleted successfully: Dada - Un 2023 strano ma pieno di cutzi !minecraft | !zabayo !prime !airbnb !mods.mp4

Contribute...?

This is just a very simple application I wrote to play with Go, there are already more complete solutions out there and I'm not aiming to expand this library's capabilities so there's no guideline for contributing. But hey, if you'd like to make additions, feel free to do so.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL