Skip to content

Instantly share code, notes, and snippets.

@pemre
Last active May 12, 2024 08:03
Show Gist options
  • Save pemre/c080f6bc94a5c7b949d420cd63100857 to your computer and use it in GitHub Desktop.
Save pemre/c080f6bc94a5c7b949d420cd63100857 to your computer and use it in GitHub Desktop.
Download a list of URLs with custom name using yt-dlp (formerly youtube-dl)
#!/bin/bash
# Title : batch-download-yt-dlp.sh
# Description : Download a list of URLs with custom name using yt-dlp (formerly youtube-dl)
# Author : Emre
# Date : 2021.09.26 - 2024.05.12
# Version : 1.0 - 1.1
# Based on : https://github.com/pemre/mazi/blob/master/batch-downloader-with-custom-name.sh
# Example "urls.txt":
# ...
# S01E06.mp4 https://cdn-v.pr.trt.com.tr/trttv/website/1c27ca83-06f2-42b2-bef9-e87faddd521d/master.m3u8
# S01E07.mp4 https://cdn-v.pr.trt.com.tr/trttv/website/7491cb69-0dfa-4a0a-a714-fff326f843e3/master.m3u8
# ...
while read file url; do
yt-dlp -o "$file" $url
done < urls.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment