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

Download next #2203

Closed
davidhedlund opened this issue Jan 22, 2014 · 9 comments
Closed

Download next #2203

davidhedlund opened this issue Jan 22, 2014 · 9 comments

Comments

@davidhedlund
Copy link

@davidhedlund davidhedlund commented Jan 22, 2014

How can I make this try next youtube hit as I receive "ERROR: requested format not available":

youtube-dl https://www.youtube.com/watch?v=-sN9ATB7juU -f webm/ogg

@phihag
Copy link
Contributor

@phihag phihag commented Jan 22, 2014

In your command line, you have just one video, so there is no second one. If this video comes out of a playlist of any kind (I believe for you it's from a search, use ytsearch10: or ytsearchall: instead of a plain ytsearch:), you can pass in --max-downloads 1. This will make youtube-dl abort after the first successful download.

@phihag phihag closed this Jan 22, 2014
@davidhedlund
Copy link
Author

@davidhedlund davidhedlund commented Jan 23, 2014

Oh, sorry. I mean

youtube-dl 'ytsearch1:Afgin - Astral Experience' -f webm/ogg
Says: "ERROR: requested format not available"

Why do youtube-dl not trying with next video ID?

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jan 23, 2014

Add the --ignore-errors option, it won't stop when it finds an error.

@phihag
Copy link
Contributor

@phihag phihag commented Jan 23, 2014

Like virtually any other command-line program, youtube-dl aborts if it encounters an error. This is the default behavior, but we reserve every right to alter it some time. If you want a specific behavior (in your case, ignore the error and go on with the next video), pass in the --ignore-errors (or -i for short) or --abort-on-error option. This works fine for me:

youtube-dl 'ytsearch10:Afgin - Astral Experience' -f webm/ogg -i --max-downloads 1

At the moment, it generates somewhat excessive output, but as of the just-released youtube-dl 2014.01.23.1, this has been fixed.

@davidhedlund
Copy link
Author

@davidhedlund davidhedlund commented Jan 23, 2014

On 2014-01-23 10:43, Philipp Hagemeister wrote:

Like virtually any other command-line program, youtube-dl aborts if it
encounters an error. This is the default behavior, but we reserve
every right to alter it some time. If you want a specific behavior (in
your case, ignore the error and go on with the next video), pass in
the |--ignore-errors| (or |-i| for short) or |--abort-on-error|
option. This works fine for me:

|youtube-dl 'ytsearch10:Afgin - Astral Experience' -f webm/ogg -i --max-downloads 1
|

At the moment, it generates somewhat excessive output, but as of the
just-released youtube-dl 2014.01.23.1, this has been fixed.


Reply to this email directly or view it on GitHub
#2203 (comment).

youtube-dl 'ytsearch10:Afgin - Old is Gold' -f webm/ogg -i --max-downloads 1 --match-title ^"Afgin - Old is Gold"$ --verbose

ID 65MQ5ZAmusI correspond to --match-title but have error. Why?

@phihag
Copy link
Contributor

@phihag phihag commented Jan 23, 2014

Can you post the error you are getting? Please make sure that you include the full output of youtube-dl. To get more effective at error reporting, please make sure you follow our bug reporting checklist.

The invocatoin works fine for me. Your shell quoting is a little bit funky though. I think you want '^Afgin - Old is Gold$'.

@phihag
Copy link
Contributor

@phihag phihag commented Jan 23, 2014

It looks you posted your script by accident. Please post the output you are getting.

@davidhedlund
Copy link
Author

@davidhedlund davidhedlund commented Jan 23, 2014

On 2014-01-23 11:59, Philipp Hagemeister wrote:

It looks you posted your script by accident. Please post the output
you are getting.


Reply to this email directly or view it on GitHub
#2203 (comment).

[Note that I now want --match-title to be included as well]

title="Afgin - Astral Experience"; # Works in below script
title="Afgin - Old is Gold"; # Does not work in below script
youtube-dl "ytsearch10:$title" -f 172/171/43/webm/ogg --extract-audio --no-overwrites --match-title ^"$title"$ --verbose --ignore-errors --max-downloads 1

[download] Downloading video #2 of 10
[youtube] 65MQ5ZAmusI: Downloading webpage
[youtube] 65MQ5ZAmusI: Downloading video info webpage
[youtube] 65MQ5ZAmusI: Extracting video information
ERROR:
Traceback (most recent call last):
File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 514, in
extract_info
return self.process_ie_result(ie_result, download, extra_info)
File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 541, in
process_ie_result
return self.process_video_result(ie_result, download=download)
File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 765, in
process_video_result
self.process_info(new_info)
File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 795, in
process_info
raise MaxDownloadsReached()
MaxDownloadsReached

@phihag
Copy link
Contributor

@phihag phihag commented Jan 23, 2014

Duplicate of #2211.

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
3 participants
You can’t perform that action at this time.