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

1.25.8 Twitter doesn't download single tweet. #4307

Closed
AAndyProgram opened this issue Jul 15, 2023 · 9 comments
Closed

1.25.8 Twitter doesn't download single tweet. #4307

AAndyProgram opened this issue Jul 15, 2023 · 9 comments

Comments

@AAndyProgram
Copy link

Command

gallery-dl --verbose --cookies "path to cookies" https://twitter.com/name/status/123456789

Version 1.25.8.
1.25.7 works fine.

@mikf
Copy link
Owner

mikf commented Jul 15, 2023

Works on my machine ™️

# without login
$ gallery-dl https://twitter.com/kikonoma_tmhmkt/status/1679805434688053248
/tmp/_/twitter/kikonoma_tmhmkt/1679805434688053248_1.jpg
/tmp/_/twitter/kikonoma_tmhmkt/1679805434688053248_2.jpg

# with login
$ gallery-dl -u USERNAME https://twitter.com/kikonoma_tmhmkt/status/1679805434688053248
/tmp/_/twitter/kikonoma_tmhmkt/1679805434688053248_1.jpg
/tmp/_/twitter/kikonoma_tmhmkt/1679805434688053248_2.jpg

@mikf
Copy link
Owner

mikf commented Jul 15, 2023

I should probably just use the endpoints from #4300 and make them somehow configurable ...

@AAndyProgram
Copy link
Author

Works on my machine ™️

So cookies are no longer accepted? I don't use gallery-dl to download tweets. I'm using it in my program to get json responses. And the authorization to download each profile isn't too much? Maybe there is a way to use cookies instead of login/password?

I should probably just use the endpoints from #4300 and make them somehow configurable ...

I don't understand what argument(s) should I use in the command?

@AAndyProgram
Copy link
Author

AAndyProgram commented Jul 15, 2023

Without authorization (cookies):

[twitter][info] Requesting guest token

@AAndyProgram
Copy link
Author

Have you tested it with nsfw content?

@AAndyProgram
Copy link
Author

Works on my machine ™️

# without login
$ gallery-dl https://twitter.com/kikonoma_tmhmkt/status/1679805434688053248
/tmp/_/twitter/kikonoma_tmhmkt/1679805434688053248_1.jpg
/tmp/_/twitter/kikonoma_tmhmkt/1679805434688053248_2.jpg

# with login
$ gallery-dl -u USERNAME https://twitter.com/kikonoma_tmhmkt/status/1679805434688053248
/tmp/_/twitter/kikonoma_tmhmkt/1679805434688053248_1.jpg
/tmp/_/twitter/kikonoma_tmhmkt/1679805434688053248_2.jpg

Confirmed that your example works fine without authorization. NSFW content (video) - no.

@mikf
Copy link
Owner

mikf commented Jul 15, 2023

So cookies are no longer accepted?

Of course they are still accepted and should work the exact same as a user+pass login.

Have you tested it with nsfw content?

I have to admit that I did not, but it appears to work all the same:

$ gallery-dl -u USERNAME https://twitter.com/mightbecursed/status/1492954264909479936
/tmp/_/twitter/mightbecursed/1492954264909479936_1.jpg

When not logged in it throws an error, though:

$ gallery-dl https://twitter.com/mightbecursed/status/1492954264909479936
[twitter][info] Requesting guest token
[twitter][error] An unexpected error occurred: KeyError - 'core'. ...

@mikf
Copy link
Owner

mikf commented Jul 15, 2023

Here's a NSFW video with cookies:

$ gallery-dl -C cookies-twitter-com.txt https://twitter.com/theobrobineMale/status/1481233909979684865
/tmp/_/twitter/theobrobineMale/1481233909979684865_1.mp4

mikf added a commit that referenced this issue Jul 18, 2023
use the newer TweetResultByRestId only for guests by default
@mikf
Copy link
Owner

mikf commented Jul 18, 2023

With the changes from 90231f2, it'll use the old endpoint from 1.25.7 and before when logged in and you can choose between new and old API endpoint with the tweet-endpoint option.

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