sfeed_download: use yt-dlp, an active maintained fork of youtube-dl - randomcrap - random crap programs of varying quality
 (HTM) git clone git://git.codemadness.org/randomcrap
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit bb5c92c7c1bacd4f910a23179f13424828b9cd47
 (DIR) parent 34d2f6937e8f19bd3ef286c9f6588d4a9b1851a4
 (HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
       Date:   Thu,  6 Apr 2023 19:24:07 +0200
       
       sfeed_download: use yt-dlp, an active maintained fork of youtube-dl
       
       Diffstat:
         M sfeed/sfeed_download                |       6 ++++--
       
       1 file changed, 4 insertions(+), 2 deletions(-)
       ---
 (DIR) diff --git a/sfeed/sfeed_download b/sfeed/sfeed_download
       @@ -1,11 +1,13 @@
        #!/bin/sh
        # Downloader for URLs and enclosures in feed files.
       -# Dependencies: awk, curl, flock, xargs (-P), youtube-dl.
       +# Dependencies: awk, curl, flock, xargs (-P), yt-dlp.
        
        cachefile="${SFEED_CACHEFILE:-$HOME/.sfeed/downloaded_urls}"
        jobs="${SFEED_JOBS:-4}"
        lockfile="${HOME}/.sfeed/sfeed_download.lock"
        
       +youtubedl="yt-dlp"
       +
        # log(feedname, s, status)
        log() {
                if [ "$1" != "-" ]; then
       @@ -20,7 +22,7 @@ log() {
        fetch() {
                case "$1" in
                *youtube.com*)
       -                youtube-dl "$1";;
       +                $youtubedl "$1";;
                *.flac|*.ogg|*.m3u|*.m3u8|*.m4a|*.mkv|*.mp3|*.mp4|*.wav|*.webm)
                        # allow 2 redirects, hide User-Agent, connect timeout is 15 seconds.
                        curl -O -L --max-redirs 2 -H "User-Agent:" -f -s --connect-timeout 15 "$1";;