I have no idea what I changed there
[nil.git] / nil / http.py
blobbd6b0d31ff7c6266982078c73d3ad12772b0fdec
1 import urllib2
3 def download(url):
4 request = urllib2.Request(url)
5 response = urllib2.urlopen(request)
6 data = response.read()
7 return data
9 try:
10 request = urllib2.Request(url)
11 response = urllib2.urlopen(request)
12 data = response.read()
13 return data
14 except:
15 return None