text: Proxies are headache for many people. They restrict you from many things you love to do. In this short article I will tell you how to write scripts to work under proxy in python. Its really simple and you don’t need to know anything exceptional except a bit of python programming language. Lets see how to download under proxy with python
  How to download under proxy with python
  For download, in python people generally use two libraries. First one is requests and the other one is urllib.
  We will discuss the script in both the libraries.
  urllib
  import urllib proxies = {'http': '', 'https': ''} res=urllib.urlopen("",proxies=proxies) con=res.read() outf=open("imgname.jpg",'wb') outf.write(con) outf.close()
  What we did here:
  We import the library, set the proxies in dictionary, open the url with proxies as parameters. Read the content of the url then write it down in a file. Here we saved an image and it is done in no time. Really simple isn’t it.
  Requests
  import requests proxies = {'http': '', 'https': ''} res=requests.get("",proxies=proxies) con=res.content outf=open("imgname.jpg",'wb') outf.write(con) outf.close()
  Yes exactly the same there is a very little change which anyone can understand so I don’t need to explain it.
  So this is the end of article How to download under proxy with python.