Coder Social home page Coder Social logo

unifi_checker's Introduction

Unifi Checker

Check stock on unifi products online since the stock notifications don't seem to work correctly.

⚠️ 🛑 ‼️ [WARNING] Please do not share the "unifi_cookies.yml" or the "checker.yml" file with anyone since they contain private login information and can be used to log into your unifi account ⚠️ 🛑 ‼️

Disclaimer: This will break at some point when ubiquiti changes layout for their website or product pages.

Installing pre-requisites

  1. Install ruby (3.1 or higher) for your platform: https://www.ruby-lang.org/en/documentation/installation/
  2. Install bundler gem: gem install bundler

How to use this script:

  1. Clone this repo locally and install dependencies:
  gh repo clone rishabg/unifi_checker
  cd unifi_checker
  bundle install
  1. Create checker.yml file in YAML format (preferably from the included example file):

    • cp checker_example.yml checker.yml
    • Using your preferred text editor, edit checker.yml
      • add the missing information (username, password, product urls that you are interested in)
  2. Run the script: ruby scraper.rb

Expected output is a list of In-stock and out-of-stock items eg:

---
Sold Out:
- https://store.ui.com/collections/unifi-network-wireless/products/unifi-ap6-professional
- https://store.ui.com/collections/unifi-network-wireless/products/unifi-ap-6-lite
- https://store.ui.com/collections/unifi-network-wireless/products/access-point-wifi-6-in-wall
- https://store.ui.com/collections/unifi-network-wireless/products/access-point-wifi-6-enterprise-ea
- https://store.ui.com/collections/unifi-network-unifi-os-consoles/products/dream-wall-ea
- https://store.ui.com/collections/unifi-network-unifi-os-consoles/products/dream-machine-se
- https://store.ui.com/collections/unifi-network-unifi-os-consoles/products/udm-pro
- https://store.ui.com/collections/early-access/products/camera-ai-bullet-ea
- https://store.ui.com/collections/unifi-protect/products/g4-doorbell-pro
- https://store.ui.com/collections/unifi-protect/products/unifi-protect-ai-360
In-Stock:
- https://store.ui.com/collections/unifi-network-wireless/products/unifi-6-long-range-access-point

Warnings and Potential gotchas

  • This uses watir to launch a test chrome browser. This can be difficult to install on some platforms. While the browser automation is running, it is best to avoid interacting with the launched browser until it shuts down after logging-in.
  • Chrome is only launched conditionally (once in two days or if the unifi_cookies.yml is not found on local dir).
  • This bears repeating: Please do not share your unifi_cookies.yml or your checker.yml file with anyone since they contain private login information and can be used to log into your unifi account
  • If the login didn't work, the script will not be able to check stock for Early Access products.

unifi_checker's People

Contributors

rishabg avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.