WWW-Scraper-Gmail

 view release on metacpan or  search on metacpan

lib/WWW/Scraper/Gmail.pm  view on Meta::CPAN

sub setPrefs {
    my ($arg) = @_;
    login();
    doGmailAt();
    $arg->{"MaxPer"} = 100 unless defined $arg->{MaxPer};
    $arg->{"Signature"} = "" unless defined $arg->{Signature};

    $arg->{"Signature"} = HTML::Entities::encode_entities_numeric($arg->{"Signature"});
    #print Dumper $arg;

    my $url_pref=" http://gmail.google.com/gmail?search=inbox&view=tl&start=0&act=prefs&at=$gmail_at&p_bx_hs=1&p_ix_nt=$arg->{MaxPer}&p_bx_sc=1&p_sx_sg=$arg->{Signature}&zx=$zx";
    #print "Going for $url_pref\n";
    #$head = HTTP::Headers->new(Cookie => $cookie); #, Referer => $ref);
    $req = HTTP::Request->new(GET=>$url_pref, $head);
    $res = $ua->request($req);
    return ($res->as_string() =~ /saved/);
}

1;
__END__
# Below is stub documentation for your module. You'd better edit it!



( run in 1.028 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )