[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: an automated web browser



On Thu, Nov 22, 2001 at 06:38:43PM +0100, martin f krafft wrote:
> hi,
> i use this internet service that *requires* you to log in once a day,
> or they close your account after three days of inactivity. it's
> absolutely bloody ridiculous, but i have to live with it, for i do
> need the service (and there is no other like that one) about once a
> month. since i can't possibly access the web everyday (if i am
> traveling for instance), i would like to set up a cron script that
> basically surfs the site for me (including login). however, there are
> at least 10 Redirects happening before the login is counted, and
> that's just too much for my nerves as a shell scripter.
> 
> so i am wondering, there *has* to be a tool like lynx or the like,
> which will accept commands over stdin or the command line of the form:
> 
> - enter "madduck" into field "username"
> - enter "abc123" into field "password"
> - click onto "login" submit button
> (after all the redirects have settled, i need to take one other
>   step).
> - click onto the third link on the page  (or the link labeled
>   "something").
> 
> do you know of something like that?

I often found curl (http://curl.haxx.se/) quite useful for these kind
of automation tasks. It can POST forms, handle cookies, etc., but it
isn't fully automated in the sense of recording and replaying a web
session... You'd still first have to investigate what needs to be done
and then tell curl to simulate the session in a series of individual
requests (which links to follow, values of form variables, cookies,
special HTTP headers, and whatever else may be required...).
So, it may not be exactly what you're looking for, but it's a nice and
versatile tool, anyway :)

Cheers

-- 
Erdmut Pfeifer
science+computing ag
www.science-computing.de

-- Bugs come in through open windows. Keep Windows shut! --



Reply to: