Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Need a scriptable web browser [badly]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
mc_bluebeard
n00b
n00b


Joined: 12 Jun 2003
Posts: 59
Location: Cambridge, MA USA

PostPosted: Thu Feb 17, 2005 10:25 pm    Post subject: Need a scriptable web browser [badly] Reply with quote

Hi,

I need to interact with a fairly complicated website
many thousands of times over and I'd like to accomplish
this via a script.

My first thought was to do it by hand once using
Code:
lynx -cmd_log=log.txt

and then use that log as a starting point.

Basically, I'd have a shell script generate many
different lynx scripts.

BUT, lynx has troubles with frames and some other random
stuff on this website. Links2 seems to do well, but lacks the
scripting capability.

I've also thought of writing my own pseudo-browser using
python, but that seems like a real pain in the butt.

Does any body have any advice?

Thanks in advance!
_________________
I do not belong on this mission and I want to return to earth.
Back to top
View user's profile Send private message
BlackEdder
Advocate
Advocate


Joined: 26 Apr 2004
Posts: 2588
Location: Dutch enclave in Egham, UK

PostPosted: Thu Feb 17, 2005 10:38 pm    Post subject: Reply with quote

I think both perl and ruby (and python) have modules that let you easily interact with webpages. I would try something along that route.
Back to top
View user's profile Send private message
alkan
Guru
Guru


Joined: 06 Aug 2004
Posts: 385
Location: kasimlar yaylasi

PostPosted: Thu Feb 17, 2005 10:39 pm    Post subject: Reply with quote

me too need a scriptable browser. Any suggestions?
Sorry hijacking your thread.
Back to top
View user's profile Send private message
msalerno
Veteran
Veteran


Joined: 17 Dec 2002
Posts: 1338
Location: Sweating in South Florida

PostPosted: Thu Feb 17, 2005 10:40 pm    Post subject: Reply with quote

Smells fishy!

You don't explain what it is you are trying to do very well.

I would use libwww-perl
Back to top
View user's profile Send private message
davey_freeman@yahoo.com
n00b
n00b


Joined: 16 Jan 2005
Posts: 34

PostPosted: Thu Feb 17, 2005 10:49 pm    Post subject: Re: Need a scriptable web browser [badly] Reply with quote

mc_bluebeard wrote:
Hi,

I need to interact with a fairly complicated website
many thousands of times over and I'd like to accomplish
this via a script.


I will second the vote for LWP. It handles almost anything you throw at it with a little bit of hacking.
Back to top
View user's profile Send private message
alkan
Guru
Guru


Joined: 06 Aug 2004
Posts: 385
Location: kasimlar yaylasi

PostPosted: Fri Feb 18, 2005 12:52 am    Post subject: Reply with quote

I've looked into libwww but not libwww-perl. I've written something in C# (.NET) that is working fine, But it requires recompiliation of the program everytime I wish to change something. There must be a easier way. I didn't want to go through libwww since it will also require recompilation of the c program for changes.

libwww-perl. It looks like what i just need.

What I am trying to do is well intended. This program running on the background will logon to a web page and navigate to a sub page. Then it will monitor that page for any changes. If it sees a predefined pattern it will clik on a button on that page and notify the user by e-mail.
Back to top
View user's profile Send private message
mc_bluebeard
n00b
n00b


Joined: 12 Jun 2003
Posts: 59
Location: Cambridge, MA USA

PostPosted: Fri Feb 18, 2005 1:00 am    Post subject: Reply with quote

Well, the python urllib seems to work fairly well for me.
However, nothing works quite as well as lynx, which I've
had great success with.

Actually, since I last posted, I started working on this
again and figured out that many 'bugs' I was encountering
would go away if I told lynx to use a userAgent string
corresponding to internet destroyer.

So -- it was the website I was playing with and not lynx.
Ah, good old lynx.

Anyway, saving the lynx output via the cmd_log flag and
then loading it via cmd_script is hilarious --- the web pages
*fly* by. It truly is funny.

Ah.....
_________________
I do not belong on this mission and I want to return to earth.
Back to top
View user's profile Send private message
alkan
Guru
Guru


Joined: 06 Aug 2004
Posts: 385
Location: kasimlar yaylasi

PostPosted: Fri Feb 18, 2005 9:25 am    Post subject: Reply with quote

thanks msalerno and davey_freeman@yahoo.com. LWP is exteremely easy and works very nice. Whole thing took 15 lines of code.
Back to top
View user's profile Send private message
alexkoval
n00b
n00b


Joined: 18 Feb 2005
Posts: 4
Location: Ukraine

PostPosted: Fri Feb 18, 2005 12:26 pm    Post subject: maxq Reply with quote

Hi

software testing tool "maxq" (http://maxq.tigris.org) could be used.

very easy to record & run the script.

Alex
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum