Thats what I thought at first to but when I do this lynx whitescreens on me.
It looks like it is working a little
I think I found some issues looks like lynx is sending duplicate of
some text triggering my expect script to send before lynx is ready. I
think I fixed it if anyone else uses fedex insight manager feel free
to try this out.
my script was greatly reduced to the following
If anyone is interested I can give the parsing perl script I used to
strip out the info
#!/bin/sh
export username=fedex_insight_username
export password=fedex_insight_password
export view=fedex_custom_view
export mysqluser=mysqlusername
export mysqlpassword=mysqlpassword
export database=mysqldatabase
# put these variables in another file so I can share my script
if [ -f .fedexinfo ]; then
. .fedexinfo
fi
export view=`echo $view|sed s/" "/"+"/g`
rm -f manifest.*
expect -c "
#set no timeout
set timeout -1
#go to login
spawn lynx -nocolor -term=vt100 -accept_all_cookies
https://www.fedex.com/myfedex/go/home
#fillin username password
expect activate.
send /
expect query:
send User\ ID:\r
send ${username}\r
send ${password}\r
send \t\t\t\r
#search for Insight
#interact
expect activate.
expect activate.
send g
expect open:
send https://www.fedex.com/fedexiv/us/manifest/manifest_init.jsp?VIEW=${view}\r
#go to nonlink
expect activate.
send /
expect query:
send Close\ Window\r
send d
expect back.
expect back.
send \t\r
expect filename:
send \r
expect back.
send q
expect quit
send y
interact
"
mv -f manifest.jsp*.gz manifest.html.gz
gunzip manifest.html.gz
/root/fedex_parse.pl manifest.html|mysql $database -u $mysqluser
--password=$mysqlpassword
On 1/9/07, Thorsten Glaser <[EMAIL PROTECTED]> wrote:
Jeff Sadowski dixit:
> Problem is this when I change my screen size to anything but 80x24
> columns my script explodes on me an I have no idea why.
Try export LINES=24 COLUMNS=80.
//mirabile
--
"Using Lynx is like wearing a really good pair of shades: cuts out
the glare and harmful UV (ultra-vanity), and you feel so-o-o COOL."
-- Henry Nelson, March 1999
_______________________________________________
Lynx-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lynx-dev