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

[twitter]How to download only the highest quality images and videos? #5424

Closed
maplestory03 opened this issue Apr 3, 2024 · 4 comments
Closed

Comments

@maplestory03
Copy link

for pictures.if [&name=orig] fails, simply return the download failure instead of downloading a lower level of image quality
Similarly, if there is also a quality distinction in videos, if downloading the highest image quality fails, it returns a download failure and no lower quality videos will be downloaded again.
This may be caused by network issues, and in most cases, it is not a problem with the tweet itself.
But because this has been downloaded to non highest quality media and recorded, the highest quality media will not be downloaded again.
and if this error occurs once, all attempts with the same quality level will result in errors.
e.g.
[downloader.http][warning] HTTPSConnectionPool(host='pbs.twimg.com', port=443): Max retries exceeded with url: /media/GIHc5-UbsAApGSa?format=jpg&name=orig (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1131)'))) (1/5)
[downloader.http][warning] HTTPSConnectionPool(host='pbs.twimg.com', port=443): Max retries exceeded with url: /media/GIHc5-UbsAApGSa?format=jpg&name=orig (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1131)'))) (2/5)
[downloader.http][warning] HTTPSConnectionPool(host='pbs.twimg.com', port=443): Max retries exceeded with url: /media/GIHc5-UbsAApGSa?format=jpg&name=orig (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1131)'))) (3/5)
[downloader.http][warning] HTTPSConnectionPool(host='pbs.twimg.com', port=443): Max retries exceeded with url: /media/GIHc5-UbsAApGSa?format=jpg&name=orig (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1131)'))) (4/5)
[downloader.http][warning] HTTPSConnectionPool(host='pbs.twimg.com', port=443): Max retries exceeded with url: /media/GIHc5-UbsAApGSa?format=jpg&name=orig (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1131)'))) (5/5)
[download][info] Trying fallback URL #1
[downloader.http][warning] HTTPSConnectionPool(host='pbs.twimg.com', port=443): Max retries exceeded with url: /media/GIHc5-UbsAApGSa?format=jpg&name=4096x4096 (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1131)'))) (1/5)
[downloader.http][warning] HTTPSConnectionPool(host='pbs.twimg.com', port=443): Max retries exceeded with url: /media/GIHc5-UbsAApGSa?format=jpg&name=4096x4096 (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1131)'))) (2/5)
[downloader.http][warning] HTTPSConnectionPool(host='pbs.twimg.com', port=443): Max retries exceeded with url: /media/GIHc5-UbsAApGSa?format=jpg&name=4096x4096 (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1131)'))) (3/5)
[downloader.http][warning] HTTPSConnectionPool(host='pbs.twimg.com', port=443): Max retries exceeded with url: /media/GIHc5-UbsAApGSa?format=jpg&name=4096x4096 (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1131)'))) (4/5)
[downloader.http][warning] HTTPSConnectionPool(host='pbs.twimg.com', port=443): Max retries exceeded with url: /media/GIHc5-UbsAApGSa?format=jpg&name=4096x4096 (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1131)'))) (5/5)
[download][info] Trying fallback URL #2
[downloader.http][warning] HTTPSConnectionPool(host='pbs.twimg.com', port=443): Max retries exceeded with url: /media/GIHc5-UbsAApGSa?format=jpg&name=large (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1131)'))) (1/5)
………………

@mikf
Copy link
Owner

mikf commented Apr 3, 2024

For images, set the twitter.size option to only include orig:

"size": ["orig"]

For videos, it will always download only the highest quality version, unless you use "videos": "ytdl" and use its format selection options to select a lower quality one.

@maplestory03
Copy link
Author

maplestory03 commented Apr 3, 2024

For images, set the twitter.size option to only include orig:

"size": ["orig"]

For videos, it will always download only the highest quality version, unless you use "videos": "ytdl" and use its format selection options to select a lower quality one.

Thank you.Let me try some time.

@mikf
Copy link
Owner

mikf commented Apr 3, 2024

Disabling all fallback URLs might be an even better, more general solution.

@maplestory03
Copy link
Author

has works

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