Skip to content

Instantly share code, notes, and snippets.

@fcoterroba
Created May 2, 2025 17:56
Show Gist options
  • Select an option

  • Save fcoterroba/5dc832c236a8135845ae8015e0729327 to your computer and use it in GitHub Desktop.

Select an option

Save fcoterroba/5dc832c236a8135845ae8015e0729327 to your computer and use it in GitHub Desktop.
Download DailyMotion's video/s
# Download video(s) from Dailymotion using yt-dlp
# yt-dlp GitHub repo: https://github.com/yt-dlp/yt-dlp
#
# If the provided URL is part of a playlist, using `'yesplaylist': True`
# will download all videos from that playlist automatically.
import yt_dlp
url = "https://www.dailymotion.com/video/videoId"
ydl_opts = {
'format': 'best',
'outtmpl': '%(playlist_index)s - %(title)s.%(ext)s',
'yesplaylist': True
}
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
ydl.download([url])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment