I was trying to download pictures from websites like 'http://xxx.jpg'. The code: headers={'user-agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36'} url='http://xxx.jpg' response = requests.get(url,headers=headers) downloadFunction() The error writes: requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)) Error occurred at the first request, so it wasn't the request frequency which had caused the error. And I could still open the websites using a browser, so I just needed the code to act more like a browser. How can I achieve that besides setting the user-agent? Continue reading...