#!/usr/bin/perl -w
use LWP::Simple;
use HTML::TokeParser;
my $page= get('$url') or die("$!");#thats the webpage
my $stream= new HTML::TokeParser(\$page);
$file = "bestsellers.xml"; #the file,if exists I delete it
unlink($file);
open(f1, ">>bestsellers.xml") or die("Can't open .rss file: $!");
print f1 "\n";
print f1 "\n";
print f1 "";
print f1 "The title\n";
print f1 "$url\n";
while(my $tag = $stream->get_tag("table"))
{
if ($tag->[1]{name} and $tag->[1]{name} eq "product")
{
#do the stuff for scrapping what i need and
#writing it into f1
}
}
print f1 "\n";
print f1 "\n";
close f1;