471,310 Members | 1,382 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,310 software developers and data experts.

How can i find a file size on the web ?

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 ?
I'm sorry for my bad english.
Dec 2 '07 #1
1 1077
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.
Dec 2 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Harsha | last post: by
10 posts views Thread by Craig Bumpstead | last post: by
2 posts views Thread by Adam Teale | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.