eBay is great except that they don't want to show you how much you have spent over a period of time. Maybe this is a strategic feature, I don't know and I don't care. I just need it!
Lately I've started working on some projects that requires cheap parts (in order to keep the project cost low). eBay is happening to be a good market for those Chinese cheap parts (let's face it: almost everything is made in China, nowadays), so I began to trade on eBay quite a lot. The platform is great but some important feature is still (intentionally) missing: the summary of your purchases. So the today's question is: how to query eBay purchase history in order to your purchases summary?
This can be accomplished quite easy if you save the HTML page on disk and then parse its content with the help of some data extraction utility (eg. awk).
My solution is using this approach, so I have two scripts for this:
- a bash script file (ebay_total) that is the command line interpretor
- an awk script file that contains the parsing code
Now all I have to do is to save the eBay purchase history to a file on local disk and then call the ebay_total script that will list all items and the total summary (expressed in original currency and also converted to EUR/my local currency):
ebay_total -f /tmp/My_eBay_Purchase_History.htm
The output of the command above will look like:
---------------------------------------------------------------------- Nr Date Shipped date Price Item description ---------------------------------------------------------------------- 1 04/09/13 04/10/13 $2.75 35g Soldering Solder Paste Flux Cream Welding Paste NT 2 04/08/13 04/08/13 $1.59 1m Power Supply Multimeter Alligator Testing Cord Lead Clip to Banana Plug cable 3 04/08/13 04/09/13 $1.56 2 Pcs Fuse Holder FH043 10A 250V for 5x20mm Fuse NEW ... 26 03/16/13 03/18/13 $1.05 2.5FT 2.0MM Desoldering Braid Solder Remover Wick Cable ---------------------------------------------------------------------- TOTAL: 26 items => 54.38 USD (~ 41.57 EUR ; 182.18 RON)
Note: one can use a software to connect to his/her eBay account and to watch bidding/purchase history. I don't like this approach, especially when we are talking about an eBay account!
Just click the Add to Firefox or, if you are using Chrome then click the ADD TO CHROME button which automatically will add it to your browser.
If you prefer a certain version then go to the dist folder and choose whatever version you like.
To test it for the first time open your eBay purchase history (My Ebay -> Purchase History) and click the Quick Report
add-on's button shown right here:
It will open a new tab containing a compact and user-friendly HTML report of your purchase history:
Furthermore it allows sorting its data columns, grouping, opening directly the item's detail or seller's page on a new tab by just clicking the respective item. If you want to process these data in your system/application then you could use its export option (see top-left) which exports its raw data to a CSV, JSON or XML file. I wish something like this existed by default by since it doesn't exist, here we go: https://github.com/eugenmihailescu/ebay-purchase-report
Now, if you think that this article was interesting don't forget to rate it. It shows me that you care and thus I will continue write about these things.
Eugen Mihailescu
Latest posts by Eugen Mihailescu (see all)
- Dual monitor setup in Xfce - January 9, 2019
- Gentoo AMD Ryzen stabilizator - April 29, 2018
- Symfony Compile Error Failed opening required Proxies - January 22, 2018
Your scripts are not available via the links on your page.
Thanks for the notice. I fixed that problem, it should work now.
Really useful, thank you.
I'm glad it helps 🙂
hi! could you make your script links available again?
Thank you for sharing your knowledge
I fixed it! Thxs for your feedback.
Hi,
and how do i start this script ?
tx Maarten
I assume you are working on a *nix system (eg. Linux). If you are on Windows then I'm afraid you need the cygwin installed because my script is a BASH script which normally can be handled only on *nix-alike systems.
I assume you have downloaded the script somewhere on your local disk (let's assume it is in the /tmp directory). So it is on /tmp/ebay_total
To run this script (or any other script while on Linux) just open a terminal and type the script name with its full path:
/tmp/ebay_total + enter
Of course you should specify also the .html page as mentioned in my article such that the script will parse the .html page and then will print-out that summary.
To install the add-on I have successfully dragged the .zip file into the "install" area. It installs as an add-on in Chrome, but no yellow "Generate Report" button shows up. I have quit eBay and Chrome and opened but does not help.
Suggestion? It would be a HUGE help.
The "Quick Report" button shows up only on My Ebay -> Purchase History. So make sure you navigate to that page and the button should appear.
Hi,
It is very helpful to track. Can you please add buyer details in it?