Giter Club home page Giter Club logo

switchtube-dl's Introduction

switchtube-dl

A simple CLI for downloading videos from SwitchTube.

This makes it a lot more convenient to consume the videos on-demand when you're offline.

contributions welcome Release CI

Features

  • Download videos by their video id
  • Videos from channels can be downloaded selectively with interactive mode (default)
  • All videos can be downloaded from channels non interactively
  • Videos that are already downloaded can be skipped

Installation Powered By: dotnet-releaser

Linux

Arch Linux

Install it with your favourite AUR helper. For example:

pamac install switchtube-dl-bin
# or:
yay -S switchtube-dl-bin

Debian

Download the .deb package for your architecture from the latest release and install it with your package manager.

macOS

brew install panmona/panmona/switchtube-dl

Windows

Download the latest windows release zip for your architecture. If you aren't sure about your architecture, you're most likely going to have success with win-x64.zip.

Unzip it and put the .exe in an appropriate place. For easier access, make sure that this place is contained in your PATH variable.

If Emoji are not displaying correctly in your terminal refer to this documentation.

Getting Started

After installation generate an API Token from your SwitchTube Profile and save it to an appropriate place.

You will need this token for every download that you run.

Usage

Please note that you should be gentle when downloading videos in parallel as noted in the official API docs:

Please be gentle with the servers because hammering the web service will also decrease performance of the web site.


USAGE: switchtube-dl [--help] [--video <video id>] [--channel <channel id>] [--token <token>] [--path <path>] [--skip]
                     [--force] [--all] [--version]

OPTIONS:

    --video, -v <video id>
                          Download type. Downloads a specific video. Prioritized if multiple download types are given
    --channel, -c <channel id>
                          Download type. Download videos from this channel. Starts in interactive mode if no filter
                          option is given
    --token, -t <token>   Token to access the SwitchTube API. Generate a token at
                          https://tube.switch.ch/access_tokens
    --path, -p <path>     Paths to download videos to (defaults to current dir). The path must already exist.
    --skip, -s            Existing file handling option. Skip download of already existing files. Prioritized if
                          multiple existing file options are given
    --force, -f           Existing file handling option. Overwrite already existing files
    --all, -a             Filter option. Downloads all videos in a channel
    --version             Display the current version.
    --help                display this list of options.

Download a video

switchtube-dl -v 123456

Channel download

switchtube-dl -c 123456

It will per default start in interactive mode and output a table of all videos in this channel:

Index │ Title              │ Duration │    Date
──────┼────────────────────┼──────────┼────────────
    1 │ Video A            │ 00:09:39 │ 2020-07-08
    2 │ Video B            │ 00:09:39 │ 2020-09-09
    3 │ Video C            │ 00:15:16 │ 2020-09-09
    4 │ Video D            │ 00:11:45 │ 2020-09-09
    5 │ Video E            │ 00:06:04 │ 2020-09-09
    6 │ Video F            │ 00:08:16 │ 2020-09-09
    7 │ Video G            │ 00:12:25 │ 2021-11-30
    8 │ Video H            │ 00:11:12 │ 2022-02-07
    9 │ Video I            │ 01:03:00 │ 2022-02-09

To choose which videos to download, specify indices of the videos separated by commas like: 1,4,5,6 if you want to download the videos indexed 1,4,5,6 of the channel.

You can specify a range, for example 1-3,5,7-9 will download the videos at index 1, 2, 3, 5, 7, 8 and 9.

Filter options

If you don't want to use interactive mode for the channel download there are the following filter options:

All videos

With -a or --all all videos in the channel are downloaded.

Global options

Existing file handling

Per default the CLI exits when it notices that a file already exists under the same name. If you want a different behavior there are two strategies defined.

Overwrite

If already existing files should be overwritten use -f or --force.

Skip

If already existing files should be skipped use -s or --skip. If both options are provided skip is prioritized.

Path

Per default the files are downloaded to the directory from where the CLI is invoked. If you want to provide a different path use -p or --path. This path must be absolute and exist.

Related

Teletube: If you need upload access to SwitchTube

Contributing

Any type of feedback, pull request or issue is welcome.

See CONTRIBUTING.md for ways to get started.

License

MIT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.