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

Improve twitter rule #545

Closed
liamengland1 opened this issue Nov 30, 2020 · 1 comment
Closed

Improve twitter rule #545

liamengland1 opened this issue Nov 30, 2020 · 1 comment
Assignees

Comments

@liamengland1
Copy link
Collaborator

https://pbs.twimg.com/media/EnlTOuPVkAEVFcG?format=jpg&name=900x900 should redirect to https://pbs.twimg.com/media/EnlTOuPVkAEVFcG?format=jpg&name=medium

https://pbs.twimg.com/media/EnlTOuPVkAEVFcG.jpg?name=medium is 404

Perhaps the userscript should check the ?format=jpg&name=whatever urls as well as the .jpg?name=whatever urls?

See mikf/gallery-dl#1145

@qsniyg
Copy link
Owner

qsniyg commented Nov 30, 2020

Thanks for reporting! I decided to take the opportunity to improve the twitter rule a bit as well. As someone else noted in the issue, it does appear like twitter's trying to phase out the .jpg and instead go for format=jpg, so I decided to just automatically go in that direction, rather than double the amount of queries (there can already be an absurd amount of queries for tweet images, especially for images like that where medium is the largest size available).

To avoid the .jpeg issue when saving, I set it to have a custom filename, replacing jpeg with jpg.

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

No branches or pull requests

2 participants