On Thu, Nov 26, 2009 at 5:14 AM, MajorProgamming sefira...@gmail.com wrote:
Is there any way to somehow fetch an external MP3 file (i.e. from
another website), and then calculate the length of the MP3 file.
I don't need the actual data of the file, I just want the length of it
(time it runs).
Keep in mind that these files can be as big as 25MB...
Thanks,
Hello,
Good question guaranteed to depend on host config (could be custom or
fake descriptions) while one mentioned way is use HTTP HEAD
#Call HTTP HEAD in Python
import httplib
conn=httplib.HTTPConnection(www.abc.com)
conn.request(HEAD, /dir/file1.mp3)
res=conn.getresponse()
fileSize=res.getheader('content-length')
#or res.getheaders() for all headers
conn.close()
--
You received this message because you are subscribed to the Google Groups
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.