Date: | Thu, 17 Jul 2003 10:32:02 -0400 |
From: | "Greg Davies" <Greg.Davies [...] lhsc.on.ca> |
To: | <bug-WWW-Mechanize [...] rt.cpan.org> |
Subject: | follow_link parm combining |
Andy,
First of all, thanks for a fantastic module!
I'd like to be able to combine the text and url_regex parms in a
follow_link in much the way that you allow the combining of text and n.
I'm parsing news.google searches and want to follow "Next" links when
they exist. My concern is that "Next" may be the full text of a link to
a news item as well as a the text of the link to the next page of search
results. So, I tried this:
last unless $google->follow_link( text => "Next", url_regex =>
qr/^\/news/ );
Unfortunately, the url_regex match seems to take precedence over the
text match (or get || with it) and I get endless links. I was hoping
that the parms would &&.
Obviously I can code around this, but I thought I'd offer it as a
suggestion.
Thanks for your time,
Greg Davies