#!/usr/bin/perl
$URL=shift @ARGV;
$dir=shift @ARGV;
$PIC_DIR="C:/Users/patrick/Pictures";
use LWP::Simple;
$countthispage=1;
$page=0;
while($countthispage>0){
$page++;
&Parse($URL."?page=$page");
}
$dir = $PIC_DIR."/".$dir;
opendir DIR, $dir or die "can't open $dir";
@files=readdir DIR or die "can't read $dir";
foreach $file (@files){
if ($file=~/(aIMG_\d+)/){
$disk{$1}=1;
}
}
foreach $d (sort keys %disk){
++$c2;
unless (exists $web{$d}){
print "$c2 ";
print "$d is missing from flickr";
print "\n";
}
}
sub Parse{
my $URL=shift;
$countthispage=0;
print "parsing $URL\n";
$content=get($URL);
while ($content=~/(.*?)\"(aIMG_\d+)\"(.*)/sm){
$web{$2}=1;
$content=$3;
$count++;
$countthispage++;
}
}