A file downloads when an HTML address is entered. How do I automate this?

42 views Asked by At

Sorry but I don't know all the correct terminology, so I'll explain it the best I can.

I have an HTML link: http://my.website.com/index.sjs?f=DownloadFile&data_id=16

I've stored it as a bookmark, and when I select that bookmark a file automatically downloads while a blank page opens in my browser.

I want to download this file once a day, so I'd like to do this via a CRON job. I'm writing a Python program that will deal with this file later.

What UNIX commands would I use to do this? Since the link doesn't actually point to a file, I don't think I can use CURL or WGET. Hopefully I'm wrong. Thanks!

1

There are 1 answers

1
mgilson On

file downloads are triggered by a little metadata in the response headers. The content is really no different than anything else -- In other words, I don't see any reason that it shouldn't work with CURL or WGET...

Unless the website is triggering the download in javascript, but that doesn't sound like the case you've described...