ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
131.19k stars 9.93k forks source link

Include video ID in ERROR: messages #511

Open kull0rk3x opened 11 years ago

kull0rk3x commented 11 years ago

Hi,

I was wondering if it is possible to include the video ID in the error messages, eg. turning lines like ERROR: YouTube said: This video contains content from UMG, who has blocked it in your country on copyright grounds. to ERROR [videoIDhere]: YouTube said: This video contains content from UMG, who has blocked it in your country on copyright grounds. to be able to know which video failed when letting youtube-dl work on a playlist. I wrote a little script that utilizes youtube-dl and mplayer to playback videos, and if this was changed I could unblock a few videos on the fly (until then I would have to download the whole playlist again via a proxy).

Regards

FiloSottile commented 11 years ago

Yeah, might be useful, but meanwhile the id is on the precedent output line, no?

kull0rk3x commented 11 years ago

Normally yes, but if you add --get-url --get-title (so that mplayer can do the steaming), its not.

kull0rk3x commented 11 years ago

This patch (to be applied on git-master) patches all errors & warnings to _ERROR/WARNING: [InfoExtractor] video_id: errormessage.

kull0rk3x commented 11 years ago

I posted a solution to this problem, please consider applying the patch. If theres any more work needed for this, I'll update the diff.

yasoob commented 11 years ago

@kull0rk3x Can you do a pull request ? It will ease the developers work while applying the patch.

dirkf commented 7 months ago

video_id can now be passed into ExtractorError. Code needs to be reviewed to pass that parameter where appropriate.