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] 404 Not Found Issue when running gallery-dl #4734

Closed
nvidals18 opened this issue Oct 28, 2023 · 9 comments
Closed

[Twitter] 404 Not Found Issue when running gallery-dl #4734

nvidals18 opened this issue Oct 28, 2023 · 9 comments

Comments

@nvidals18
Copy link

Hi all,

I've been running gallery-dl for a while now without any issues. I tried running it today and received the below error. Has anyone else been having trouble with gallery-dl recently? I tried changing my password because I received a notification related to that but I still get the same error :( Is this due to the whole Twitter/X thing?

FYA I have very little knowledge of all of this, and it's a miracle I was even able to set it up!

[twitter][error] HttpError: '404 Not Found' for 'https://twitter.com/sessions'

@nvidals18
Copy link
Author

After investigating, here's what I've discovered:

The issue is not related to username/password credentials.
Gallery-dl is functioning correctly, and the problem is not with the .config file.
It seems that the problem is related to the URL structure. Specifically, I have a file called "twitter_list.txt," which contains URLs to pages like https://twitter.com/exampleuser/media. Previously, running gallery-dl.exe allowed me to download all the media on that page. However, I'm now encountering an error. Interestingly, when I provide a direct link (e.g., https://twitter.com/i/status/xyz), gallery-dl can successfully download individual files.

My question now is: how can I adjust either my .txt or .config file to regain the functionality I had before?

Thanks, everyone!

@mikf
Copy link
Owner

mikf commented Oct 28, 2023

[twitter][error] HttpError: '404 Not Found' for 'https://twitter.com/sessions'

The fact that it is still trying to login with /sessions means you are using a rather old version of gallery-dl, at least from before v1.24.0 (a24dcbe), which was released nearly a year ago.
Many things changed on Twitter since then. It would probably be best if you updated to the latest version. This would also fix your other mentioned issues.

@nvidals18
Copy link
Author

nvidals18 commented Oct 28, 2023 via email

@mikf
Copy link
Owner

mikf commented Oct 28, 2023

A 404 error usually means that you are not logged in.
Twitter now basically requires you to be logged in in order to use it.

Try providing cookies directly. Login with username and password sometimes doesn't work correctly.

@nvidals18
Copy link
Author

Thank you! I've tried to make this more clear and concise. I recently updated gallery-dl and attempted to use the simple command: gallery-dl https://twitter.com/user. However, I encountered a "[twitter][error] 404 Not Found ()" message with empty parentheses. But when I used the command gallery-dl https://twitter.com/user/status/123, it successfully downloaded the image from that address.

I apologize if I'm overlooking something obvious or making a mistake, as I have limited experience with this. Nonetheless, I'm enjoying the process of troubleshooting and experimenting to pinpoint the issue!

@NeonVolta
Copy link

did you find any way to fix this? gallery-dl still won't download whole accounts for me

@mikf
Copy link
Owner

mikf commented Nov 11, 2023

There is no "fix". You need to be logged in to download from Twitter #4734 (comment).
Some single Tweet URLs work without, but that's it.

@NeonVolta
Copy link

i am logged in, i've got an up to date cookies file and single tweets download fine, downloading whole accounts isn't working regardless of if i'm logged in or not

@dsypniewski
Copy link

dsypniewski commented Dec 4, 2023

I'm having almost the same issue - single tweets work just fine but whole profile fails on request for UserMedia right after UserByScreenName - yes I have provided username and password in the config and while running first time after that I did see a message [twitter][info] Logging in as ..

[twitter][error] 404 Not Found ()

I have also tried other strategy options and all of them fail in the same way just with different endpoints

gallery-dl version 1.26.3

-- UPDATE --
I was able to make it work by adding --cookies-from-browser chrome to the command, though adding browser as source of cookies in the config file for some reason didn't work and it doesn't seem to work every time

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

4 participants