driscoll42 / ebayMarketAnalyzer

Scrape all eBay sold listings to determine average/median pricing, plot listings over time with trend lines, and extract to excel
195 stars 26 forks source link
ebay python scraping-websites webscraping

eBay Marker Analyzer

Formerly eBay Sold Price Scraper

This code is free for use and I encourage others to use it for their projects. If you do I would love to see how you used it, shoot me an email or message if you're willing to share. Further, feel free to open up new issues for defects or new features. I can't promise to get to all of them, but I can try.

Formerly this program would scrape eBay automatically and compile statistics. However, eBay has added CAPTCHAs to their site which I will not attempt to break with proxies or automated solving. However, it is still very easy to get the XML manually and then this program will read through the XML, get the item details, and compile statistics for you. The steps are as follows:

1. Search eBay for whatever you are searching for
2. Make an XML folder in the same directory as this code
3. Inside that folder save the XML. I found it easiest to use Firefox => View Page Source => Copy into NotePad++ => Save (file name does not matter)
4. Run the script "run_manual_xml.py" where the parameter passed in has the same name as the folder

This program is built to scrape all sold item data from eBay for any particular item. It will save the data to an excel file and create a scatter plot of the sold prices by date along with the median plot line and trendline. Further if you enter in the MSRP, it will plot a line for that and the break even prices of scalpers (particularly relevant when this was written during the PS5, Zen 3, and Xbox Series X launch).

Note: If you need to do commercial research, make actual business decisions, etc... off of eBay data, I highly encourage you to use eBay's TeraPeaks instead. It goes back further in time, has more detail, is faster, and is officially supported, and as of mid-April, is free to use.

The code was used in a series of articles I wrote in late 2020 to early 2021:

Examples:

PS5 Example PS5 Rolling Average Example

Install Instructions

How to Run

ebay_search Parameters

EbayVariables Class Parameters

General Parameters

plotting Parameters

Search Parameters

Rate Parameters

Data Scraping Parameters

Misc. Parameters

debugging parameters

median_plotting Parameters

TO DO

ebay_seller_plot Parameters

TO DO

brand_plot Parameters

TO DO

FAQ

The quantity_hist and feedback settings are the two which will most dramatically improve your run times, but they also reduce the amount of data you get. All depends on what data you need or don't need.

Release History