Newbie: Downloading a pushed file
joshl at commenspace.org
Tue Aug 24 18:31:59 CEST 2004
First, I'm new at this.
Next, my question: I'm trying to write a script that downloads
requested files from a website.
The site works, I think, as follows:
1: Give the site a URL
2: Site comes back with a 'waiting' message, then after some time
returns a bunch of download URL's
3: If you open a window with the new download url _in the same
browser session_ then you get a new window which says things like
'processing' for a while, and then pushes you a file, for lack of a
better word. It's sort of like when you go to sourceforge and click a
download mirror, and then after a few seconds you get a window pop up
asking to save the file.
Now, so far I've managed, in an ugly manner I am sure, to get the
initial page, parse the download URL's, and I did this having pything
use an IE browser, as described in:
My problem is when I get to the download page, how do I tell ie to go
ahead and save the file it gets pushed?
Another question would be how do I do it without IE .. I assume if I
keep the socket open and send the site some header, perhaps
HTTP_REFERER, then it will let me move on to the download pages, but I
havent even figured out how to re-read the socket after the initial page
refreshes (every re-read comes up blank, even though I know the page
should have sent me new data)
Sorry for my probably poorly worded descriptions, and thanks for any help.
More information about the Python-list