There is some controversy online about YouTube-dl and the support given to it. I only read about this when my YouTube-dl downloads got to be VERY slow. Some thought that YouTube was blocking it. This is now the shell script line I use after installing a fork of YouTube-dl called yt-dlp…
do shell script "/usr/local/bin/yt-dlp -o '~/Library/Application Support/DEVONthink 3/Inbox/%(title)s.%(ext)s' " & theURL
Rick