My Browser Is Able To Download A File (from Url), But Python's Requests And Pycurl Gets "connection Was Reset" Error. How To Fix?
I'm trying to download several large files from a server through a url. When downloading the file through Chrome or Internet Explorer it takes around 4-5 minutes to download the f
Solution 1:
Try adding headers and cookies to your request.
headers = { "User-Agent": "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36" }
cookies = { "Cookie1": "Value1"}
r = requests.get(url, headers=headers, cookies=cookies)
Post a Comment for "My Browser Is Able To Download A File (from Url), But Python's Requests And Pycurl Gets "connection Was Reset" Error. How To Fix?"