summaryrefslogtreecommitdiff
path: root/bin/extra/ehbtodl
blob: fc873f6a3326e11002ca8720d4a4bf981f7e90aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env sh
printf "%s\n" "$1" |
	sed 's/-H/\\\n&/g' |
	sed '/gzip/d' |
	tee /tmp/curlcommand.sh |
	sh > /tmp/ehbso.html
vids="$(grep -oE "youtube\.com/embed/.{11}" /tmp/ehbso.html |
	cut -d'/' -f 3 |
	tr '\n' ' ')"
for i in $vids 
do printf "%s\n" "https://www.youtube.com/watch?v=$i"
done > /tmp/todownload
# yt-dlp -P "$HOME/Downloads/vids" -o "%(title)s" -a /tmp/todownload