urllib confusion

Tim H tim--at-- at frontier--dot--.net
Wed Feb 18 03:17:40 EST 2009


When I attempt to open 2 different pages on the same site I get 2 copies 
of the first page. ??

ie

links = [ 'http://site.org/foo/1/bar',
           'http://site.org/foo/2/bar' ]

for url in links:
	print "url:", url
	f = urlopen(url, params)
	print "Actual url:", f.geturl()
	print f.read()
	f.close()


results in:

url: http://site.org/foo/1/bar
Actual url: http://site.org/foo/1/bar
page 1 contents
url: http://site.org/foo/2/bar
Actual url: http://site.org/foo/1/bar
page 1 contents

f.getinfo() shows two different session ID's

Any thoughts?

Thanks,
Tim
	
WinXP-x64
python 2.6.1 x64



More information about the Python-list mailing list