Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When Downloading Channel, Error in Any Vid Stops Entire Channel Download Even If Other Vids Are Okay #1964

Closed
EveryDirection opened this issue Dec 14, 2013 · 5 comments

Comments

@EveryDirection
Copy link

@EveryDirection EveryDirection commented Dec 14, 2013

For example, do

youtube-dl http://www.youtube.com/user/gabtibette/videos

This will start out downloading just fine:

[youtube:user] gabtibette: Downloading video ids from 1 to 51
[youtube:user] gabtibette: Downloading video ids from 51 to 101
[download] Downloading playlist: gabtibette
[youtube:user] playlist 'gabtibette': Collected 70 video ids (downloading 70 of them)
[download] Downloading video #1 of 70
[youtube] Setting language
[youtube] JcHCabHsvi0: Downloading video webpage
[youtube] JcHCabHsvi0: Downloading video info webpage
[youtube] JcHCabHsvi0: Extracting video information
[download] Destination: [path]\[file].mp4
[download] 100% of 48.98MiB in 00:2304MiB/s ETA 00:005
[download] Downloading video #2 of 70
[youtube] 9WbuQG3J6Ao: Downloading video webpage
[youtube] 9WbuQG3J6Ao: Downloading video info webpage
[youtube] 9WbuQG3J6Ao: Extracting video information
[download] Destination: [path]\[file].mp4
[download] 100% of 35.64MiB in 00:1700MiB/s ETA 00:001
[...]

etc. until it hits a problematic video:

[...]
[download] Downloading video #21 of 70
[youtube] 8pn13U6-Fxc: Downloading video webpage
[youtube] 8pn13U6-Fxc: Downloading video info webpage
ERROR: YouTube said: This video contains content from WMG and EMI Music Publishing, one or more of whom have blocked it in your country on copyright grounds.

...at which point, the ENTIRE channel-downloading operation just stops, which defeats the purpose of using one command to download an entire channel. It doesn't prompt the user for whether to retry or to continue on to the next video; it doesn't continue on to the next video; it just stops entirely, even though later videos in the channel are downloadable.

You can work around this first error by using --playlist-start:

youtube-dl --playlist-start 22 http://www.youtube.com/user/gabtibette/videos

But then the operation chokes on the next video after that with a copyright error, basically requiring the entire channel to be downloaded in many segments, with the user having to respond to each copyright error with another modified command.

Suggested fix:

When YouTube-DL encounters an error in just one video, it should instead prompt the user to abort, retry, or ignore: that is, give the user the choice to:

  • abort the entire channel-downloading operation OR
  • try to download the video with the error again OR
  • just ignore the video with the error and continue on to the next video

There should also be a

--noprompt

command-line option, or even a

--noprompt [choice]

command-line option to make it so that instead of prompting for what to do, YouTube-DL simply ignores the video with the error and continues on to the next video (unless [choice] is specified, in which case YouTube-DL always makes that choice by default). However, in this case, whenever the --noprompt option is used, when the entire channel has been downloaded, YouTube-DL should display some sort of error summary (such as "Downloading succeeded for 63 videos and failed for 7 videos") because otherwise it would be easy to overlook that errors did occur will downloading some videos.

@phihag
Copy link
Contributor

@phihag phihag commented Dec 14, 2013

This option is already present, it's called -i, so you can already pass in -i for --noprompt continue or --abort-on-error for --noprompt abort . We reserve the right to change the default behavior, and asking the user seems a good idea. If you have a suggestion on how we can improve the description of the existing options, feel free to post it. By the way, the reason why the default behavior is to stop immediately is because that's a (imho good) shell convention; gcc will stop as well when it encounters a compilation error in one file. That way, you can see what is wrong.

Retrying is already governed by the --retries option.

@EveryDirection
Copy link
Author

@EveryDirection EveryDirection commented Dec 15, 2013

Ah, okay, thank you, I didn't realize that "noprompt" options were already supported. Thanks a lot! :D

I just tested the -i option, though, and it doesn't produce an error summary at the end, which would be a good improvement (otherwise, for large playlists, it can be very easy to miss that errors occurred).

Also, an option to force prompting (e.g. --prompt) might be something to consider in the future.

@ghost
Copy link

@ghost ghost commented Feb 13, 2015

Hello.
I considered using --ignore-errors but I don't want it to ignore these kind of errors for example:

[download] 100% of 124.22MiB in 00:18
ERROR: content too short (expected 130258434 bytes and served 23068496)
[download] 100% of 90.26MiB in 00:28
ERROR: content too short (expected 94639676 bytes and served 35651312)

I only want it to ignore errors like this:
ERROR: kNk2-mXLRSg: YouTube said: This video contains content from SME, who has blocked it on copyright grounds.

A specific option to ignore only unavailable videos in a playlist (private, copyrighted, but not due to other errors like the above content too short) would be great. Please? :)
For now, I am adding the unavailable videos, manually(vim filewithIDs) to the list of IDs (I am using --download-archive filewithIDs ) and restarting the script after each such error because I don't want to risk incomplete files.

Thanks.

@xDShot
Copy link

@xDShot xDShot commented Feb 12, 2018

Is there a way to ignore downloading copyrighted videos and continue downloading rest videos for now?

@stdevOzkar
Copy link

@stdevOzkar stdevOzkar commented Feb 15, 2018

Same issue here, is there any way to bypass that kind of "error"??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.