net.readUrlUnicode can take data, headers too
This commit is contained in:
parent
cbca12c3d8
commit
c66787785f
1 changed files with 2 additions and 2 deletions
|
@ -60,8 +60,8 @@ def readUrl(url, data=None, headers=DEFAULT_HEADERS, returnHeaders=False):
|
||||||
return dict(f.headers), data
|
return dict(f.headers), data
|
||||||
return data
|
return data
|
||||||
|
|
||||||
def readUrlUnicode(url):
|
def readUrlUnicode(url, data=None, headers=DEFAULT_HEADERS):
|
||||||
data = readUrl(url)
|
data = readUrl(url, data, headers)
|
||||||
encoding = getEncoding(data)
|
encoding = getEncoding(data)
|
||||||
if not encoding:
|
if not encoding:
|
||||||
encoding = 'latin-1'
|
encoding = 'latin-1'
|
||||||
|
|
Loading…
Reference in a new issue