LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Any other text mode browser like lynx? (https://www.linuxquestions.org/questions/linux-newbie-8/any-other-text-mode-browser-like-lynx-720045/)

madmatrix 04-18-2009 10:54 AM

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

jay73 04-18-2009 10:55 AM

Sure, elinks. It's more powerful than lynx.

MoonMind 04-18-2009 11:29 AM

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.

madmatrix 04-18-2009 12:47 PM

Thank you guys. I just searched elinks. It's much powerful. I will try this command tool. Thanks.

Lou

madmatrix 04-20-2009 06:38 AM

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

songahige 04-20-2009 09:17 AM

Wht s lynx?it s like netrik?

madmatrix 04-20-2009 11:44 AM

Quote:

Originally Posted by songahige (Post 3515074)
Wht s lynx?it s like netrik?

lynx is text-only mode web browser.


All times are GMT -5. The time now is 05:13 PM.