sacma sapan konfigurasyonu olan sunucularla da calisabilelim..
This commit is contained in:
+4
-3
@@ -134,9 +134,10 @@ class Fetcher:
|
|||||||
except HTTPException, e:
|
except HTTPException, e:
|
||||||
self.err(('(%s): %s') % (e.__class__.__name__, e))
|
self.err(('(%s): %s') % (e.__class__.__name__, e))
|
||||||
|
|
||||||
if headers and not headers.has_key('Content-Length'):
|
try:
|
||||||
totalsize = 0 # could not get the totalsize of file
|
totalsize = int(headers['Content-Length'])
|
||||||
else: totalsize = int(headers['Content-Length'])
|
except:
|
||||||
|
totalsize = 0
|
||||||
|
|
||||||
dest = open(os.path.join(self.filedest, self.url.filename()) , "w")
|
dest = open(os.path.join(self.filedest, self.url.filename()) , "w")
|
||||||
self._do_grab(fileObj, dest, totalsize)
|
self._do_grab(fileObj, dest, totalsize)
|
||||||
|
|||||||
Reference in New Issue
Block a user