efedotov has asked for the wisdom of the Perl Monks concerning the following question:

I'm new to Mechanize. I'm trying to scrape: http://www.penny-arcade.com/comic/1998/11/18

Specifically, the next button that leads to the next comic.The link has the text "Next" but Perl is reporting the error that it can't find the link. My code:

$agent->follow_link(text => 'Next');

Replies are listed 'Best First'.
Re: Mechanize can't find a link with hidden text.
by bitingduck (Deacon) on Mar 04, 2015 at 05:50 UTC

    Have you tried looking at the page source that Mechanize downloads to verify that you actually have links to follow? It looks like it's in the page source, so you should verify that you got the page.

      I think that's the problem. I just rechecked my entire script, and it's not working as expected. So it's more than likely the rest of the code. Can you tell me how to view the page source?
        So I fixed it. There was a bug with other code regarding the date, because when I checked it an hour ago, it was yesterday, then the date changed the next hour.