Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jul 27th, 2013  |  syntax: None  |  size: 0.19 KB  |  views: 62  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. proxy_support = urllib2.ProxyHandler({"http" : "127.0.0.1:8118"})
  2. opener = urllib2.build_opener(proxy_support)
  3. opener.addheaders = [('User-agent', 'Mozilla/5.0')]
  4. print opener.open(url).read()