Size of a remote URL

Justin justin__devine at hotmail.com
Mon Aug 30 21:40:53 CEST 2004


Ok so the problem is that my code is not requesting the headers
properly.  I get back.  Just that.  I don't know what the difference is
between the IE request and mine

\ Date: Mon, 30 Aug 2004 19:36:20 GMT
Server: Apache/1.3.27 (Unix)  (Red-Hat/Linux) mod_ssl/2.8.12
OpenSSL/0.9.6b DAV/
1.0.3 PHP/4.3.2 mod_perl/1.26
Connection: close
Content-Type: text/html; charset=iso-8859-1


My code:
for y in linklisttype:
w = urlopen(y)
z = w.info()
x = z.getheader("Content-Length")
file_sizes.append(x)
Is there a better method for getting headers than urlopen?




More information about the Python-list mailing list