sherlock-project / sherlock

Hunt down social media accounts by username across social networks
https://sherlockproject.xyz
MIT License
58.21k stars 6.71k forks source link

[-] Twitter: Error Connecting #1933

Open jlescalonap opened 10 months ago

jlescalonap commented 10 months ago

Checklist

Description

When queryng shows [-] Twitter: Error Connecting

DESCRIPTION Twitter always have problems to connect, I´ve updated Sherlock re-cloned, tried many times but always shows that twitter has problems to connect.

Piel-M commented 6 months ago

Yeah I have the same problem. Twitter always shows a connection error even if it's completely fine (cf images) Screenshot_2024-02-19-02-37-31-50_84d3000e3f4017145260f7618db1d683.jpg

IMG_20240219_023757.jpg

joaomfbh commented 6 months ago

Trying with a proxy still the same problem

image
joaomfbh commented 6 months ago

Doing a simple request with requests lib, I get the 400 status code and this message from content:

image "Please switch to a supported browser to continue using twitter.com. You can see a list of supported browsers in our Help Center."

Following the link to the supported browsers: https://help.twitter.com/pt/using-x/x-supported-browsers

joaomfbh commented 6 months ago

I found the problem. Just set a custom header with the User Agent parameter and the request will return 200 status code.

image

I'll work on a pr. Any idea to where to set this solution are welcome!

joaomfbh commented 6 months ago

Of course the header has already implemented (silly me). So, investigating a little more I found that the front end alternative for Twitter, called nitter is dead and the Sherlock project are using in url prob request.

https://www.reddit.com/r/privacy/comments/1act8c5/nitter_is_dead/ https://github.com/zedeus/nitter/issues/1155#issuecomment-1913361757

So, just making a direct request, without urlProbe param will work.

image