Re: [CBLX] yt-dlp et DailyMotion

[ Thread Index | Date Index | More lists.tuxfamily.org/carrefourblinux Archives ]


Bonsoir Aldo et la liste,

J'ai souvent rencontré également ce problème et je le contourne en usant de Python. J'ai joint un script qu'il faut fairre tourner dans un environnement Python (souvent situé dans le dossier .venv).

Peut-êrtre que cela t'aidera...

Pierre Estrem


Le 16/07/2026 à 17:22, Osvaldo La Rosa aka Aldo a écrit :
Bonjour.

Malgré un ventilo pour éviter la surchauffe de mon ordi, je n'arrive pas à télécharger - en ligne de commande - un clip de DailyMotion,
pourtant yt-dlp dit être compatible avec un millier de plateformes!

Voici ce que je fais:

  ###

# Check:
$ which yt-dlp
/home/moi/bin/yt-dlp

# Exécution:
$ yt-dlp -x --audio-format mp3http://www.dailymotion.com/video/x9jtvp2
# Réponse:
[dailymotion] Extracting URL:http://www.dailymotion.com/video/x9jtvp2
[dailymotion] Downloading Access Token
[dailymotion] x9jtvp2: Downloading media JSON metadata
[dailymotion] x9jtvp2: Downloading metadata JSON
[dailymotion] x9jtvp2: Downloading m3u8 information with randomized headers
[dailymotion] x9jtvp2: Retrying m3u8 download with Chrome impersonation
[dailymotion] x9jtvp2: Retrying m3u8 download with Firefox impersonation
[dailymotion] x9jtvp2: The extractor is attempting impersonation, but none of these impersonate targets are available:
firefox. Seehttps://github.com/yt-dlp/yt-dlp#impersonation  for information on installing the required dependencies

# Sortie !
$

  ###

NB:
- je fais des maj régulières avec  yt-dlp -U  permises en tant que user.
- autre piste / appli la bienvenue!

Bàv, Aldo.
import sys
from pytubefix import YouTube
from pytubefix.cli import on_progress

url = sys.argv[1]

yt = YouTube(url, on_progress_callback=on_progress)

print(f"Téléchargement de : {yt.title}") 

#  Commentez si vous ne souhaitez  que le flux audio
ys = yt.streams.get_highest_resolution()

# Commentez si vous souhaitez vidéo et audio
#ys = yt.streams.get_audio_only()

ys.download()


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/