Spellcheck All Your Listings

Implement passive, configurable spellchecking to create correctly-spelled listings in less time.

The success of any auction is largely due to how readily it can be found in eBay searches. As described in Chapter 2, eBay searches show only exact matches (with very few exceptions), which means, among other things, that spelling most definitely counts.

Turbo Lister and eBay’s Sell Your Item form have spellcheck features, both of which use the old-school, manual approach that forces you to interrupt your work to review each individual mistake. This hack streamlines the process by summarizing the spelling errors in all your listings in one place.

The following script requires the following modules and programs:

Table 8-2. 

Module/program name

Available at

HTML::FormatText (by Sean M. Burke)

search.cpan.org/perldoc?HTML::FormatText

HTML::TreeBuilder (by Sean M. Burke)

search.cpan.org/perldoc?HTML::TreeBuilder

HTML::Entities (by Gisle Aas)

search.cpan.org/perldoc?HTML::Entities

Lingua::Ispell (by John Porter)

search.cpan.org/perldoc?Lingua::Ispell

ispell program (by Geoff Kuenning)

fmg-www.cs.ucla.edu/geoff/ispell.html

Here’s the script:

         #!/usr/bin/perl
         require 'ebay.pl';

         require HTML::TreeBuilder;
         require HTML::FormatText;
         use Lingua::Ispell qw( spellcheck );
         Lingua::Ispell::allow_compounds(1);

         $out1 = "";
         $outall = "";
         $numchecked = 0;
         $numfound = 0;

         $today = &formatdate(time);
         $yesterday = &formatdate(time - 86400);

         my $page_number = 1;
         PAGE:
         while (1) {
 my $rsp = ...

Get eBay Hacks, 2nd Edition 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.