DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Last post Author Topic: NANY 2021: yaydl  (Read 153,020 times)

Tuxman

  • OMG not him again!
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,522
    • Participated in NANY Challenge Seven Times
NANY 2021: yaydl
« on: November 08, 2020, 09:01 PM »
NANY 2021 Entry Information

Application Name yet another youtube down loader
Version 0.3.0 changes regularly
Short Description does what it says
Supported OSes developed on macOS, compiled for Windows 10 11, but in theory, yaydl should run where Rust is available
Web Page https://code.rosaelefanten.org/yaydl
Downloadvia cargo: cargo install yaydl
System Requirements
  • ffmpeg. unless you can live with the default video formats and don’t ever use the audio-only option.
Author that would be me


Description
You know what was missing? A tool to download YouTube video files! Here’s mine.

Features

  • Can download videos.
  • Can optionally keep only the audio part of them.
  • Could convert the resulting file to something else (requires ffmpeg).
  • Comes as a single binary (once compiled) - take it everywhere on your thumbdrive, no Python cruft required.

Non-features

The list of features is deliberately kept short:

  • No output quality choice. yaydl assumes that your internet connection is good enough, or else you would stream, not download.
  • No complex filters. This is a downloading tool.
  • No image file support. Videos only.

Missing features (patches are welcome)

  • yaydl currently ignores video meta data (except the title) unless they are a part of the video file.
  • Playlists are not fully supported yet.
  • More supported sites: Possible, but not implemented yet. Check the README!

Usage

Code
USAGE:
    yaydl [FLAGS] [OPTIONS] <URL>

ARGS:
    <URL>    Sets the input URL to use

FLAGS:
    -h, --help          Prints help information
    -x, --only-audio    Only keeps the audio stream
    -v, --verbose       Talks more while the URL is processed
    -V, --version       Prints version information

OPTIONS:
    -f, --audio-format <AUDIO>    Sets the target audio format (only if --only-audio is used).
                                  Specify the file extension here (defaults to "mp3").
    -o, --output <OUTPUTFILE>     Sets the output file name
I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.
« Last Edit: May 06, 2023, 12:27 AM by Tuxman »

Tuxman

  • OMG not him again!
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,522
    • Participated in NANY Challenge Seven Times
Re: NANY 2021: yaydl
« Reply #1 on: November 13, 2020, 11:09 PM »
Updated to 0.2.2.
I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,947
Re: NANY 2021: yaydl
« Reply #2 on: November 15, 2020, 11:28 AM »
Seems very interesting.
;D

Tuxman

  • OMG not him again!
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,522
    • Participated in NANY Challenge Seven Times
Re: NANY 2021: yaydl
« Reply #3 on: November 15, 2020, 11:33 AM »
It’s even on Cargo now:
cargo install yaydl

https://crates.io/crates/yaydl
I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.

Shades

  • Member
  • Joined in 2006
  • **
  • Posts: 2,954
Re: NANY 2021: yaydl
« Reply #4 on: November 15, 2020, 02:37 PM »
yaydl.exe "https://www.youtube.com/watch?v=Z-b13Df2QT0"

That results in an error: "Relative URL without a base"
Did not find any info about that error at the provided links.
The easy path is usually downhill...

Tuxman

  • OMG not him again!
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,522
    • Participated in NANY Challenge Seven Times
Re: NANY 2021: yaydl
« Reply #5 on: November 15, 2020, 07:26 PM »
Naturally, this specific video has a very different get_video_info file.  >:(
I’ll investigate... not today, I’m afraid. Maybe tomorrow.

Sorry.
I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.

Shades

  • Member
  • Joined in 2006
  • **
  • Posts: 2,954
Re: NANY 2021: yaydl
« Reply #6 on: November 17, 2020, 01:55 AM »
Whenever you have the time, the resources and the desire to do anything about the previous problem, that is no problem. Better yet, I should say thanks for the effort you have already put into the current version. Nice, simple and (almost  :-[ ) doing everything it is supposed to.


At the risk of you hating me even more:
yaydl.exe "https://www.youtube.com/watch?v=PNrVNbLGcY8"

That link gives the following error:
Error: The filename, directory name, or volume label syntax is incorrect. (os error 123)

Which is normally reserved for folders/files that have characters in their name that NTFS trips over.  Yet I could manage to download others in that series, which also had the | character in their name (I assume that is the character giving problems). Hence why this one goes wrong and others ok?

For matters like this the output parameter should be used, I'm aware. Just letting you know about my experiences with your software.
The easy path is usually downhill...

Shades

  • Member
  • Joined in 2006
  • **
  • Posts: 2,954
Re: NANY 2021: yaydl
« Reply #7 on: November 17, 2020, 02:22 AM »
Another post another error  :-[
But accompanied with a backtrace log, so hopefully helps you out.

yaydl.exe "https://www.youtube.com/watch?v=uofTiq2e4ys"
Fetching from YouTube.
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src\handlers\youtube.rs:140:58
stack backtrace:
  0:          0x956d8b - backtrace::backtrace::dbghelp::trace::ha09940ef4b8fd9a2 at C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\backtrace-0.3.46\src\backtrace/dbghelp.rs:88
  1:          0x956d8b - backtrace::backtrace::trace_unsynchronized::h19d7d1b30f96fe6c at C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\backtrace-0.3.46\src\backtrace/mod.rs:66
  2:          0x956d8b - std::sys_common::backtrace::_print_fmt::hf038dfff95c497df at src\libstd\sys_common/backtrace.rs:78
  3:          0x956d8b - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he2295693089d2e8c at src\libstd\sys_common/backtrace.rs:59
  4:          0x98272c - core::fmt::write::h2e7468e40976ea37 at src\libcore\fmt/mod.rs:1076
  5:          0x948429 - std::io::Write::write_fmt::hef3158223e737cb6 at src\libstd\io/mod.rs:1537
  6:          0x95b5c0 - std::sys_common::backtrace::_print::he4a39cb956ba394d at src\libstd\sys_common/backtrace.rs:62
  7:          0x95b5c0 - std::sys_common::backtrace::print::h38d45a7d7a4d1f02 at src\libstd\sys_common/backtrace.rs:49
  8:          0x95b5c0 - std::panicking::default_hook::{{closure}}::hfcc0d2f90e4d71be at src\libstd/panicking.rs:198
  9:          0x95b249 - std::panicking::default_hook::h7e61c8ee936a661d at src\libstd/panicking.rs:217
  10:          0x95bcfd - std::panicking::rust_panic_with_hook::h8b0608bd552a3d13 at src\libstd/panicking.rs:526
  11:          0x95b914 - rust_begin_unwind at src\libstd/panicking.rs:437
  12:          0x97f070 - core::panicking::panic_fmt::h858651244c7bf662 at src\libcore/panicking.rs:85
  13:          0x97efbc - core::panicking::panic::h3d3bbc55f27215e0 at src\libcore/panicking.rs:50
  14:          0x4213aa - <yaydl::handlers::youtube::YouTubeHandler as yaydl::definitions::SiteDefinition>::find_video_direct_url::h7dcd5e8b5dd3862e
  15:          0x41760d - yaydl::main::hec0b5474d3d8845d
  16:          0x404db7 - std::rt::lang_start::{{closure}}::h6bd369ed7d7ed635
  17:          0x95bfbc - std::rt::lang_start_internal::{{closure}}::hcfe58f53feea7233 at src\libstd/rt.rs:52
  18:          0x95bfbc - std::panicking::try::do_call::hc4163588b8559d85 at src\libstd/panicking.rs:348
  19:          0x95bfbc - std::panicking::try::h310a3be58418d841 at src\libstd/panicking.rs:325
  20:          0x95bfbc - std::panic::catch_unwind::h52728a6ebc96df5e at src\libstd/panic.rs:394
  21:          0x95bfbc - std::rt::lang_start_internal::ha1701ac7d300255b at src\libstd/rt.rs:51
  22:          0x419168 - main
  23:          0x4013c7 - _tmainCRTStartup
  24:          0x4014fb - mainCRTStartup
  25:    0x7ff9bb741fe4 - _report_error
  26:    0x7ff9bbd7cb31 - _report_error
The easy path is usually downhill...

Tuxman

  • OMG not him again!
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,522
    • Participated in NANY Challenge Seven Times
Re: NANY 2021: yaydl
« Reply #8 on: November 17, 2020, 07:16 AM »
Yes, it does.
I hope that I find some time this week... thank you.

I’m afraid that the problem with some videos having a bad “base URL” will require some refactoring. I’m not even sure how to fix that.  :huh: But the other two problems look easy to fix...
I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.

Tuxman

  • OMG not him again!
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,522
    • Participated in NANY Challenge Seven Times
Re: NANY 2021: yaydl
« Reply #9 on: November 17, 2020, 09:12 AM »
They are not. At least the latter is not.
I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,947
Re: NANY 2021: yaydl
« Reply #10 on: November 18, 2020, 01:41 AM »
Don't forget to sleep and eat well.
:tellme:

Tuxman

  • OMG not him again!
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,522
    • Participated in NANY Challenge Seven Times
Re: NANY 2021: yaydl
« Reply #11 on: November 18, 2020, 01:54 AM »
I CAN'T! THIS IS IMPORTANT!
I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,947
Re: NANY 2021: yaydl
« Reply #12 on: November 18, 2020, 02:08 AM »
I CAN'T! THIS IS IMPORTANT!
:tellme: :tellme: ;D ;D ;D ;D ;D

take it easy !!!!!

Tuxman

  • OMG not him again!
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,522
    • Participated in NANY Challenge Seven Times
Re: NANY 2021: yaydl
« Reply #13 on: January 06, 2021, 07:06 PM »
OK, I officially fail to work on this. But VOE.sx is supported now! Version 0.3.0 attached above. :)
I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 11,205
    • Participated in NANY Challenge Fourteen Times
    • Coding Snacks
    • Writer
    • Hardware Hacker
Re: NANY 2021: yaydl
« Reply #14 on: January 06, 2021, 08:55 PM »
You slept as ordered.

Tuxman

  • OMG not him again!
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,522
    • Participated in NANY Challenge Seven Times
Re: NANY 2021: yaydl
« Reply #15 on: January 06, 2021, 09:18 PM »
BUT I HAVE NOT EATEN!
I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,947
Re: NANY 2021: yaydl
« Reply #16 on: January 08, 2021, 12:01 PM »
Good rest
Good food
Good love

Three things are importangt in life :
rest = health
food = money
Love is love
:-* :P

Happy New Year Tuxman
Best Regards

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 11,205
    • Participated in NANY Challenge Fourteen Times
    • Coding Snacks
    • Writer
    • Hardware Hacker
Re: NANY 2021: yaydl
« Reply #17 on: January 08, 2021, 01:28 PM »
Another one for you -

> yaydl "https://www.youtube.com/watch?v=bS4Q-WWyl3Q" --only-audio
Fetching from YouTube.
thread 'main' panicked at 'Could not find ffmpeg - no processing is done.: Os { code: 2, kind: NotFound, message: "The system cannot find the file specified." }', src\ffmpeg.rs:34:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


Checking the source I see that you're just using the system's ffmpeg - should probably be listed as a requirement above.

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 11,205
    • Participated in NANY Challenge Fourteen Times
    • Coding Snacks
    • Writer
    • Hardware Hacker
Re: NANY 2021: yaydl
« Reply #18 on: January 08, 2021, 01:40 PM »
Also found some more relative url without a base, but you know that already :(

Tuxman

  • OMG not him again!
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,522
    • Participated in NANY Challenge Seven Times
Re: NANY 2021: yaydl
« Reply #19 on: January 08, 2021, 03:42 PM »
Stop it!  >:(

Well, yes, it should... but at least it tells you what’s wrong!
I modified the system requirements above. I’m not quite sure about a better method yet. Ideas?
I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.
« Last Edit: January 08, 2021, 11:10 PM by Tuxman »

IQLover

  • created in PS 4
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 48
Re: NANY 2021: yaydl
« Reply #20 on: January 11, 2021, 01:18 PM »
Won't run @ 32bit Win7  >:(

Tuxman

  • OMG not him again!
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,522
    • Participated in NANY Challenge Seven Times
Re: NANY 2021: yaydl
« Reply #21 on: January 11, 2021, 01:18 PM »
Why not?
I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.

IQLover

  • created in PS 4
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 48
Re: NANY 2021: yaydl
« Reply #22 on: January 11, 2021, 01:26 PM »
It say something like it is NOT designed for 32bit system
https://i.imgur.com/GQw17fF.jpg

Tuxman

  • OMG not him again!
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,522
    • Participated in NANY Challenge Seven Times
Re: NANY 2021: yaydl
« Reply #23 on: January 11, 2021, 02:53 PM »
Ah, the precompiled binary. Yes, might well be. Have you tried installing it from Cargo?
I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: NANY 2021: yaydl
« Reply #24 on: March 03, 2021, 05:10 AM »
Wanted to say thanks for this.. My first installed Rust app, was pretty painless and it worked great!

Original address: https://www.donationcoder.com/forum/index.php?topic=50691.0