Trying to automate downloads.

NJDubois

Well-known member
Joined
May 15, 2008
Messages
84
Programming Experience
Beginner
I have a service, I log in and it provides me with an html based report of phone calls. There is a link to a jsp file that when you click it it starts a download of the audio file for that phone call.

If I right click on this link and copy the address it looks a little like this (I changes numbers for privacy reasons) :
http://www.calltrackdata.com/webrep...thentication=97D9A69B3BD09584C533DA1634A2C2E8

audio.jsp is taking this info, and returning the mp3. The web browser handles the download, and I get prompted to select where I want to save it and yada yada.

I am trying to automate this process. I want to feed a program the html, and have it parse the data that I need out of it. The problem is I need the audio file url so I can do a bulk download.

Now you see my issue. There is no URL for an audio file, audio.jsp handles that.

I have tried using a web browser control on a vb.net form and navigating to the above URL, but it does the internet explorer prompts, run, open. Where do you want to save it and so on.

I don't want that!

So, is there a way I can feed this audio.jsp file the correct info it needs, capture the returned URL and use it to manually download the audio file with in the bulk downloader?

Any suggestions?

Any help is as always greatly appreciated!

Thanks
Nick
 
There would be no returned URL. The only URL would be the one you showed. That JSP file would just be returning data. While I've never tried it, I think that you should just be able to use a WebClient and call its DownloadFile method using the URL you already have. If that doesn't work, try DownloadData instead and then save the data to a file yourself.
 
It will not work, for the same reason I stated here. If the page requires no login, you might be able to use an HttpWebRequest, use GetWebResponse to get the http response, then GetWebStream to catch the actual file, but that will not work if you need a stored cookie to login to the page. In that case I would suggest the same thing as in the previous thread, look into UI automation through MSAA or UIA.
 
Back
Top