rename response
parent
ec149abdc6
commit
155c10cc91
|
@ -134,13 +134,14 @@ class SearcherABC:
|
||||||
self.log('[makeRequest]: HTTP Error, e.code=' + str(e.code))
|
self.log('[makeRequest]: HTTP Error, e.code=' + str(e.code))
|
||||||
return
|
return
|
||||||
#self.cookieJar.extract_cookies(response, urllib2)
|
#self.cookieJar.extract_cookies(response, urllib2)
|
||||||
|
#self.log(response.info().get('Set-Cookie'))
|
||||||
if response.info().get('Content-Encoding') == 'gzip':
|
if response.info().get('Content-Encoding') == 'gzip':
|
||||||
buf = StringIO(response.read())
|
buf = StringIO(response.read())
|
||||||
decomp = zlib.decompressobj(16 + zlib.MAX_WBITS)
|
decomp = zlib.decompressobj(16 + zlib.MAX_WBITS)
|
||||||
response = decomp.decompress(buf.getvalue())
|
text = decomp.decompress(buf.getvalue())
|
||||||
else:
|
else:
|
||||||
response = response.read()
|
text = response.read()
|
||||||
return response
|
return text
|
||||||
|
|
||||||
def askCaptcha(self, url):
|
def askCaptcha(self, url):
|
||||||
temp_dir = self.tempdir()
|
temp_dir = self.tempdir()
|
||||||
|
|
Loading…
Reference in New Issue