• yt-dlp search syntax?

    From Karen Lewellen@21:1/5 to All on Wed Mar 12 07:00:02 2025
    Hi all,
    There is a possibility I am missing something due to using a screen
    reader.
    However, the process might not be possible at all, that seems odd though
    given what I did find.
    We have yt-dlp here at shellworld, meaning for a command Line Linux
    setup.
    I did discover a command ytsearch:
    But cannot fully follow how to specify my search requirements.
    there are a zillion options for this tool, I am pleased for example to
    learn that converting items to mp3, or say m4a, is a command line option,
    Where I am stuck is getting a very specific search done.
    Can anyone share the syntax?
    Thanks,
    Karen

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Greg Wooledge@21:1/5 to Greg on Wed Mar 12 16:20:01 2025
    On Wed, Mar 12, 2025 at 14:33:11 -0000, Greg wrote:
    My robot says:

    One result:

    yt-dlp "ytsearch:QUERY"

    But for the life of me, after searching for twenty minutes, I can't
    determine whether this is correct or not.

    hobbit:~$ wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp [...]
    2025-03-12 11:03:25 (9.25 MB/s) - ‘yt-dlp’ saved [3022294/3022294]

    hobbit:~$ sudo mv yt-dlp /usr/local/bin
    [sudo] password for greg:
    hobbit:~$ sudo chmod 755 /usr/local/bin/yt-dlp
    hobbit:~$ /usr/local/bin/yt-dlp "ytsearch:caught a lite sneeze" [youtube:search] Extracting URL: ytsearch:caught a lite sneeze
    [download] Downloading playlist: caught a lite sneeze
    [youtube:search] query "caught a lite sneeze": Downloading web client config [youtube:search] query "caught a lite sneeze" page 1: Downloading API JSON [youtube:search] Playlist caught a lite sneeze: Downloading 1 items of 1 [download] Downloading item 1 of 1
    [youtube] Extracting URL: https://www.youtube.com/watch?v=weWtRqoSUOI
    [youtube] weWtRqoSUOI: Downloading webpage
    [youtube] weWtRqoSUOI: Downloading tv client config
    [youtube] weWtRqoSUOI: Downloading player b21600d5
    [youtube] weWtRqoSUOI: Downloading tv player API JSON
    [youtube] weWtRqoSUOI: Downloading ios player API JSON
    [youtube] weWtRqoSUOI: Downloading m3u8 information
    [info] weWtRqoSUOI: Downloading 1 format(s): 247+251
    [download] Destination: Tori Amos - Caught a Lite Sneeze (Official Music Video) [weWtRqoSUOI].f247.webm
    [download] 100% of 24.69MiB in 00:00:02 at 9.22MiB/s
    [download] Destination: Tori Amos - Caught a Lite Sneeze (Official Music Video) [weWtRqoSUOI].f251.webm
    [download] 100% of 4.21MiB in 00:00:00 at 8.15MiB/s
    [Merger] Merging formats into "Tori Amos - Caught a Lite Sneeze (Official Music Video) [weWtRqoSUOI].webm"
    Deleting original file Tori Amos - Caught a Lite Sneeze (Official Music Video) [weWtRqoSUOI].f251.webm (pass -k to keep)
    Deleting original file Tori Amos - Caught a Lite Sneeze (Official Music Video) [weWtRqoSUOI].f247.webm (pass -k to keep)
    [download] Finished downloading playlist: caught a lite sneeze
    hobbit:~$ ls -l Tori\ Amos\ -\ Caught\ a\ Lite\ Sneeze\ \(Official\ Music\ Video\)\ \[weWtRqoSUOI\].webm
    -rw-r--r-- 1 greg greg 30301261 Jan 23 2024 'Tori Amos - Caught a Lite Sneeze (Official Music Video) [weWtRqoSUOI].webm'


    I don't think this is a thing I'll be doing much of. I would prefer
    to do my search in the Youtube web site, pick which video I want, and
    then download that one, rather than having some program pick one for
    me.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Karen Lewellen@21:1/5 to Greg on Wed Mar 12 23:00:01 2025
    Hi Greg,
    Actually, you provided the answer..or its floor.
    when I type yt-dlp "ytsearch: adam clayton musicares speech"
    The program attempts to download one item.
    It also gives a log in error, and instructions for passing cookies to
    YouTube via the program as well.
    Why I am thankful though is your provided solution illustrates that
    searching is quite possible. and with the added options, I want audio,
    along with the cookie thing, I may manage to secure a copy of the speech. Thanks for providing a clear solution for me here.

    with appreciation,
    Karen Lewellen



    On Wed, 12 Mar 2025, Greg wrote:

    On 2025-03-12, Karen Lewellen <klewellen@shellworld.net> wrote:
    Hi all,
    There is a possibility I am missing something due to using a screen
    reader.
    However, the process might not be possible at all, that seems odd though
    given what I did find.
    We have yt-dlp here at shellworld, meaning for a command Line Linux
    setup.
    I did discover a command ytsearch:
    But cannot fully follow how to specify my search requirements.
    there are a zillion options for this tool, I am pleased for example to
    learn that converting items to mp3, or say m4a, is a command line option,
    Where I am stuck is getting a very specific search done.
    Can anyone share the syntax?
    Thanks,
    Karen



    My robot says:

    One result:

    yt-dlp "ytsearch:QUERY"

    But for the life of me, after searching for twenty minutes, I can't
    determine whether this is correct or not.

    Mutiple results:

    yt-dlp "ytsearchN:QUERY"

    I don't have the program, so I can't check. Sorry.



    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Wright@21:1/5 to Greg Wooledge on Wed Mar 12 23:10:01 2025
    On Wed 12 Mar 2025 at 11:11:21 (-0400), Greg Wooledge wrote:
    On Wed, Mar 12, 2025 at 14:33:11 -0000, Greg wrote:
    My robot says:

    One result:

    yt-dlp "ytsearch:QUERY"

    But for the life of me, after searching for twenty minutes, I can't determine whether this is correct or not.

    hobbit:~$ wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp
    [...]
    2025-03-12 11:03:25 (9.25 MB/s) - ‘yt-dlp’ saved [3022294/3022294]

    hobbit:~$ sudo mv yt-dlp /usr/local/bin
    [sudo] password for greg:
    hobbit:~$ sudo chmod 755 /usr/local/bin/yt-dlp
    hobbit:~$ /usr/local/bin/yt-dlp "ytsearch:caught a lite sneeze" [youtube:search] Extracting URL: ytsearch:caught a lite sneeze
    [download] Downloading playlist: caught a lite sneeze
    [youtube:search] query "caught a lite sneeze": Downloading web client config [youtube:search] query "caught a lite sneeze" page 1: Downloading API JSON [youtube:search] Playlist caught a lite sneeze: Downloading 1 items of 1 [download] Downloading item 1 of 1
    [youtube] Extracting URL: https://www.youtube.com/watch?v=weWtRqoSUOI [youtube] weWtRqoSUOI: Downloading webpage
    [youtube] weWtRqoSUOI: Downloading tv client config
    [youtube] weWtRqoSUOI: Downloading player b21600d5
    [youtube] weWtRqoSUOI: Downloading tv player API JSON
    [youtube] weWtRqoSUOI: Downloading ios player API JSON
    [youtube] weWtRqoSUOI: Downloading m3u8 information
    [info] weWtRqoSUOI: Downloading 1 format(s): 247+251
    [download] Destination: Tori Amos - Caught a Lite Sneeze (Official Music Video) [weWtRqoSUOI].f247.webm
    [download] 100% of 24.69MiB in 00:00:02 at 9.22MiB/s
    [download] Destination: Tori Amos - Caught a Lite Sneeze (Official Music Video) [weWtRqoSUOI].f251.webm
    [download] 100% of 4.21MiB in 00:00:00 at 8.15MiB/s
    [Merger] Merging formats into "Tori Amos - Caught a Lite Sneeze (Official Music Video) [weWtRqoSUOI].webm"
    Deleting original file Tori Amos - Caught a Lite Sneeze (Official Music Video) [weWtRqoSUOI].f251.webm (pass -k to keep)
    Deleting original file Tori Amos - Caught a Lite Sneeze (Official Music Video) [weWtRqoSUOI].f247.webm (pass -k to keep)
    [download] Finished downloading playlist: caught a lite sneeze
    hobbit:~$ ls -l Tori\ Amos\ -\ Caught\ a\ Lite\ Sneeze\ \(Official\ Music\ Video\)\ \[weWtRqoSUOI\].webm
    -rw-r--r-- 1 greg greg 30301261 Jan 23 2024 'Tori Amos - Caught a Lite Sneeze (Official Music Video) [weWtRqoSUOI].webm'


    I don't think this is a thing I'll be doing much of. I would prefer
    to do my search in the Youtube web site, pick which video I want, and
    then download that one, rather than having some program pick one for
    me.

    I typed caught a lite sneeze into google and got four hits; the
    top one was weWtRqoSUOI (official video), wL71FOgp1a4 (2016 remaster), BVef_GdeBs8 (looks like a disc), and SIsXdEw1hIU (Live 1998). Clicking
    on Videos at the top of the page gives me those four, and three dozen
    or so more. Most are from youtube, but not all.

    That's the way I normally look for videos, and ytsearch was also
    news to me. Is ytsearch limited to finding youtube videos, or more
    wideranging? One of the benefits of yt-dlp is that I can grab videos
    off news outlets (print and TV), facebook, tiktok, etc. (BTW I'm not
    subscribed to social media sites.)

    Occasionally I pick things off youtube's list down the righthand side
    of a video's webpage, but usually I download the video without even
    bothering to visit the webpage (unless it's the easiest way to grab
    those eleven characters). I know nothing about channels.

    (I don't recall whether the OP is happy googling for things.)

    Cheers,
    David.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)