By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,627 Members | 1,211 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,627 IT Pros & Developers. It's quick & easy.

How can i find a file size on the web ?

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.