#!/usr/bin/perl
use strict;
use warnings;
use WWW::Mechanize;
my $mech = WWW::Mechanize->new();
my $uri = "http://www.example.com"
$mech->get( $uri ); # whatever the url of your site is
while( $uri eq $mech->uri ){
# you could also use while(1) to keep going indefinitely
# I assume you end up on another site once the click was a success
$mech->click_button({ name => "enter" });
# there are other ways to find the button, worst case by number
# (e.g. 4th button on site ), the documentation is pretty good
# $mech->back(); #perhaps, if clicking the button at the wrong time
sleep(60); #wait a minute...
}
1 回答
看看perl的WWW::Mechanize
脚本可能如下所示:
在哪里运行它,我不知道,抱歉;) .