Giter Site home page Giter Site logo

sdl's Introduction

sdl

Download multiple episodes from streaming sites

Warning: This project has been only tested on Linux, and is generally not well tested.

Supported sites

English

German

Supported extractors

  • Filemoon
  • MyCloud
  • Streamtape
  • Vidoza
  • Vidplay
  • Voe

Usage

Downloading a single episode

By URL:

sdl 'https://aniwave.to/watch/yuruyuri.p6q/ep-11'

By specifying it explicitly:

sdl -e 11 'https://aniwave.to/watch/yuruyuri.p6q'

Downloading an entire season

By URL:

sdl 'https://aniwave.to/watch/yuruyuri.p6q'
sdl 'https://aniworld.to/anime/stream/yuruyuri-happy-go-lily/staffel-2'
sdl 'https://aniworld.to/anime/stream/yuruyuri-happy-go-lily/filme'

By specifying it explicitly:

sdl -s 2 'https://aniworld.to/anime/stream/yuruyuri-happy-go-lily'
sdl -s 0 'https://aniworld.to/anime/stream/yuruyuri-happy-go-lily'

Downloading multiple episodes

sdl -e 1,2-6,9 'https://aniwave.to/watch/yuruyuri.p6q'

Downloading multiple seasons

sdl -s 1-2,4 'https://aniworld.to/anime/stream/yuruyuri-happy-go-lily'

Downloading all seasons

sdl 'https://aniworld.to/anime/stream/yuruyuri-happy-go-lily'

Downloading in other languages

sdl -t gersub 'https://s.to/serie/stream/higurashi-no-naku-koro-ni/staffel-1/episode-1'
sdl -t engdub 'https://aniwave.to/watch/case-closed.myz/ep-1'

Either dub or sub:

sdl -t ger 'https://s.to/serie/stream/higurashi-no-naku-koro-ni/staffel-1/episode-1'
sdl -t german 'https://s.to/serie/stream/higurashi-no-naku-koro-ni/staffel-1/episode-1'

If an episode has multiple languages, the general language preference is as follows:

  • English Anime Website: EngSub > EngDub
  • German Anime Website: GerDub > GerSub > EngSub > EngDub
  • German non-Anime Website: GerDub > GerSub > EngDub > EngSub

Downloading with extractor directly

sdl -u 'https://streamtape.com/e/DXYPVBeKrpCkMwD'
sdl -u=voe 'https://prefulfilloverdoor.com/e/8cu8qkojpsx9'

Help output

Usage: sdl [OPTIONS] <URL>

Arguments:
  <URL>  Download URL

Options:
      --type <VIDEO_TYPE>
          Only download specific video type [possible values: raw, dub, sub]
      --lang <LANGUAGE>
          Only download specific language [possible values: english, german]
  -t <TYPE_LANGUAGE>
          Shorthand for language and video type
  -e, --episodes <RANGES>
          Only download specific episodes
  -s, --seasons <RANGES>
          Only download specific seasons
  -u, --extractor[=<NAME>]
          Use underlying extractors directly
  -N, --concurrent-downloads <INF|NUMBER>
          Concurrent downloads [default: 5]
  -r, --retries <INF|NUMBER>
          Number of download retries [default: 5]
      --ddos-wait-episodes <NEVER|NUMBER>
          Amount of requests before waiting [default: 4]
      --ddos-wait-ms <MILLISECONDS>
          The duration in milliseconds to wait [default: 60000]
      --mpv
          Play in mpv
  -d, --debug
          Enable debug mode
  -h, --help
          Print help
  -V, --version
          Print version

Notes

If FFmpeg and ChromeDriver are not found in the PATH, they will be downloaded automatically.

Also, I don't plan to add new sites or extractors, but you're welcome to create a Pull Request if you want to add one.

By the way, it's also possible to use sdl as a library.

Build from source

Currently, Rust 1.75 or newer is required.

cargo build --release

The resulting executable is found at target/release/sdl.

Thanks

sdl's People

Contributors

funami580 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sdl's Issues

Request: add support for Firefox (and other WebDrivers)

I would very much like support to be added for Firefox. geckodriver is a Rust crate to that allows the use of W3C WebDriver interface so it shouldn't be a huge effort to add support.

There are also other browsers with WebDriver support so being able to specify which backend to use would be ideal.

Bug: CHROME_VERSION is hardcoded

The problem with hardcoding CHROME_VERSION to 116 is that if you don't have Chrome 116 installed (which is old) then it aborts entirely.

$ ./sdl-0.1.0-linux-x64 --type dub --lang english https://aniwave.to/watch/psycho-pass.mpp/ep-1
12:26:45.547 ERROR > Failed to create ChromeDriver: could not connect to ChromeDriver: error creating new session: webdriver did not create session: session not created: This version of ChromeDriver only supports Chrome version 121
Current browser version is 116.0.5845.96 with binary path /home/gravis/.cache/selenium/chrome/linux64/116.0.5845.96/chrome: webdriver did not create session: session not created: This version of ChromeDriver only supports Chrome version 121
Current browser version is 116.0.5845.96 with binary path /home/gravis/.cache/selenium/chrome/linux64/116.0.5845.96/chrome

Fails to detect anti-automation pages with VPN

The site aniwave.to, employs anti-automation protection which I believe is through cloudfront. As a result, sdl fails entirely.

$ ./sdl-0.1.1-linux-x64 --type dub --lang english https://aniwave.to/watch/psycho-pass.mpp/ep-1
13:24:22.792 ERROR > Failed to get series info: failed to find title: an element could not be located on the page using the given search parameters: no such element: Unable to locate element: {"method":"css selector","selector":"h1.title"}
  (Session info: chrome=116.0.5845.96)

[BUG] Not compiling

The program is not able to compile. It either throws async errors and it not being supported or if its removed then everything else cries. Also could you possibly provide pre-built binaries for windows?

Could not compile

Hi, tried to build, but failed at very near the end with the following error.

I'm wondering if the architecture is the reason (ubuntu arm, it's a VM running on Macbook M2)

Thanks.

=====

ubuntu@u22arm:~/tmp/sdl-main$ cargo build --release
Compiling sdl v0.1.1 (/home/ubuntu/tmp/sdl-main)
error: could not compile sdl (bin "sdl")

Caused by:
process didn't exit successfully: rustc --crate-name sdl --edition=2021 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=132 --crate-type bin --emit=dep-info,link -C opt-level=3 -C lto -C metadata=0c6589e8e568307e -C extra-filename=-0c6589e8e568307e --out-dir /home/ubuntu/tmp/sdl-main/target/release/deps -L dependency=/home/ubuntu/tmp/sdl-main/target/release/deps --extern anyhow=/home/ubuntu/tmp/sdl-main/target/release/deps/libanyhow-54a2f3d0fbc096cd.rlib --extern arc4=/home/ubuntu/tmp/sdl-main/target/release/deps/libarc4-028fe8b89be3c2a8.rlib --extern async_compression=/home/ubuntu/tmp/sdl-main/target/release/deps/libasync_compression-b146b700b3a67837.rlib --extern base64=/home/ubuntu/tmp/sdl-main/target/release/deps/libbase64-b023df15ea65ba3a.rlib --extern bitmask_enum=/home/ubuntu/tmp/sdl-main/target/release/deps/libbitmask_enum-0d0f2720da0a63ba.so --extern bytes=/home/ubuntu/tmp/sdl-main/target/release/deps/libbytes-c242f5acbaf95594.rlib --extern chrono=/home/ubuntu/tmp/sdl-main/target/release/deps/libchrono-fded116b9000ea27.rlib --extern clap=/home/ubuntu/tmp/sdl-main/target/release/deps/libclap-bcc8911e020ebd27.rlib --extern console=/home/ubuntu/tmp/sdl-main/target/release/deps/libconsole-2b5fcc207606590d.rlib --extern dirs=/home/ubuntu/tmp/sdl-main/target/release/deps/libdirs-882c5f94f3298b47.rlib --extern enum_iterator=/home/ubuntu/tmp/sdl-main/target/release/deps/libenum_iterator-9219f1dfa31278f9.rlib --extern enum_dispatch=/home/ubuntu/tmp/sdl-main/target/release/deps/libenum_dispatch-54f3cb61fbfc66f3.so --extern env_logger=/home/ubuntu/tmp/sdl-main/target/release/deps/libenv_logger-f4025020b03c70c0.rlib --extern form_urlencoded=/home/ubuntu/tmp/sdl-main/target/release/deps/libform_urlencoded-6ded446262bb48c0.rlib --extern futures_util=/home/ubuntu/tmp/sdl-main/target/release/deps/libfutures_util-24c437ddec6ac079.rlib --extern indicatif=/home/ubuntu/tmp/sdl-main/target/release/deps/libindicatif-01fe64cdc4fc2bdd.rlib --extern interprocess=/home/ubuntu/tmp/sdl-main/target/release/deps/libinterprocess-d5bd29ed6eb3a3cf.rlib --extern log=/home/ubuntu/tmp/sdl-main/target/release/deps/liblog-d2b95f987322e45d.rlib --extern m3u8_rs=/home/ubuntu/tmp/sdl-main/target/release/deps/libm3u8_rs-89d21408237b73fb.rlib --extern number_prefix=/home/ubuntu/tmp/sdl-main/target/release/deps/libnumber_prefix-ee6b45e4e1af84d7.rlib --extern once_cell=/home/ubuntu/tmp/sdl-main/target/release/deps/libonce_cell-531a412119426094.rlib --extern pathsearch=/home/ubuntu/tmp/sdl-main/target/release/deps/libpathsearch-eaae3cfca6f0a336.rlib --extern portpicker=/home/ubuntu/tmp/sdl-main/target/release/deps/libportpicker-9e1e9e154bf311d3.rlib --extern rand=/home/ubuntu/tmp/sdl-main/target/release/deps/librand-8ba3918d9dd1ea58.rlib --extern regex=/home/ubuntu/tmp/sdl-main/target/release/deps/libregex-e8c1e2bc84d19fb5.rlib --extern reqwest=/home/ubuntu/tmp/sdl-main/target/release/deps/libreqwest-c14a21aadf4717bc.rlib --extern reqwest_partial_retry=/home/ubuntu/tmp/sdl-main/target/release/deps/libreqwest_partial_retry-b989f11e579a0844.rlib --extern reqwest_retry=/home/ubuntu/tmp/sdl-main/target/release/deps/libreqwest_retry-f9ea234a2b4607e6.rlib --extern rust_lapper=/home/ubuntu/tmp/sdl-main/target/release/deps/librust_lapper-e356eb957ba5a192.rlib --extern sdl=/home/ubuntu/tmp/sdl-main/target/release/deps/libsdl-d5f0e7ece60a4d46.rlib --extern selenium_manager=/home/ubuntu/tmp/sdl-main/target/release/deps/libselenium_manager-bf3033286f977836.rlib --extern serde_json=/home/ubuntu/tmp/sdl-main/target/release/deps/libserde_json-07a6b194da1a89c5.rlib --extern thirtyfour=/home/ubuntu/tmp/sdl-main/target/release/deps/libthirtyfour-72cafb47e2dc4ffc.rlib --extern tokio=/home/ubuntu/tmp/sdl-main/target/release/deps/libtokio-e52b12d274e35cb6.rlib --extern tokio_stream=/home/ubuntu/tmp/sdl-main/target/release/deps/libtokio_stream-f1980b766e1c1e32.rlib --extern tokio_util=/home/ubuntu/tmp/sdl-main/target/release/deps/libtokio_util-fb514641120857bb.rlib --extern url=/home/ubuntu/tmp/sdl-main/target/release/deps/liburl-64aa0bccd23be04e.rlib --extern zip_extensions=/home/ubuntu/tmp/sdl-main/target/release/deps/libzip_extensions-edf9374c60bd5f3e.rlib -L native=/home/ubuntu/tmp/sdl-main/target/release/build/ring-b74a361f9bd4c2d9/out -L native=/home/ubuntu/tmp/sdl-main/target/release/build/bzip2-sys-6c783adcbb6f3c62/out/lib -L native=/home/ubuntu/tmp/sdl-main/target/release/build/lzma-sys-dae25baaafb040d8/out -L native=/home/ubuntu/tmp/sdl-main/target/release/build/zstd-sys-6ea88b3c54656a22/out (signal: 9, SIGKILL: kill)

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.