#!/usr/bin/perl
use strict;
use warnings;
use LWP::UserAgent;
use URI;

my $url = $ARGV[0];
die "Usage: $0 url\n" unless $url;

my $uri = URI->new($url);
# my $ua = LWP::UserAgent->new( agent => 'Mozilla/5.0');
my $ua = LWP::UserAgent->new( agent => 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.13pre) Gecko/20070505 (Debian-1.8.0.14~pre071019b-0lenny1) Galeon/2.0.2 (Debian package 2.0.2-4)');
$ua->env_proxy;

# my $page = $ua->get($url, Host => $uri->host );
# (my $link) = $page->content =~ m#<div class="fullImageLink" id="file"><a href="(.*?)"#gs;

$ua->mirror( $url, 'cam8.jpg' );
