NAME

shopbot.pl - Shopping Agent

SYNOPSIS

% shopbot.pl version

% shopbot.pl list

% shopbot.pl list_paths

% shopbot.pl newdriver   COM::Shhhhhh

% shopbot.pl driver      COM::Shhhhhh

% shopbot.pl analyze     URL

% shopbot.pl pattern     URL     query

% shopbot.pl action      query   COM::Shhhhhh

DESCRIPTION

It is a script for you to list existent shopbot drivers, generate driver's template, or go grab price info, etc.

USAGE

% shopbot.pl version

List drivers in your library paths

% shopbot.pl list

Or use

% shopbot.pl list_paths

It lists full paths of existent drivers'

Generate driver template

% shopbot.pl newdriver driver_name [ dest_dir ]

It creates a driver template, and then you can edit the newborn file to make a new driver. By default, it creates the new driver at current directory. Please specify another destination directory if you need it to be somewhere else.

Example,

% shopbot.pl newdriver COM::Shhhhhh ~/.shopbot_drivers/

It creates a driver template WWW/ShopBot/COM/Shhhhhh.pm in your home's .shopbot_drivers

List driver's information

% shopbot.pl driver driver_name

Example:

% shopbot.pl driver COM::Shhhhhh

Analyze a URL

It fetches the content of the given URL and dumps related information parsed from it using WWW::Mechanize.

% shopbot.pl analyze http://shhhhhhh.com/

It dumps result to STDOUT.

Generate recognition patterns

% shopbot.pl pattern (URL | FILE) query

Shopbot.pl provides a rudimental function which can generate a pattern according to your query, and then you can cut'n'paste the thing to your driver and modify it. This may save some time.

ACTION!

Of course, you can use it to get products' data, and obtained data will be dumped to STDOUT with Data::Dumper.

% shopbot.pl action query drivers

Example:

% shopbot.pl action 'shhhhhh dot com' TW::answer168 COM::froogle

SEE ALSO

WWW::ShopBot, WWW::ShopBot::Driver