LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-21-2005, 02:28 PM   #1
nephish
Member
 
Registered: Jun 2005
Distribution: arch, ubuntu
Posts: 456

Rep: Reputation: 30
need to control a browser from the command line


Hey there, i am looking for a web browser that i can manipulate from the command line.
i know that with mozilla i have about six or seven commands that i read about on the mozilla website, like
mozilla - remote "openurl(www.somethingorother.com)"
and an already open mozilla browser will go there.
really cool. but i need one that can do more stuff, like download a page and maybe even send an email (right now it can just open the email program window)

so, i guess it doesn't matter what browser i use ( konqueror, firefox, galeon, whatever) as long as it can be controlled from a command line.

anybody know of any?

thanks
 
Old 11-21-2005, 04:24 PM   #2
burntfuse
Member
 
Registered: Sep 2005
Location: Laurel, MD, USA
Distribution: Slackware 10.1, FC5
Posts: 164

Rep: Reputation: 30
netcat (Try sourceforge.net) should work for some of that stuff.
 
Old 11-21-2005, 04:37 PM   #3
nephish
Member
 
Registered: Jun 2005
Distribution: arch, ubuntu
Posts: 456

Original Poster
Rep: Reputation: 30
thanks, i looked at the project page at sourceforge, but i am going to have to download it and extract the docs..
good news though, there is a deb package for it ! cool
 
Old 11-21-2005, 04:44 PM   #4
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 52
Do you mean a browser that runs on the command line? If so then look at links, elinks or lynx (they are all very similar).

Or do you mean a browser that can be scripted from the command line? I'm not sure about this but you could maybe look at something like this: http://www.klaralvdalens-datakonsult...kdexecutor#kde and use it with KDE's konqueror web browser.
 
Old 11-21-2005, 05:16 PM   #5
nephish
Member
 
Registered: Jun 2005
Distribution: arch, ubuntu
Posts: 456

Original Poster
Rep: Reputation: 30
it looks good, konqueror would work just fine.
what i really need to do, is open a page in a web browser, download it, and extract some data values out of it for some math i gotta do in an application at work. i tried using some of the modules in python, but because the webpage has embeded javascript in it. the url library does not work with it.
so, i need some way do save a file to disk from an app that supports javascript.
whew --
i know i am not the only one out there trying to do this. There actually is a python module that wraps the spidermonkey mozilla javascript thing, but i couldnt get it to compile in debian. maybe i should set up a simple slack or vector machine just for this kind of thing. It does a little better with getting stuff installed that is compiled from source. Man, am i rambling or what ? kinda tired. thanks for all your help.
 
Old 11-21-2005, 05:50 PM   #6
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 52
Sounds like you're talking about 'screen scraping'. Just google around for 'screen scraping Linux' and phrases like that and you should find some scripts and howtos.

Quote:
There actually is a python module that wraps the spidermonkey mozilla javascript thing, but i couldnt get it to compile in debian
You probably need to install the -devel packages for whatever it compiles against. Anyway most Python modules shouldn't need to be compiled should they? Most are written in Python, not C.
 
Old 11-21-2005, 05:55 PM   #7
nephish
Member
 
Registered: Jun 2005
Distribution: arch, ubuntu
Posts: 456

Original Poster
Rep: Reputation: 30
well this one has install instructions that go ./configure make and make install.
it is weird, usually when i use a python module, it justs comes with a setup.py install script that i run. that or i just put the whole thing into the directory that the script will run from .

google has turned up a lot for screen scraping indeed, but almost everything just reads html, or xml.

thanks for your help. there is a really easy to use python module called BeautifulSoup (of all things) but it is only good after the html is ready.
 
  


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
command line web browser chingyenccy Linux - Newbie 4 05-06-2005 07:41 AM
PERL script OK at command line, not in browser alvo Programming 4 12-19-2004 08:28 AM
Command line version of Hardware Browser? weshutchins Linux - Hardware 2 09-22-2004 03:24 PM
command line tool to control volume? infected Programming 4 09-02-2004 08:58 AM
Command-Line Browser JoshSmith41 Linux - Software 6 01-08-2004 12:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:17 AM.

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