Calling it directly with LWP::UserAgent doesn't appear to be working, perhaps it's not storing it in my cookie jar this way.<a href="image.php?id=1117159255&check=6f4e9753bb326bc0a11f76f188160af +3">I am 18 years of age or older</a>
My question is, because I am using proxies to load the pages I'm using LWP::UserAgent. However, to follow the links to say my bot is of age, I need to use WWW::Mechanize.
I'm not sure how to get the two to work together. Can anyone see, from my code below, how I can manage to get it to follow the link with WWW::Mechanize while keeping the cookies and all that I need inside UserAgent? Or can this ALL be done using WWW::Mechanize without directly calling UserAgent?
I have been trying to get this ImageFap bot to work for quite some time now and it's fun trying new tricks to get it to work.. but for now, I am stumped.my $ua = LWP::UserAgent->new; $ua->proxy('http', "http://$ad:$pt"); # assume this is a working + IP with a port number $ua->timeout(5); my ($one, $two) = split(/::/, $shuffled[$urlcnt]); #one is the U +RL, two is a custom referer url $ua->default_header('Referer' => "$two"); # added my own referer my $response = $ua->get($one); # my attempt at scraping the page and manually GETting the ver +ification link $response->content =~ m/image\.php\?id=(\d+)\&check=([a-zA-Z0- +9]+)/; print "\t\t- http://imagefap.com/image.php?id=$1&check=$2 link +\n"; $ua->get("http://imagefap.com/image.php?id=$1&check=$2"); $ua->mirror("http://imagefap.com/image.php?id=$1&check=$2", "f +ap.html") or die "Error: $!";
In reply to mixing www::mech and lwp::UA by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |