Hello,

        We are using version 1.10.2 of wget under Ubuntu and Debian. So we have 
many 
scripts that get some images from a cacti site. These scripts ran perfectly 
with version 1.9 of wget but they can not get image with version 1.10.2 of 
wget.

Here you can find an example of our scripts:

sub GetCactiGraph()
{
        my ($node,$alt,$time,$filename)[EMAIL PROTECTED];
        
        my $url = "https://foo.bar/cacti/";;
        my $b = WWW::Mechanize->new();
        
        $b->get($url);
        $b->field("login_username", "user");
        $b->field("login_password", "user");
        $b->click();
        
        if ($b->content() =~ /, gFld\(".*$node", "(.+)"\)\)/g)
        {
                $b->get($url . $1);
                if ($b->content() =~ /<img 
src='(graph_image\.php\?local_graph_id=\d+&).+' 
border='0' alt='\s*$alt\s*'>/g)
                {
                        my $period = ($time eq "day" ? "&rra_id=1" : 
"&rra_id=3");
                        print "WGET: $url$1$period -O $filename\n";
                        if (defined $filename)
                                { `wget -q "$url$1$period" -O "$filename"`; 
return $filename;}
                        else 
                                { `wget --no-check-certificate -q 
"$url$1$period" -O "$alt.png"`; 
return "$alt.png" ;}
                }
        }
}

File is created but it is empty.


Bye,

Thomas

Reply via email to