This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import urllib | |
import urllib2 | |
from time import sleep | |
def do_http(url, data=None): | |
if data: | |
return urllib2.urlopen(urllib2.Request(url, data)).read() | |
else: | |
return urllib2.urlopen(urllib2.Request(url)).read() |