Subject: | Let WWW::Mechanize manage the User-Agent |
WWW::Mechanize should manage the User-Agent HTTP header.
There's a patch here to default to MSIE in WWW::Mechanize
http://rt.cpan.org/NoAuth/Bug.html?id=2977
--- WWW-Google-Groups-0.09-old/Groups/NewsGroup.pm
+++ WWW-Google-Groups-0.09/Groups/NewsGroup.pm
@@ -3,7 +3,6 @@
use strict;
use WWW::Google::Groups::Thread;
-use WWW::Google::Groups::Vars;
use Storable qw(dclone);
sub new {
@@ -29,7 +28,6 @@
if(!ref ($self->{_threads}) or !scalar @{$self->{_threads}}){
my @threads;
- $self->{_agent}->agent_alias( $agent_alias[int rand(scalar @agent_alias)] );
$self->{_agent}->get($self->{_server}."/groups?dq=&num=25&hl=en&lr=&ie=UTF-8&group=".$self->{_group}."&safe=off&start=".$self->{_thread_no});
--- WWW-Google-Groups-0.09-old/Groups/Thread.pm~
+++ WWW-Google-Groups-0.09/Groups/Thread.pm
@@ -4,7 +4,6 @@
use WWW::Google::Groups::Article;
-use WWW::Google::Groups::Vars;
use Storable qw(dclone);
@@ -32,7 +31,6 @@
my $content;
if( !ref ($self->{_mids}) or !scalar @{$self->{_mids}}){
- $self->{_agent}->agent_alias( $agent_alias[int rand(scalar @agent_alias)] );
$self->{_agent}->get($self->{_cur_thread}->{_url});
my @mids;
Only in WWW-Google-Groups-0.09-old/Groups: Vars.pm