LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-18-2009, 10:54 AM   #1
madmatrix
LQ Newbie
 
Registered: Apr 2009
Posts: 6

Rep: Reputation: 0
Any other text mode browser like lynx?


Hi there,

I want to write one script to automatically browse the website inputing my account log in information, clicking some links one by one and then getting some information from the website.

I want to use lynx in my perl script. But after trying lynx to browse the amazon website, I found lynx can't go to some page. The web page can't be accessed even I enabled the cookies in the lynx preference and use -accept_all_cookies. The web still asked me to enable the cookie.

Is there any other text-mode browser in linux? I have written automated script for IE to automatically browse website. But I think this work could be better in linux with perl script.

Thanks all.

Lou
 
Old 04-18-2009, 10:55 AM   #2
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Sure, elinks. It's more powerful than lynx.
 
Old 04-18-2009, 11:29 AM   #3
MoonMind
Member
 
Registered: May 2005
Location: Switzerland
Distribution: Ubuntu
Posts: 448

Rep: Reputation: 38
A great many sites make unreasonably heavy use of JavaScript (or the likes) - text browsers are fast and useful to display static content, but can't handle some types of dynamic content (which, considering neclected standpoints like security, is essentially a very good thing); a good indicator of what might be going on is to visit the website in question with Firefox and NoScript in order to look at the scripts that are used. You may indeed find that some websites can't be used with text browsers.

In that respect, it's really no surprise they work with IE - that browser doesn't distinguish between wanted, sensible or bogus acitivity from the webserver, it just does what the website tells it to. If you consider this a good thing, think about malware, cross-site scripting and the like for just a little moment... And there are still a lot of so-called web-designers out there who don't care about standards and "develop" for IE (I don't call that kind of thing "developing") - making access with other tools difficult or impossilbe in the process.

Another text browser: w3m. links2 is also an option, but elinks normally beats it if it comes to performance (not speed, flexibility) and features.

M.
 
Old 04-18-2009, 12:47 PM   #4
madmatrix
LQ Newbie
 
Registered: Apr 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Thank you guys. I just searched elinks. It's much powerful. I will try this command tool. Thanks.

Lou
 
Old 04-20-2009, 06:38 AM   #5
madmatrix
LQ Newbie
 
Registered: Apr 2009
Posts: 6

Original Poster
Rep: Reputation: 0
I tried elinks in Fedora 10. It's really cool text mode browser. But it seems not the one I want. What I want to do is:

1st step: Open one webpage. I can just simply write the command in my script: elinks www.myexampleweb.com

2nd step: Move to the user and password field to input user name and password to log in. Can't find the option in elinks command. I want to use one command in script to feed the form and don't want to manualy input them.

3rd step: Click one link by text. I did this in one script language in Windows OS with IE browser. But I can't find similar option in elinks.

The biggest difficult is how to write the command one by one to execute the sequential action of browsing. I mean if elinks can return the handle for the current browsing session. Then the following command can use that handle to continue to browse. Like:

$handle = `elinks www.myexampleweb.com`
elinks $handle -option1
elinks $handle -option2
....

How can I get this automatic browsing done by elinks? Any help is appreciated.

Lou
 
Old 04-20-2009, 09:17 AM   #6
songahige
LQ Newbie
 
Registered: Mar 2009
Posts: 4

Rep: Reputation: 2
Wht s lynx?it s like netrik?
 
Old 04-20-2009, 11:44 AM   #7
madmatrix
LQ Newbie
 
Registered: Apr 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by songahige View Post
Wht s lynx?it s like netrik?
lynx is text-only mode web browser.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Lynx WWW browser secure? Micro420 Linux - General 1 04-28-2006 10:31 PM
LYNX Browser for Suse 9.3 aquatux SUSE / openSUSE 10 01-05-2006 01:32 PM
Lynx Browser Question. rvijay Linux - Software 5 11-20-2004 12:33 AM
Is there any text-mode browser in wich I can use mouse linjia Linux - Software 2 11-19-2004 10:47 PM
using lynx with wvdial in text mode. tiredoflogins Linux - Software 4 11-03-2004 02:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration