Skip to content

Instantly share code, notes, and snippets.

@kamilogorek
Last active August 30, 2023 19:24
Show Gist options
  • Save kamilogorek/f4f2a6c71d7b7c3d4f5739fd639ba529 to your computer and use it in GitHub Desktop.
Save kamilogorek/f4f2a6c71d7b7c3d4f5739fd639ba529 to your computer and use it in GitHub Desktop.
# Get videos with:
#
# const videoElements = Array.from(
# document
# .querySelector("ytd-playlist-video-list-renderer")
# .querySelectorAll("ytd-playlist-video-renderer")
# );
#
# const links = videoElements
# .map((el) => `"${el.querySelector("a").href}"`)
# .join("\n");
#
# console.log(videos);
videos=(
"https://www.youtube.com/watch?v=uqII0AOW1NM&wat=1"
)
for video in ${videos[@]}
do
yt-dlp \
--format 'bestvideo[ext=mp4][height<=720]+bestaudio[ext=m4a]/best[ext=mp4][height<=720]/best' \
--no-playlist \
--sponsorblock-remove default \
$video
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment