Size of a remote URL

Justin justin__devine at hotmail.com
Mon Aug 30 23:31:54 CEST 2004


linklisttype =
['http://www.ecs.soton.ac.uk/~harnad/temp/ariadne-rae.doc',
'http://www.ecs.soto
n.ac.uk/~harnad/temp/ukparl.doc',
'http://www-admn.csun.edu/systech/techsupport/
procedures/2kcleanup.doc']

for y in linklisttype:

temp = urlopen(y)
temp2 = temp.info()
print temp2
temp3 = temp2.getheader("Content-Length")
print temp3
file_sizes.append(temp3)
print file_sizes

RESULT BELOW:

Date: Mon, 30 Aug 2004 21:28:55 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
None
[None]

Date: Mon, 30 Aug 2004 21:28:55 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
None
[None, None]

Server: NetWare-Enterprise-Web-Server/5.1
Date: Mon, 30 Aug 2004 21:28:55 GMT
Content-type: application/msword
Last-modified: Tue, 30 Apr 2002 22:50:08 GMT
Content-length: 297984
Accept-ranges: bytes
Connection: close
297984
[None, None, '297984']




More information about the Python-list mailing list