Coder Social home page Coder Social logo

infinitay / shoe-scrapper Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 17 KB

Retrieves relevant data of a shoe such as shoe name, gender, sizes, colorway, and much more from Stadium Goods given the model, or sku, of a shoe.

License: MIT License

JavaScript 100.00%

shoe-scrapper's Introduction

NPM Version NPM Downloads MIT License


Shoe Scrapper

Retrieves relevant data of a shoe such as shoe name, gender, sizes, colorway, and much more from Stadium Goods given the model, or sku, of a shoe.

Example · Report An Issue · Request Feature

Table of Contents

About The Project

This package was made when I was looking for a way to grab the UPC-A of shoes and I came across Stadium Goods's website as they also had the GTIN-12 of shoes. As far as I know, both UPC-A and GTIN-12 are identical in that UPC-A is just a different representation of a GTIN-12. In addition to retrieving the GTIN-12 of a shoe, because this package pulls the data from Stadium Goods, there is additional information such as market data for the shoe and other general information of the product.

Built With

Getting Started

To get a local copy up and running follow these simple steps.

Installation

  1. Clone the shoe-scrapper
git clone https://github.com/infinitay/shoe-scrapper.git
  1. Install NPM packages
npm install

Usage

Fetch a product's data by its sku, or model, and print it out.

const skuScrapper = require("./index.js");

const sku = "CU0449-601";

(async () => {
  console.log(JSON.stringify(await skuScrapper.getProductData(sku), null, 4));
})();

Fetch a product's data by its sku, or model, filters out sizes that don't have a UPC, and returns an array of objects { size: String, upc: String }

const skuScrapper = require("./index.js");

const sku = "CU0449-601";

// Retrieve all sizes and its respective upc-a/gtin-12
skuScrapper.getProductData(sku).then((productData) => {
  const transmuted = productData.marketData.offers
    .filter((offer) => !!offer["gtin12"])
    .map((offer) => {
      return { size: offer.size, upc: offer["gtin12"] };
    });
  console.log(transmuted);
});

Roadmap

  • Help contribute to The Sneaker Database in order to limit and possibly avoid using Stadium Goods in return for an API intended for fetching data.
  • Use this project to help gather GTIN-12s and start a database of my own to use in a future app and hopefully use that to crowd-source future GTIN-12 collection.

Potential Additions

  • Provide methods to allow users to easily retrieve sizings and GTIN-12s rather than parsing it themselves.
  • Provide a uniform parsing system to avoid inconsistencies and make sizing more clear on some trading platforms such as StockX.

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Twitter: @CallMeInfinitay

Project Link: https://github.com/infinitay/shoe-scrapper

Acknowledgements

  • Stadium Goods - Without them this wouldn't be possible, so thank you.

Disclaimer

Since this depends on scrapping Stadium Goods, if you, Stadium Goods, has any issues with this, please let me know and I will take it down. For everyone else, I would like to request of you to not flood their site with requests and try to limit the scraping you do to not negatively impact their site and therefore anyone elses experience. Unfortunately they are the only ones that publicly provide GTIN-12s and it's best to avoid forcing them to remove it due to people mass scrapping. That's why in the future I'd like to use this project to help The Sneaker Database as I describe in the roadmap. That way, people won't have to depend on this package entirely, and instead call The Sneaker Database's API.

shoe-scrapper's People

Contributors

infinitay avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

timnz

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.