Skip to content

Instantly share code, notes, and snippets.

View jhenkens's full-sized avatar

Johan Henkens jhenkens

View GitHub Profile
@muffix
muffix / unifi_scrape.py
Created November 29, 2021 11:04
Quick-and-dirty scraper that checks for the availability of a product in the Unifi store
"""
Quick-and-dirty scraper that checks for the availability of a product in the Unifi store
Checks the link in the TARGET_URL variable every 30 seconds and calls the webhook in WEBHOOK_URL if the product
is available.
Requirements:
beautifulsoup4==4.10.0
requests==2.26.0
requests_html==0.10.0

Install raspbian, set up your users however you would like, so long as you have sudo access on the user you are running this with. You probably want to resize the image so it fills the SD card as well.

  1. Copy this entire gist to your raspberry pi
  2. Do chmod +x step1.sh step2.sh iptables.sh in the gist folder (so that
  3. Run step1.sh a) This script does a few things - it first updates your raspberry pi, then it installs a few needed utilities, then it upgrades the firmware on your raspberry pi