I'm trying to crawl a website.
url = "http://www.hellotrade.com/business/"
headers = {
"User-Agent":"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36",
'Connection':'close'
}
res = requests.get(url, headers = headers, timeout = 30)
It runs perfectly at the beginning, but after running a while later, it comes out the error message.
Traceback (most recent call last):
File "C:\Users\millshih\Desktop\hellotrade.py", line 32, in <module> res = s.get(url, headers = headers, timeout = 30)
File "C:\Python27\lib\site-packages\requests\sessions.py", line 521, in get
return self.request('GET', url, **kwargs)
File "C:\Python27\lib\site-packages\requests\sessions.py", line 508, in request resp = self.send(prep, **send_kwargs)
File "C:\Python27\lib\site-packages\requests\sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "C:\Python27\lib\site-packages\requests\adapters.py", line 508, in send
raise ConnectionError(e, request=request)requests.exceptions.ConnectionError: HTTPConnectionPool(host='www.hellotrade.com', port=80): Max retries exceeded with url: /business/ (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0294F3D0>: Failed to establish a new connection: [Errno 10060] \xb3s\xbdu\xb9\xc1\xb8\xd5\xa5\xa2\xb1\xd1\xa1A\xa6]\xac\xb0\xb3s\xbdu\xb9\xef\xb6H\xa6\xb3\xa4@\xacq\xae\xc9\xb6\xa1\xa8\xc3\xa5\xbc\xa5\xbf\xbdT\xa6^\xc0\xb3\xa1A\xa9\xce\xacO\xb3s\xbdu\xab\xd8\xa5\xdf\xa5\xa2\xb1\xd1\xa1A\xa6]\xac\xb0\xb3s\xbdu\xaa\xba\xa5D\xbe\xf7\xb5L\xaak\xa6^\xc0\xb3\xa1C',))
After this error, I have to wait until next day then it can run again, but it will have same problem after running couple minutes later.
But my browser is doing well to surf this website. So, it means my IP is not banned by this website.
I've tried this and some other ways from the internet, but it can't work at all.
I'm wondering maybe it is because of my internet connection problem?