Reid Thompson
5/26/2009 11:25:00 PM
Alice Gheorghiu wrote:
> I am a newbie to Ruby and I created a script to process a file which I
> am getting from my local directory. However, in order to obtain this
> file, I do a manual login to a secure http site (https) which presents
> me with a logon screen where I enter the username and password. After
> successful authentication, I am presented with a download page which has
> as extension a php page which has a download button to get the file.
> After I download on my local Windows Vista machine, I use FileZilla to
> place it on the linux server.
> How can I automate this in Ruby with open-uri or other extension for
> that matter that would enable me to authenticate and get the file
> directly on my linux server?
> Any insight/code-example will be deeply appreciated.
> Thanks so much, -- Alice
can you ssh/scp directly to the secure http site (https) from a command line on
the linux host?
If so, you should be able to setup a passwordless login for scp and get the file
via a cron'd job using scp (google ssh passwordless login)
$ scp user_name@secure.http.site:/path/to/file /path/to/download/to/filename