#!/usr/bin/perl -w
use strict;
use warnings;
use Orkut;

$|=1;
use Dumpvalue;
my $d= new Dumpvalue;

my $o= Orkut->new(OrkutCredentials);

#printf("%7d %7d %7d total\n", $o->Search(), $o->Search('female'), $o->Search('male'));
my @countries= $o->GetCountryList();
for (my $i= 108 ; $i < @countries ; $i++) {
    if (($i%10)==7) {
        print "sleeping\n";
        sleep(rand(120)+240);
    }
    $o->SetCountry($countries[$i]);
    printf("%7d %7d %7d  %3d %s\n", 
        $o->Search('country'), 
        $o->Search('female', 'country'), 
        $o->Search('male', 'country'), 
        $i, $countries[$i]);
}

