From 906bb7c1ecc5c34aa93148894eef763f27eba98e Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 12 May 2015 12:22:20 +0200 Subject: Other import fixes --- pyload/network/HTTPRequest.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pyload/network/HTTPRequest.py') diff --git a/pyload/network/HTTPRequest.py b/pyload/network/HTTPRequest.py index a27c59ff2..22a4cc604 100644 --- a/pyload/network/HTTPRequest.py +++ b/pyload/network/HTTPRequest.py @@ -3,12 +3,12 @@ from __future__ import with_statement +import codecs import logging import urllib import pycurl -from codecs import getincrementaldecoder, lookup, BOM_UTF8 from httplib import responses from cStringIO import StringIO @@ -267,10 +267,10 @@ class HTTPRequest(object): try: # self.log.debug("Decoded %s" % encoding ) - if lookup(encoding).name == 'utf-8' and rep.startswith(BOM_UTF8): + if codecs.lookup(encoding).name == 'utf-8' and rep.startswith(codecs.BOM_UTF8): encoding = 'utf-8-sig' - decoder = getincrementaldecoder(encoding)("replace") + decoder = codecs.getincrementaldecoder(encoding)("replace") rep = decoder.decode(rep, True) # TODO: html_unescape as default -- cgit v1.2.3