View previous topic :: View next topic |
Author |
Message |
mc_bluebeard n00b
Joined: 12 Jun 2003 Posts: 59 Location: Cambridge, MA USA
|
Posted: Thu Feb 17, 2005 10:25 pm Post subject: Need a scriptable web browser [badly] |
|
|
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 |
|
|
BlackEdder Advocate
Joined: 26 Apr 2004 Posts: 2588 Location: Dutch enclave in Egham, UK
|
Posted: Thu Feb 17, 2005 10:38 pm Post subject: |
|
|
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 |
|
|
alkan Guru
Joined: 06 Aug 2004 Posts: 385 Location: kasimlar yaylasi
|
Posted: Thu Feb 17, 2005 10:39 pm Post subject: |
|
|
me too need a scriptable browser. Any suggestions?
Sorry hijacking your thread. |
|
Back to top |
|
|
msalerno Veteran
Joined: 17 Dec 2002 Posts: 1338 Location: Sweating in South Florida
|
Posted: Thu Feb 17, 2005 10:40 pm Post subject: |
|
|
Smells fishy!
You don't explain what it is you are trying to do very well.
I would use libwww-perl |
|
Back to top |
|
|
davey_freeman@yahoo.com n00b
Joined: 16 Jan 2005 Posts: 34
|
Posted: Thu Feb 17, 2005 10:49 pm Post subject: Re: Need a scriptable web browser [badly] |
|
|
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 |
|
|
alkan Guru
Joined: 06 Aug 2004 Posts: 385 Location: kasimlar yaylasi
|
Posted: Fri Feb 18, 2005 12:52 am Post subject: |
|
|
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 |
|
|
mc_bluebeard n00b
Joined: 12 Jun 2003 Posts: 59 Location: Cambridge, MA USA
|
Posted: Fri Feb 18, 2005 1:00 am Post subject: |
|
|
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 |
|
|
alkan Guru
Joined: 06 Aug 2004 Posts: 385 Location: kasimlar yaylasi
|
Posted: Fri Feb 18, 2005 9:25 am Post subject: |
|
|
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 |
|
|
alexkoval n00b
Joined: 18 Feb 2005 Posts: 4 Location: Ukraine
|
Posted: Fri Feb 18, 2005 12:26 pm Post subject: maxq |
|
|
Hi
software testing tool "maxq" (http://maxq.tigris.org) could be used.
very easy to record & run the script.
Alex |
|
Back to top |
|
|
|