Thanks Mat.
----- Original Message ----
From: Mat Schaffer <schapht at gmail.com>
To: Ruby Mechanize Users List <mechanize-users at rubyforge.org>
Sent: Friday, June 29, 2007 7:22:40 AM
Subject: Re: [Mechanize-users] (no subject)
On Jun 26, 2007, at 11:33 AM, Matt White wrote:
Hello,
I am on a page that lists 78 items and can only show 25 per page, so there are
links for each page of results and a "Next >" link. I''d
like to get Mechanize to follow the Next link but the link looks like this:
<a class=''searchlinks''
href=''javascript:lnkclick(2);''>Next ></a>
If I try to "click" the link, Mechanize raises an "unsupported
scheme" exception. At this point I am using all sorts of fun regular
expressions to parse the Javascript and send the appropriate values to the page
with a WWW::Mechanize.post call. Is there an easier way? Thanks.
Not yet, I don''t think. Javascript support would be awesome, but
it''s a heafty beast to tackle. The last time I needed to do javascript
stuff, i basically ended up using a combination of regexps and lots of code
tracing to make the same requests that the javascript would have made. Charles
is a handy tool for viewing the final request.
-Mat
_______________________________________________
Mechanize-users mailing list
Mechanize-users at rubyforge.org
http://rubyforge.org/mailman/listinfo/mechanize-users
____________________________________________________________________________________
Pinpoint customers who are looking for what you sell.
http://searchmarketing.yahoo.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://rubyforge.org/pipermail/mechanize-users/attachments/20070629/606b4dc3/attachment.html