Track Items in Your Watching List

Link an off-eBay auction tracker with eBay’s Items I’m Watching list.

eBay provides the Items I’m Watching list (in My eBay → Bidding/Watching) to help you keep track of auctions on which you haven’t yet bid. A corresponding API call, GetWatchList , allows you to access the contents of that list.

But the Items I’m Watching list is rather limited and can be replaced with a custom tracking list, as described in [Hack #24]. Although the hack works, there are two simple ways to use the eBay API to make the script more robust and efficient:

  • Retrieve the title and end date with the GetItem API call instead of using the flakier method of extracting them from the auction page title.

  • Supplement the tracking list with any auctions in the Items I’m Watching list.

The following is a revised auction tracking script with both of these improvements.

Tip

This script requires all the Perl modules specified in [Hack #24], as well as Time::Local , by Tom Christiansen, Graham Barr, and Dave Rolsky (http://search.cpan.org/perldoc?Time::Local), used to convert dates retrieved from the API from GMT to local time.

#!/usr/bin/perl require 'ebay.pl'; use Time::ParseDate; use Time::Local; use POSIX qw(strftime); require("cgi-lib.pl"); &ReadParse; $selfurl = "http://www.ebayhacks.com/exec/track.pl"; $localfile = "ebaylist.txt"; $timeoffset = 0; @formatting=("color=#EE0000 STYLE=font-weight:bold", "color=#000000 STYLE=font-weight:bold", "color=#000000"); $i = 0; ...

Get eBay Hacks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.