HI Shlomi

Thanks, I will check that out. Peace on the land is the best of course.  :-)

Sean
----- Original Message ----- From: "Shlomi Fish" <shlo...@iglu.org.il>
To: <beginners@perl.org>
Cc: "Sean Murphy" <mhysnm1...@gmail.com>
Sent: Saturday, April 23, 2011 4:54 PM
Subject: Re: Scripting problem when launching links using mech.


Hi Sean,

On Saturday 23 Apr 2011 02:59:12 Sean Murphy wrote:
Hi All.

I have a script that goes to google. Performs a search.

Google does not allow you to do that using WWW-Mechanize and LWP-UserAgent
(legally). You should use their web-search API and:

http://search.cpan.org/dist/Google-Search/

I have a regular
expression that gets all the links.

You shouldn't parse HTML with regular expressions:

http://www.codinghorror.com/blog/2009/11/parsing-html-the-cthulhu-way.html

The first link in the array I return
is ment to open the next page. But it keeps failing with an error stating
it is illegal page. When I try and use lwp, it says you cannot use an
absolute link. But the link looks fine to myself.

Below is the code, any help on resolving this issue would be great. The
goal of the script is to input a movie name. find the details of the movie
from imbd.com. Then save it as a text file. Eventually this Information
will be turned into a web page.


Please re-implement the code with the Google Search API, and peace will come
upon the land.

Regards,

Shlomi Fish

--
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
"Star Trek: We, the Living Dead" - http://shlom.in/st-wtld

Chuck Norris is the ghost author of the entire Debian GNU/Linux distribution.
And he wrote it in 24 hours, while taking snack breaks.

Please reply to list if it's a mailing list post - http://shlom.in/reply .



--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to