cyberdrop-dl - cyberdrop.me Downloader written in Rust 🦀

Overview

cyberdrop-dl - cyberdrop.me Downloader written in Rust 🦀

cyberdrop-dl_demo

This is my own https://cyberdrop.me album downloader, written in Rust as an exercise. It is my new favorite language <3 .

Usage

  • Download single album
$ cyberdrop-dl https://cyberdrop.me/a/album1
  • Download multiple albums
$ cyberdrop-downloader albums.txt
  • or
$ cyberdrop-dl https://cyberdrop.me/a/album1 https://cyberdrop.me/a/album2

Files are saved in current working directory named 'cyberdrop-dl/'.

How to install

Install using cargo. Get it @ https://rustup.rs/ if you don't have it installed

It's that simple

$ cargo install cyberdrop-dl

Docker one-liner

No need to build and install via Docker

$ docker run -it --rm -v "$(pwd)"/cyberdrop-dl:/cyberdrop-dl:rw wmw9/cyberdrop-dl cyberdrop-dl https://cyberdrop.me/a/album

TODO

  • Download multiple albums simultaneously
  • Accept list of albums.txt via URL
  • Custom destination directory via -o flag
Comments
  • Unable to download

    Unable to download

    Downloading starts off real smooth, and about half of the images in the album is downloaded. However the speed of the download significantly decreases, almost to nil. Additionally, this error appears periodically: image

    If the problem is on my side, help would be very much appreciated. In any case, I really like this downloader as opposed to the other ones available. TYIA!

    opened by sonofthehunt 8
  • Automated builds

    Automated builds

    I have never touched rust so maybe you could identify the issue.

    I was trying to make an actions workflow to automatically generate builds for linux, windows, and mac to make it easier for people to get the tool up and running. I was able to confirm that the generated windows build works but the linux build, and probably the mac build too, throws an error about tokio:

    [email protected] /tmp/releasetmp # RUST_BACKTRACE=1 ./cyberdrop-dl https://cyberdrop.me/a/1
    Albums to download: 1
         Overall [░░░░░░░░░░░░░░░░░░░░ 0/1]
    thread 'tokio-runtime-worker' panicked at 'Error creating dir: Not a directory (os error 20)', /project/src/lib.rs:188:29
    stack backtrace:
    note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
    thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: JoinError::Panic(...)', /project/src/lib.rs:65:17
    stack backtrace:
    Done!
    

    The /project/.... is from the github actions server, it kept that structure for some reason.

    You can find the builds here https://github.com/cyberdrop-me/cyberdrop-dl/releases/tag/v0.3.1 and here's the workflow file https://github.com/cyberdrop-me/cyberdrop-dl/blob/main/.github/workflows/release.yml

    I had to add a package to the Cargo.toml here https://github.com/cyberdrop-me/cyberdrop-dl/blob/main/Cargo.toml#L25 because the mac & linux build kept complaining about this error https://github.com/sfackler/rust-openssl/issues/1021

    opened by cyberdrop-me 4
  • Semaphore is immediately released after acquiring it

    Semaphore is immediately released after acquiring it

    Hey!

    There are two instances of the following line in the code:

    let _ = sem_clone.acquire().await.unwrap();
    

    This will acquire the semaphore permit and immediately drop it, as let _ does not actually bind the value (it's ignored). This means that may be more concurrent downloads happening than planned.

    A quick fix would be let _permit = sem_clone.acquire().await.unwrap();, then it'd be dropped at the end of the scope. Note that you may need to increment the batch size to keep the current download speed.

    Also, I personally find it better to name ignored variables, such as let _result = download_album [..] (line 61) and let _count = io::copy [...] (line 127), making it easier (when reading) to know what's being ignored.

    References on _ not binding:

    The Rust Programming Language: Ignoring an Entire Value with _ https://github.com/rust-lang/rust/issues/40096

    opened by pheki 1
  • 🎉 Generate prebuilt releases with GH Actions

    🎉 Generate prebuilt releases with GH Actions

    Actions workflow to build & upload binaries for Linux, Windows, and Mac whenever you create a new GitHub release.

    For them most part the builds should work for almost everyone. Still have no clue if the mac build actually works but I assume so.

    Tested on:

    Windows 10
    Fedora 35, 34, 33, 32
    Ubuntu LTS 21, 20, 18, 16
    Debian 11, 10
    CentOS 8
    openSUSE 15.3
    Arch Linux 2021.09.01
    
    opened by cyberdrop-me 0
  • file name too long

    file name too long

    Im trying to download an album but its stopping and throwing out errors. I assume its the file name being too long?


    thread 'tokio-runtime-worker' panicked at 'called Result::unwrap() on an Err value: Os { code: 63, kind: FilenameTooLong, message: "File name too long" }', /Users/chrisgray/.cargo/registry/src/github.com-1ecc6299db9ec823/cyberdrop-dl-0.3.2/src/lib.rs:126:62 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace thread 'tokio-runtime-worker' panicked at 'called Result::unwrap() on an Err Overall [░░░░░░░░░░░░░░░░░░░░ 0/1] thread 'tokio-runtime-worker' panicked at 'called Result::unwrap() on an Err value: JoinError::Panic(...)', /Users/chrisgray/.cargo/registry/src/github.com

    opened by manlikechrisgray 0
Owner
wmw
wmw
nhdl - a command-line doujinshi downloader client built in rust!

nhdl nhdl - a command-line doujinshi downloader client built in rust! goals fast and asynchronous doujinshi downloader, supporting various doujinshi s

Lumine 2 Aug 24, 2022
A command-line downloader for sites archived on the Wayback Machine

This is a small command-line utility I wrote to help with browsing archived websites from the Wayback Machine, which can sometimes be pretty slow.

Jonas Schievink 7 Aug 29, 2021
Rust Imaging Library's Python binding: A performant and high-level image processing library for Python written in Rust

ril-py Rust Imaging Library for Python: Python bindings for ril, a performant and high-level image processing library written in Rust. What's this? Th

Cryptex 8 Sep 25, 2022
A minimal CLI framework written in Rust

seahorse A minimal CLI framework written in Rust Features Easy to use No dependencies Typed flags(Bool, String, Int, Float) Documentation Here Usage T

Keisuke Toyota 210 Sep 20, 2022
comfy is a flexible command script manager / runner written in Rust

comfy is a cross-platform command script manager / runner tool, which allows you to run commands in the command line itself, but being these predefined in a portable and universal .comfy file.

daCoUSB 17 Nov 12, 2021
⚡️ Lightning-fast and minimal calendar command line. Written in Rust 🦀

⚡️ Lightning-fast and minimal calendar command line. It's similar to cal. Written in Rust ??

Arthur Henrique 29 Sep 26, 2022
a cute shell thingy that written in rust

a cute shell thingy that written in rust

奥田 龍馬 12 Dec 29, 2021
A small command-line application to view images from the terminal written in Rust.

A small command-line application to view images from the terminal written in Rust. It is basically the front-end of viuer

Atanas Yankov 1.8k Sep 23, 2022
procs is a replacement for ps written in Rust.

procs is a replacement for ps written in Rust. Documentation quick links Features Platform Installation Usage Configuration Features Output by t

null 3.3k Sep 27, 2022
A curated list of replacements for existing software written in Rust

Awesome Alternatives in Rust A curated list of replacements for existing software written in Rust. If you want to contribute, please read CONTRIBUTING

Takayuki Maeda 2.6k Sep 26, 2022
A user-friendly TUI client for Matrix written in Rust!

Konoha A user-friendly TUI client for Matrix written in Rust! Notice: The client is currently not usable and is only hosted on GitHub for version cont

L3af 9 Jan 5, 2022
A simple CLI pomodoro timer written in Rust.

Pomodoro A simple CLI pomodoro timer written in Rust. Based on the Pomodoro Technique. Works on any platform that supports desktop notifications. Exam

null 6 Nov 26, 2021
zsh modules written in rust

zsh-module-poc Can you make a module for zsh written in Rust? Yes, yes you can and this is a proof of concept. It's a start but I have no idea how to

Michael Gattozzi 41 Apr 11, 2022
An feature packed Google Tasks CLI written purely in Rust

rChore A feature packed unofficial Google Tasks CLI to boost your producitvity, written purely in Rust. ?? What is rChore? rChore is an unofficial Goo

Hemanth Krishna 38 Sep 11, 2022
A compact implementation of connect four written in rust.

connect-four A compact implementation of connect four written in rust. Run the game At the moment there no pre-built binaries - but you can build it l

Maximilian Schulke 12 Jul 31, 2022
A readline replacement written in Rust

A readline replacement written in Rust Basic example // Create a default reedline object to handle user input use reedline::{DefaultPrompt, Reedline,

JT 247 Sep 28, 2022
joshuto: ranger-like terminal file manager written in Rust.

joshuto: ranger-like terminal file manager written in Rust.

Jeff Zhao 969 Sep 27, 2022
A lightweight and super fast cli todo program written in rust under 200 sloc

todo A lightweight and super fast cli todo program written in rust under 200 sloc installation AUR package: todo-bin use cargo build --release to comp

sioodmy 224 Sep 24, 2022
Baby's first Rust CLI project. Basic implementation of grep. Written in about 100 SLOC.

minigrep Coding project from Chapter 12 of the The Rust Programming Language book. Usage Compile and run as so minigrep QUERY FILENAME QUERY being the

Anis 2 Oct 2, 2021