/) {
$img = $1;
last;
}
if ($line =~ /
/) {
$img = $1;
last;
}
if ($line =~ //) {
$img = $1;
last;
}
if ($line =~ /<\/source>/) {
$img = $1;
last;
}
if ($line =~ //) {
$img = $1;
last;
}
if ($line =~ /
.*<\/p>/) {
$img = $1;
last;
}
if ($line =~ /<\/p>/) {
$img = $1;
last;
}
if ($line =~ /^<\/p>$/) {
$img = $1;
last;
}
}
if (length($title) == 0 || length($img) == 0)
{
print "Error with $address\n";
print "Title not defined\n" if (length($title) == 0);
print "IMG not defined\n" if (length($img) == 0);
print { STDERR } $contents;
exit 1;
}
else
{
$title = decode_entities($title);
print(OUT_FILE " \n");
print(OUT_FILE " $id\n");
print(OUT_FILE " $address\n");
print(OUT_FILE " $title\n");
print(OUT_FILE " $img\n");
print(OUT_FILE " \n");
}
}
print(OUT_FILE "\n");
close(OUT_FILE);
print "Done !\n";