NAME
WWW::Search::EbayUK - backend for searching www.ebay.co.uk and european eBay sites
SYNOPSIS
use WWW::Search;
my $oSearch = new WWW::Search('EbayUK');
my $sQuery = WWW::Search::escape_query("Bovine Spongiform Encephalitis");
$oSearch->native_query($sQuery);
while (my $oResult = $oSearch->next_result())
{
print $oResult->url, "\n";
print $oResult->title, "\n";
print $oResult->description, "\n";
}
DESCRIPTION
This class is a Ebay specialization of WWW::Search. It handles making and interpreting Ebay searches http://www.ebay.co.uk.
This class exports no public interface; all interaction should be done through WWW::Search objects.
NOTES
The search is done against CURRENT running auctions only.
The query is applied to TITLES only. See below for retrieving html from links.
The results are ordered youngest auctions first (reverse order of auction listing date).
In the resulting WWW::Search::Result objects, the description field consists of a human-readable combination (joined with semicolon-space) of the Item Number; number of bids; and high bid amount (or starting bid amount).
Extra information is available by following
the links returned by:
$oResult->url
In such an instance extra information is returned that is not normally accessible from the result page. To cater for this, an extra details method is introduced:
$oResult->details
Which stores the extra information in a hash.
OPTIONS
- Search descriptions
-
To search titles and descriptions, add 'srchdesc' => 'y' to the query options:
$oSearch->native_query($sQuery, { srchdesc => 'y' } );
- Other Ebay Sites
-
As of version 3.00 WWW::Search::EbayUK can be used to search the following european ebay sites http://www.ebay.co.uk (United Kingdom) http://www.ebay.at (Austria) http://www.ebay.com.au (Australia) http://pages.ca.ebay.com (Canada) http://www.ebay.ch (Switzerland) http://www.ebay.de (Germany) http://pages.ebay.fr (France) http://www.ebay.com (United States)
The search defaults to the UK website but the other sites above can be queried by setting
ebay_site
= (at|au|ca|ch|de|fr|us) in the native_query options:$oSearch->native_query($sQuery, { ebay_site => 'at' } );
- World-Wide Searches
-
To search across the world, set
World_Wide
= 'y' in the query options:$oSearch->native_query($sQuery, { World_Wide => 'y' } );
The search defaults to '2' which is the local website.
- Following Links
-
To retrieve information from a specific ebay link, add 'follow_link' => '<http:// full URL>' to the query options:
$sURL = '<http:// full URL>'; $oSearch->native_query($sURL, { follow_link => "$sURL" } );
No escaping is required in this case.
- Information From Followed Links
-
Extra information is returned by this process. (Auction Start and End dates are a case in point.) Query the $oResult->details hash to retrieve this. E.g. the start date of the auction is retrieved like so:
print $oResult->details->{'Start'}, "\n";
SEE ALSO
To make new back-ends, see WWW::Search.
INTENDED
The Belgian site has an extra layer to allow users to select Netherlands or France. It would be nice to be able to incorporate a workaround in future releases.
BUGS
Doubt it. Please tell me if you find any!
AUTHOR
WWW::Search::EbayUK
was Adapted by Andy Pritchard from Martin Thurn's Ebay module (pilchkinstein@hotmail.com).
Original WWW::Search::Ebay
was written by Martin Thurn (mthurn@megapipe.net).
WWW::Search::EbayUK
is maintained by Andy Pritchard
LEGALESE
THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
VERSION HISTORY
3.00, 18-03-2003
Added ebay_site
and World_Wide
functionality to allow use of this module with other e-Bay websites.
2.01, 17-03-2003
Altered Makefile.PL Prerequisites
2.00, 2003-02-26
Added follow_link
functionality and new details method. This also supports the raw and title calls.
1.00, 2003-02-14
Adapted Ebay module for ebay.co.uk site
2.13, 2003-02-06
Fixed parsing for slightly-changed ebay.com pages
2.11, 2002-10-21
Fixed parsing for Buy-It-Now prices, and foreign currencies
2.08, 2002-07-24
Fixed parsing for new images in the results table
2.07, 2001-12-20
Restructured using parse_tree()
2.06, 2001-12-20
Handle new ebay.com output format
2.01
First publicly-released version.