On Dec 2, 2007 11:55 AM, Abandoned <be*****@gmail.comwrote:
Hi..
Can i find a file size witdhout download?
For example: www.roche.com/rochea_z_sp.pdf
How can i find its size with python ?
When you send an HTTP request, most servers will respond with the
content length. For instance, if you go to
http://web-sniffer.net/,
you can type in the file you want to view and you can see the header
sent and received, and for the example you gave, you'll notice the
HTTP Response Header includes a line
Content-Length: 4054802
That should be the information you're looking for.