python - downloading a file from a page -


i make script (in language, preferably python or perl) download specific type of file being streamed web page. not know files location have find out finding files being streamed page, , selecting 1 want based on file type.

a similar example want download video off youtube, there no pattern or way find url except finding files being streamed computer.

the part cannot figure out how find files being streamed page. rest can myself. file name not mentioned anywhere in source of html page.

example of problem...

this works fine:

import urllib urllib.urlretrieve ("http://example.com/anything.mp3", "a.mp3") 

however not:

import urllib urllib.urlretrieve ("http://example.com/page-where-the-mp3-file-is-being-streamed.html", "a.mp3") 

if can me figure out how download files page or find files being streamed appreciate it. all need know language/library/method can accomplish this.thanks


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -