Perl script monitors payments and feedback in eBay sales

Watchful Seller

Article from Issue 188/2016
Author(s):

We show how to use a screen-scraper and an application for the official eBay API to trigger an alarm on incoming eBay customer feedback and detect errors in the monthly billing statement.

If I ever get around to writing my memoirs, I am going to include a lengthy chapter about my life's motto, which is: "Anything you don't constantly monitor is guaranteed to go belly up when you least expect it." True to this motto, I wrote a script this month to receive an email immediately when one of my eBay customers has left feedback about a transaction.

Simply Scraping

As a quick and dirty solution, and to first avoid having to register as a developer with eBay, I wrote a screen-scraper that extracts the current feedback score from the slew of HTML on the feedback page, before saving the counter and raising the alarm during subsequent runs if the value has increased.

When I click on my username on eBay.com, the browser lands on the feedback page in Figure 1. Selecting view-source in the browser shows the HTML code from Figure 2, and a text search for the string 362 (the current feedback score) shows that this number is found in a markup tag of the mbg-l class:

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

comments powered by Disqus

Direct Download

Read full article as PDF:

Price $2.95

News

njobs Europe
What:
Where:
Country:
Njobs Netherlands Njobs Deutschland Njobs United Kingdom Njobs Italia Njobs France Njobs Espana Njobs Poland
Njobs Austria Njobs Denmark Njobs Belgium Njobs Czech Republic Njobs Mexico Njobs India Njobs Colombia