Code Monkey home page Code Monkey logo

ebay-scraper's Introduction

Ebay Scraper

Get the average price of any product on Ebay based on items already sold.

Requirements:

How to Use:

  1. Add EbayScraper.py to your project directory.
  2. Import it.
  3. Your Done! You can now search for anything. (See the bellow for more details)

Average Function:

Here we search for a new Nintendo switch on Ebay Canada. The first parameter is for the search query, the second one is for the country and the third one is for the condition of the item.

import EbayScraping

averagePrice = EbayScraping.Average('Nintendo Switch', 'ca', 'new')
print(averagePrice)

Output:

The output will be a dictionary with the average sold price, the average shipping price and the average total price of the item searched. Here we can see that the average price for a brand new Nintendo Switch on Ebay, including the shipping, is 365.87 CAD.

{'price': 326.2, 'shipping': 39.67, 'total': 365.87}

Items Function:

Like the Average Function, the first parameter is for the search query, the second one is for the country and the third one is for the condition of the item. The difference here is that this function return a list of dictionary with data about each item. Since the list returned is sorted by price + shipping, here we get the cheapest auction for an RTX 3060 in Canada.

import EbayScraping

itemList = EbayScraping.Items(query='RTX 3060, country='ca', condition='new', type='auction')
print(itemList[0])

Output:

The output will be a dictionary with all the information about the item.

{'title': 'MSI Gaming GeForce RTX 3060 12GB NEW SEALED', 'price': 339.04, 'shipping': 0, 'time-left': '3d 4h left', 'time-end': '(Sun, 12:25 p.m.)', 'bid-count': 14, 'reviews-count': 0, 'url': 'https://www.ebay.ca/itm/...'}

ebay-scraper's People

Contributors

alexis-brosseau avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.