[twill] authentication problem

James Cameron james.cameron at hp.com
Thu Apr 16 17:20:18 PDT 2009


On Thu, Apr 16, 2009 at 05:16:00PM -0700, Tennis Smith wrote:
>    Yes, I have to fill in a form.  Can you point me to an example of how
>    to do that? THanks. :)

Sure.

My internet service provider has a web page to tell me the current
usage, and it works by prompting in a form, then issuing a cookie that
is used to validate further requests.

For this I used twill-sh in a shell script as follows:

twill-sh <<EOF >/dev/null 2>/dev/null
go https://example.com/usage/daily/
fv Login username quozl
fv Login password qwertyuiop
submit
save_html /var/tmp/usage.html
EOF

The remains of my script processed the usage.html file to get the byte
counts.

-- 
James Cameron
http://ftp.hp.com.au/sigs/jc/



More information about the twill mailing list