Register
It is currently Tue Jul 22, 2014 8:52 am

Need Help with Lynx within a Bash Script


All times are UTC - 6 hours


Post new topic Reply to topic  [ 4 posts ] 
Author Message
 PostPosted: Thu Apr 03, 2008 1:00 pm   

Joined: Wed May 30, 2007 9:22 pm
Posts: 39
Location: California
Hey guys,

I am trying to write a script that uses lynx (and eventually links as well) in order to go to an URL, and then login with a username and password. Here's what I have so far:

Code:
  #ask for login name
    clear;
    read -p "Please Enter your Username: " username

  #ask for password
    clear;
    read -p "Please Enter your Password: " passw

  #invoke lynx
    lynx -accept_all_cookies http://www.theurl.com/my_account               
    goto form(loginForm);
    input username;
    goto form(loginPassword);
    input passw;


this isn't working at all. I would also prefer for all of the stuff lynx is doing to NOT be displayed to the user...rather I would like to show a progress bar or spinner while lynx does its thing that the script is telling it to do. I'm new to using lynx within a bash script and any help would be greatly appreciated. Any suggestions?

DeX


Top
 Profile  
 PostPosted: Fri Apr 04, 2008 10:42 am   

Joined: Tue Apr 01, 2008 10:19 am
Posts: 49
Can lynx even do that? Pretty sure it can't though I could be wrong.

Try using wget's
--http-user=USER set http user to USER.
--http-password=PASS set http password to PASS


Top
 Profile  
 PostPosted: Wed Apr 23, 2008 4:49 pm   
Site Admin
User avatar

Joined: Sun May 15, 2005 9:36 pm
Posts: 662
Location: Des Moines, Iowa
Actually I think curl works better than wget. Look into curl instead.


Top
 Profile WWW  
 PostPosted: Tue Apr 29, 2008 4:51 pm   

Joined: Wed May 30, 2007 9:22 pm
Posts: 39
Location: California
From what I can tell from my research, curl will work better than wget for this...it will still be a challenge but I think the script I'm working on will be a nice luxury for a lot of linux users.


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP