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

Ignore Errors #512

Closed
blezinski opened this issue Dec 9, 2019 · 9 comments
Closed

Ignore Errors #512

blezinski opened this issue Dec 9, 2019 · 9 comments

Comments

@blezinski
Copy link

Can we get a command similar to youtube-dl's --ignore-errors? I can't find it in any of the documentation and it would be helpful when downloading a large list of URLs
thanks

@mikf
Copy link
Owner

mikf commented Dec 9, 2019

gallery-dl does that by default. When encountering errors while downloading from a list of URLs, those errors will be reported and the next URL processed. (or am I missing something here?)

@kattjevfel
Copy link
Contributor

Add 2> /dev/null to the end of your command lol, no more errors!

@blezinski
Copy link
Author

blezinski commented Dec 10, 2019

When encountering errors while downloading from a list of URLs, those errors will be reported and the next URL processed.

I confused a URL with a single file, what i mean is skipping single file errors and continue scraping within that link instead of encountering a file error and skipping directly to the next URL.
If for instance the very first file has a problem it will create an empty folder and move on even though it's just that one file with the issue.

@pxssy
Copy link

pxssy commented Dec 10, 2019

On this point, is there a way to print errors? like >output.txt doesn't print errors, only successes. I'd like to go back and specifically target those errors manually.

@Hrxn
Copy link
Contributor

Hrxn commented Dec 10, 2019

Print errors? What do you mean? There is already a log file function.

@kattjevfel
Copy link
Contributor

On this point, is there a way to print errors? like >output.txt doesn't print errors, only successes. I'd like to go back and specifically target those errors manually.

That's what 2> is for, it will print only errors into a file.
If you want to redirect everything into a file, you can use &>.

@mikf
Copy link
Owner

mikf commented Dec 13, 2019

@blezinski That sounds like an error during the data extraction process, not the download itself, and those can only be ignored by modifying the relevant extractor code, i.e. no general/global option possible. What site(s) are you talking about?

@pxssy In addition to redirecting stderr with 2>, you can also use --write-log or the corresponding config option: output.logfile.

@blezinski
Copy link
Author

Trying to download from E621. Here's my filename format
"filename": "{id}_{artist}_{filename}.{extension}"
If there's a lot of artists then i hit the windows filename limit and it fails to download

@mikf
Copy link
Owner

mikf commented Dec 16, 2019

You can restrict the length of individual replacement fields and avoid a "filename too long" error that way: "filename": "{id}_{artist[0:200]}_{filename}.{extension}"

@mikf mikf closed this as completed in 1921c12 Dec 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants