You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1018 B
39 lines
1018 B
--- a/urlgrabber/keepalive.py~ 2009-03-13 10:45:27.000000000 -0400
|
|
+++ b/urlgrabber/keepalive.py 2009-03-13 10:45:27.000000000 -0400
|
|
@@ -475,7 +475,7 @@
|
|
keepalive_handler.close_all()
|
|
|
|
def continuity(url):
|
|
- import md5
|
|
+ import hashlib
|
|
format = '%25s: %s'
|
|
|
|
# first fetch the file with the normal http handler
|
|
@@ -484,7 +484,7 @@
|
|
fo = urllib2.urlopen(url)
|
|
foo = fo.read()
|
|
fo.close()
|
|
- m = md5.new(foo)
|
|
+ m = hashlib.md5(foo)
|
|
print format % ('normal urllib', m.hexdigest())
|
|
|
|
# now install the keepalive handler and try again
|
|
@@ -494,7 +494,7 @@
|
|
fo = urllib2.urlopen(url)
|
|
foo = fo.read()
|
|
fo.close()
|
|
- m = md5.new(foo)
|
|
+ m = hashlib.md5(foo)
|
|
print format % ('keepalive read', m.hexdigest())
|
|
|
|
fo = urllib2.urlopen(url)
|
|
@@ -504,7 +504,7 @@
|
|
if f: foo = foo + f
|
|
else: break
|
|
fo.close()
|
|
- m = md5.new(foo)
|
|
+ m = hashlib.md5(foo)
|
|
print format % ('keepalive readline', m.hexdigest())
|
|
|
|
def comp(N, url):
|