GithubHelp home page GithubHelp logo

ikea-scraper's Introduction

IKEA Scraper

CircleCI

Easily scrape the stock level's of your favourite IKEA Products, all from the comfort of your python shell

Table of Contents

A guide to adding to stores.json

  1. Go to the website of the IKEA Region of your choice. In this case, IKEA UK

  2. Find a random item. In this case, BLÅHAJ Soft toy, shark, 100 cm

  3. Find the Stock Checker, this should be a Drop Down box, enter Inspect Element on this Element.

  4. Copy the inner data from that Element. It should look something like:

        <select class="range-dropdown range-dropdown--with-label" id="new-stockcheck-dropdown">
           <option class="range-dropdown__option--disabled" value="" disabled="">Select a store</option>
           <option value="113">Belfast</option>
           <option value="142">Birmingham</option>
        ...
    </select>
  5. Remove the <select class="range-dropdown range-dropdown--with-label" id="new-stockcheck-dropdown"> <option class="range-dropdown__option--disabled">...</option> and the remaining </select> from your copied HTML

  6. From here you can manually convert the HTML in to a JSON array by using a tool like Find and Replace in your editor of choice.

    1. Substitute </option> for ","

    2. Substitute "> for ": "IKEA

    3. Substitute <option value=" for nothing.

    4. Make sure to remove the trailing comma from the last entry in your newly converted JSON.

    5. Create a new entry in the stores.json file with the country code of the stores country you have just converted.

    6. Paste your converted code in to the new entry. It should look something like this:

      {
        "gb": {
            "113": "IKEA Belfast",
            "142": "IKEA Birmingham",
            ...
        },
        ...
      }
  7. Create a new pull request with your updated stores.json file.

ikea-scraper's People

Contributors

bonzi avatar

Stargazers

 avatar  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.