net.readUrlUnicode can take data, headers too

This commit is contained in:
j 2011-04-26 23:11:24 +02:00
parent cbca12c3d8
commit c66787785f

View file

@ -60,8 +60,8 @@ def readUrl(url, data=None, headers=DEFAULT_HEADERS, returnHeaders=False):
return dict(f.headers), data
return data
def readUrlUnicode(url):
data = readUrl(url)
def readUrlUnicode(url, data=None, headers=DEFAULT_HEADERS):
data = readUrl(url, data, headers)
encoding = getEncoding(data)
if not encoding:
encoding = 'latin-1'