Skip to content
This repository has been archived by the owner on Mar 30, 2023. It is now read-only.

[ERROR] CRITICAL:root:twint.get:User:Cannot connect to host twitter.com:80 ssl:False [Connect call failed ('74.86.12.172', 80)] #442

Closed
frenchthibaut123 opened this issue May 30, 2019 · 20 comments

Comments

@frenchthibaut123
Copy link

Hi,

I am trying to use Twint.
I am running Python 3.6 on a Windows 10 machine.
I am indeed connected to the Internet but, I do use a VPN.

COMMAND RAN
twint -u officialmcafee --since 2019-2-17

ERROR
`CRITICAL:root:twint.get:User:Cannot connect to host twitter.com:80 ssl:False [Connect call failed ('75.126.115.192', 80)]
Traceback (most recent call last):
File "c:\users\thibaut\appdata\local\programs\python\python36-32\lib\site-packages\aiohttp\connector.py", line 924, in _wrap_create_connection
await self._loop.create_connection(*args, **kwargs))
File "c:\users\thibaut\appdata\local\programs\python\python36-32\lib\asyncio\base_events.py", line 777, in create_connection
raise exceptions[0]
File "c:\users\thibaut\appdata\local\programs\python\python36-32\lib\asyncio\base_events.py", line 764, in create_connection
yield from self.sock_connect(sock, address)
File "c:\users\thibaut\appdata\local\programs\python\python36-32\lib\asyncio\selector_events.py", line 450, in sock_connect
return (yield from fut)
File "c:\users\thibaut\appdata\local\programs\python\python36-32\lib\asyncio\selector_events.py", line 480, in _sock_connect_cb
raise OSError(err, 'Connect call failed %s' % (address,))
TimeoutError: [Errno 10060] Connect call failed ('75.126.115.192', 80)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\Thibaut\AppData\Local\Programs\Python\Python36-32\Scripts\twint-script.py", line 11, in
load_entry_point('twint', 'console_scripts', 'twint')()
File "c:\users\thibaut\src\twint\twint\cli.py", line 270, in run_as_command
main()
File "c:\users\thibaut\src\twint\twint\cli.py", line 262, in main
run.Search(c)
File "c:\users\thibaut\src\twint\twint\run.py", line 279, in Search
run(config, callback)
File "c:\users\thibaut\src\twint\twint\run.py", line 200, in run
get_event_loop().run_until_complete(Twint(config).main(callback))
File "c:\users\thibaut\appdata\local\programs\python\python36-32\lib\asyncio\base_events.py", line 467, in run_until_complete
return future.result()
File "c:\users\thibaut\src\twint\twint\run.py", line 141, in main
await task
File "c:\users\thibaut\src\twint\twint\run.py", line 185, in run
await self.tweets()
File "c:\users\thibaut\src\twint\twint\run.py", line 124, in tweets
await self.Feed()
File "c:\users\thibaut\src\twint\twint\run.py", line 50, in Feed
response = await get.RequestUrl(self.config, self.init, headers=[("User-Agent", self.user_agent)])
File "c:\users\thibaut\src\twint\twint\get.py", line 107, in RequestUrl
response = await Request(_url, params=params, connector=_connector, headers=headers)
File "c:\users\thibaut\src\twint\twint\get.py", line 157, in Request
return await Response(session, url, params)
File "c:\users\thibaut\src\twint\twint\get.py", line 162, in Response
async with session.get(url, ssl=False, params=params, proxy=httpproxy) as response:
File "c:\users\thibaut\appdata\local\programs\python\python36-32\lib\site-packages\aiohttp\client.py", line 1005, in aenter
self._resp = await self._coro
File "c:\users\thibaut\appdata\local\programs\python\python36-32\lib\site-packages\aiohttp\client.py", line 476, in _request
timeout=real_timeout
File "c:\users\thibaut\appdata\local\programs\python\python36-32\lib\site-packages\aiohttp\connector.py", line 522, in connect
proto = await self._create_connection(req, traces, timeout)
File "c:\users\thibaut\appdata\local\programs\python\python36-32\lib\site-packages\aiohttp\connector.py", line 854, in _create_connection
req, traces, timeout)
File "c:\users\thibaut\appdata\local\programs\python\python36-32\lib\site-packages\aiohttp\connector.py", line 992, in _create_direct_connection
raise last_exc
File "c:\users\thibaut\appdata\local\programs\python\python36-32\lib\site-packages\aiohttp\connector.py", line 974, in _create_direct_connection
req=req, client_error=client_error)
File "c:\users\thibaut\appdata\local\programs\python\python36-32\lib\site-packages\aiohttp\connector.py", line 931, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host twitter.com:80 ssl:False [Connect call failed ('75.126.115.192', 80)]`

Any suggestion?

Thank you

@pielco11
Copy link
Member

You're having connection issues with Twitter, as the log says

Twint is working fine, tested now

I suggest you to try later or use a VPN

@frenchthibaut123
Copy link
Author

Thank you!
Solved, it was a VPN issue (blocking port 80).

@epanmareza
Copy link

so, when we got that error, shall i to install vpn ?

@pielco11
Copy link
Member

@epanmareza it depends by your network setup. The issue is on your end because Twitter works fine

@epanmareza
Copy link

g = twint.Config()
g.Search = 'riau'
g.Custom['tweets'] = ['id','username']
g.Since = '2019-08-29'
g.Until = '2019-09-10'
g.Output = 'twintriau.csv'
g.Store_csv = True
i = 0
while True:
try:
twint.run.Search(g)
except AttributeError:
i += 100000
tweets = twint.output.tweets_object
g.Resume = tweets[len(tweets) - 1].id - i
print("broken id :: " + str(g.Resume))

when it on progress, i got an error
TimeoutError: [Errno 10060] Connect call failed ('104.244.42.65', 80)
The above exception was the direct cause of the following exception:

ClientConnectorError: Cannot connect to host twitter.com:80 ssl:False [Connect call failed ('104.244.42.65', 80)]

@pielco11
Copy link
Member

@epanmareza I think that you are using an old and deprecated version of resuming option, since Twitter encoded the resume ID

Anyway, it seems that Twitter is blocking your connections. This issue might be caused by your firewall or something else. Not related to Twint

@epanmareza
Copy link

which one resuming option that i should use ?

@pielco11
Copy link
Member

@epanmareza just specify a file and Twint will handle it. Like config.Resume = "my_resume_session_123.txt"

@icmpnorequest
Copy link

@pielco11
Hi,

I tried using a VPN, but still get the error:

CRITICAL:root:twint.get:User:Cannot connect to host twitter.com:443 ssl:True [Connect call failed ('66.220.147.44', 443)]

Any ideas to solve? Thanks in advance!

@hap2023
Copy link

hap2023 commented Jun 23, 2020

Thank you!
Solved, it was a VPN issue (blocking port 80).

Hi,may I know how did you solve this issue?

@R6Six
Copy link

R6Six commented Jun 23, 2020

Thank you!
Solved, it was a VPN issue (blocking port 80).

Hi,may I know how did you solve this issue?

Hi, have you sovled it? I‘m troubled by this problem,too.

@frenchthibaut
Copy link

Thank you!
Solved, it was a VPN issue (blocking port 80).

Hi,may I know how did you solve this issue?

Hi, have you sovled it? I‘m troubled by this problem,too.

Hi,
Back then I was living in China where Twitter isn't accessible without a VPN.
When I posted the message, it seemed that the VPN server I used wasn't able to reach Twitter's website. So I switched to another VPN server, ensured I had access to Twitter's website and then tried Twint. That time, it worked.
If Twitter isn't blocked where you are, the use of a VPN isn't mandatory to get Twint to work.

@R6Six
Copy link

R6Six commented Jun 23, 2020

Thank you!
Solved, it was a VPN issue (blocking port 80).

Hi,may I know how did you solve this issue?

Hi, have you sovled it? I‘m troubled by this problem,too.

Hi,
Back then I was living in China where Twitter isn't accessible without a VPN.
When I posted the message, it seemed that the VPN server I used wasn't able to reach Twitter's website. So I switched to another VPN server, ensured I had access to Twitter's website and then tried Twint. That time, it worked.
If Twitter isn't blocked where you are, the use of a VPN isn't mandatory to get Twint to work.

Thank you!
But the VPN I used now can help me reach Twitter's website ,and I don't know why just Twint can't work. So sad....

@Kittyuzu1207
Copy link

Thank you!
Solved, it was a VPN issue (blocking port 80).

Hi,may I know how did you solve this issue?

Hi, have you sovled it? I‘m troubled by this problem,too.

Hi,
Back then I was living in China where Twitter isn't accessible without a VPN.
When I posted the message, it seemed that the VPN server I used wasn't able to reach Twitter's website. So I switched to another VPN server, ensured I had access to Twitter's website and then tried Twint. That time, it worked.
If Twitter isn't blocked where you are, the use of a VPN isn't mandatory to get Twint to work.

Thank you!
But the VPN I used now can help me reach Twitter's website ,and I don't know why just Twint can't work. So sad....

Hello~ Have you solved the problem? I have encountered the same problem. The VPN I used now can reach Twitter's website ,but I don't know why just Twint can't work. Thank you!

@LiuooEM
Copy link

LiuooEM commented Jul 15, 2020

Thank you!
Solved, it was a VPN issue (blocking port 80).

Hi,may I know how did you solve this issue?

Hi, have you sovled it? I‘m troubled by this problem,too.

Hi,
Back then I was living in China where Twitter isn't accessible without a VPN.
When I posted the message, it seemed that the VPN server I used wasn't able to reach Twitter's website. So I switched to another VPN server, ensured I had access to Twitter's website and then tried Twint. That time, it worked.
If Twitter isn't blocked where you are, the use of a VPN isn't mandatory to get Twint to work.

Thank you!
But the VPN I used now can help me reach Twitter's website ,and I don't know why just Twint can't work. So sad....

Hello~ Have you solved the problem? I have encountered the same problem. The VPN I used now can reach Twitter's website ,but I don't know why just Twint can't work. Thank you!

Are you sure you are using VPN rather than a SSR app? I have the same problem when I'm using SSR, I can reach Twitter's website, but I can't use twint. You can try to ping www.twitter.com, if it doesn't work, it means you need to use a VPN app. Now I'm using expressvpn, you can also try Nord or some other VPN app. Hope my experience can help you!

@Kittyuzu1207
Copy link

Thank you!
Solved, it was a VPN issue (blocking port 80).

Hi,may I know how did you solve this issue?

Hi, have you sovled it? I‘m troubled by this problem,too.

Hi,
Back then I was living in China where Twitter isn't accessible without a VPN.
When I posted the message, it seemed that the VPN server I used wasn't able to reach Twitter's website. So I switched to another VPN server, ensured I had access to Twitter's website and then tried Twint. That time, it worked.
If Twitter isn't blocked where you are, the use of a VPN isn't mandatory to get Twint to work.

Thank you!
But the VPN I used now can help me reach Twitter's website ,and I don't know why just Twint can't work. So sad....

Hello~ Have you solved the problem? I have encountered the same problem. The VPN I used now can reach Twitter's website ,but I don't know why just Twint can't work. Thank you!

Are you sure you are using VPN rather than a SSR app? I have the same problem when I'm using SSR, I can reach Twitter's website, but I can't use twint. You can try to ping www.twitter.com, if it doesn't work, it means you need to use a VPN app. Now I'm using expressvpn, you can also try Nord or some other VPN app. Hope my experience can help you!

Yeah! That's the point! Thank you so much for your reply! It's really helpful! When I changed to another VPN app, it works~

@tulipsliu
Copy link

Thank you!
Solved, it was a VPN issue (blocking port 80).

Hi,may I know how did you solve this issue?

Hi, have you sovled it? I‘m troubled by this problem,too.

Hi,
Back then I was living in China where Twitter isn't accessible without a VPN.
When I posted the message, it seemed that the VPN server I used wasn't able to reach Twitter's website. So I switched to another VPN server, ensured I had access to Twitter's website and then tried Twint. That time, it worked.
If Twitter isn't blocked where you are, the use of a VPN isn't mandatory to get Twint to work.

I am living in China , use a lot of VPN .it is not connect to twitter ,twint can not work . Can you give some sugesst.
port 443 error

@ephiewang
Copy link

Thank you!
Solved, it was a VPN issue (blocking port 80).

Hi,may I know how did you solve this issue?

Hi, have you sovled it? I‘m troubled by this problem,too.

Hi,
Back then I was living in China where Twitter isn't accessible without a VPN.
When I posted the message, it seemed that the VPN server I used wasn't able to reach Twitter's website. So I switched to another VPN server, ensured I had access to Twitter's website and then tried Twint. That time, it worked.
If Twitter isn't blocked where you are, the use of a VPN isn't mandatory to get Twint to work.

I am living in China , use a lot of VPN .it is not connect to twitter ,twint can not work . Can you give some sugesst.
port 443 error

Hi! I suppose you should just try to ping www.twitter.com with your VPN to see if it works or not.

@h4m5t
Copy link

h4m5t commented Mar 21, 2021

Thank you!
Solved, it was a VPN issue (blocking port 80).

Hi,may I know how did you solve this issue?

Hi, have you sovled it? I‘m troubled by this problem,too.

Hi,
Back then I was living in China where Twitter isn't accessible without a VPN.
When I posted the message, it seemed that the VPN server I used wasn't able to reach Twitter's website. So I switched to another VPN server, ensured I had access to Twitter's website and then tried Twint. That time, it worked.
If Twitter isn't blocked where you are, the use of a VPN isn't mandatory to get Twint to work.

Thank you!
But the VPN I used now can help me reach Twitter's website ,and I don't know why just Twint can't work. So sad....

Hello~ Have you solved the problem? I have encountered the same problem. The VPN I used now can reach Twitter's website ,but I don't know why just Twint can't work. Thank you!

me too.I have encountered the same problem.

@huang122124
Copy link

I found many Q&A and conclude that we can use ExpressVpn or NodeVpn to solve this problem.Note that it should be a vpn application NOT SSR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests