mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
11.34k stars 924 forks source link

[Twitter] Won't login #6040

Open a84r7a3rga76fg opened 4 weeks ago

a84r7a3rga76fg commented 4 weeks ago

I changed the user-agent to the latest Firefox and replaced the account name with the email address, neither worked. Importing cookies from the web browser seems to work.

[gallery-dl][debug] Version 1.27.3 - Executable (stable/windows)
[gallery-dl][debug] Python 3.8.10 - Windows-10-10.0.19045
[gallery-dl][debug] requests 2.31.0 - urllib3 2.1.0
[gallery-dl][debug] Configuration Files ['C:\\Users\\test\\gallery-dl\\gallery-dl.conf']
[1/3] https://x.com/regio15
[gallery-dl][debug] Starting DownloadJob for 'https://x.com/regio15'
[twitter][debug] Using TwitterUserExtractor for 'https://x.com/regio15'
[twitter][debug] Using TwitterAvatarExtractor for 'https://x.com/regio15/photo'
[twitter][info] Requesting guest token
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): api.x.com:443
[urllib3.connectionpool][debug] https://api.x.com:443 "POST /1.1/guest/activate.json HTTP/1.1" 200 62
[twitter][info] Logging in as 1234
[twitter][debug] Sleeping 29.99 seconds (request)
[urllib3.connectionpool][debug] https://api.x.com:443 "POST /1.1/onboarding/task.json?flow_name=login HTTP/1.1" 200 248
[twitter][debug] Sleeping 1.27 seconds (login (LoginJsInstrumentationSubtask))
[twitter][debug] Sleeping 28.72 seconds (request)
[urllib3.connectionpool][debug] https://api.x.com:443 "POST /1.1/onboarding/task.json HTTP/1.1" 200 974
[twitter][debug] Sleeping 1.69 seconds (login (LoginEnterUserIdentifierSSO))
[twitter][debug] Sleeping 28.31 seconds (request)
[urllib3.connectionpool][debug] https://api.x.com:443 "POST /1.1/onboarding/task.json HTTP/1.1" 200 621
[twitter][error] AuthenticationError: Login rejected as suspicious
[twitter][debug] Using TwitterBackgroundExtractor for 'https://x.com/regio15/header_photo'
[twitter][info] Logging in as 1234
[twitter][debug] Sleeping 30.00 seconds (request)
KeyboardInterrupt
gemini0x2 commented 4 weeks ago

Getting the same error message AuthenticationError: Login rejected as suspicious Importing cookies seems to work for now. @a84r7a3rga76fg thanks for the tip!

WarmWelcome commented 4 weeks ago

There have been several posts now about twitter issues in getting accounts disabled, having to swap IPs, and encountering various bot challenges and other difficulties. Is there a reliable way to avoid the bans and limits, and reliably capture every post without being limited and/or banned? I'm unsure if the platform will survive for much longer since it is bleeding advertisers, and there is no other adequate backup solution. I haven't been able to reliably run my backup script in months, and am missing an incredible amount due to having limits set for duplicates encountered to avoid the heavy limits that twitter imposes. Every stop in the middle ensures that there will be duplicates encountered at the beginning of a user's media, which will prevent it from downloading any of the posts past that.

a84r7a3rga76fg commented 3 weeks ago

reliably capture every post without being limited and/or banned?

Not really. I was always getting rate limited when I had timeline enabled. Haven't seen a rate limit since taking it off. When I get banned, it always happens when I've been rate limited and my IP address is on their list. I personally think disabling timeline is worth it.

hyenatown commented 3 weeks ago

I personally think disabling timeline is worth it.

Wow, no kidding huh? I haven't had a single issue with gallery-dl on twitter up until I heard about this cursor thing, and you're telling me it may have been part of the problem the whole time? This is kind of notable.

ericsia commented 3 weeks ago

same here, got my twitter banned 😭 twitter had been noticing this

WarmWelcome commented 1 week ago

I personally think disabling timeline is worth it.

Wow, no kidding huh? I haven't had a single issue with gallery-dl on twitter up until I heard about this cursor thing, and you're telling me it may have been part of the problem the whole time? This is kind of notable.

Does disabling timeline fix this logout issue then?