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

Filename formatting silently fails under certain circumstances #5185

Closed
the-blank-x opened this issue Feb 10, 2024 · 2 comments · Fixed by #5186
Closed

Filename formatting silently fails under certain circumstances #5185

the-blank-x opened this issue Feb 10, 2024 · 2 comments · Fixed by #5186

Comments

@the-blank-x
Copy link
Contributor

Step to reproduce: gallery-dl --no-download -f '\fF {asd}' https://skeb.jp/@wanwan_soba/works/48

Expected behavior: For it to say something like [skeb][error] FilenameFormatError: Applying filename format string failed (NameError: name 'asd' is not defined)

Actual behavior:

> gallery-dl --no-download -f '\fF {asd}' https://skeb.jp/@wanwan_soba/works/48
?
?

Additional information:
This only happens when the image URL doesn't have an extension:

> gallery-dl --no-download -f '\fF {asd}' https://skeb.jp/@wanwan_soba/works/48 https://http.cat/420.jpg
[1/2] https://skeb.jp/@wanwan_soba/works/48
?
?
[2/2] https://http.cat/420.jpg
[directlink][error] FilenameFormatError: Applying filename format string failed (NameError: name 'asd' is not defined)

Additionally, it also only happens if --no-download is passed:

> gallery-dl -f '\fF {asd}' https://skeb.jp/@wanwan_soba/works/48 https://http.cat/420.jpg
[1/2] https://skeb.jp/@wanwan_soba/works/48

[skeb][error] FilenameFormatError: Applying filename format string failed (NameError: name 'asd' is not defined)
[2/2] https://http.cat/420.jpg
[directlink][error] FilenameFormatError: Applying filename format string failed (NameError: name 'asd' is not defined)
@mikf
Copy link
Owner

mikf commented Feb 10, 2024

This only happens when the image URL doesn't have an extension:

Do you think it would be OK to guess the filename extension for skeb files as webp?
It would speed up skipping previously downloaded files, and adjust-extension would correct webp to avif with -o downloader.headers.Accept=image/avif.

@the-blank-x
Copy link
Contributor Author

the-blank-x commented Feb 10, 2024 via email

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

Successfully merging a pull request may close this issue.

2 participants