Skip to content

nevkontakte/rpilocator-rss-feed

 
 

Repository files navigation

rpilocator RSS Feed Notifications

This is the official rpilocator.com and hwlocator.com RSS feed reader and push notification scripts. It checks the RSS feed every minute and sends a push notification when a product comes in stock.

Send Pushbullet, Pushover or Gotify notifications to your device.

If you appreciate the work I do with rpilocator.com and hwlocatorcom consider buying me a coffee. I spend a lot of time looking for Raspberry Pi computers (and other hardware), tweaking the sites, and communicating with different sellers so you don't have to spend your time doing it.

ko-fi

RSS Notification Setup

Pushbullet

Download Pushbullet to your device (Android/iOS app or Browser extension). After logging in to your Pushbullet account, create an Access Token. This token is used to send a push notification to your devices through the Pushbullet API.

Edit the script and enter your Access Token.

PUSHBULLET_TOKEN = '<your access token here>'

Pushover

Download Pushover to your device (Android/iOS/Desktop). After logging in to your Pushover account, register an application. You will need your user key and the application token/key send a push notification to your devices through the Pushover API.

Edit the script and enter your user key and application token/key.

# User Key
PUSHOVER_KEY = '<your user key here>'

# Application Key
PUSHOVER_API_KEY = '<your application key here>'

Gotify

Create an application in your Gotify server. You will need the token from this to send a push notification to your devices through the Gotify API.

Edit the script and enter your server base URL and application token.

# Gotify Server Base URL e.g. https://mygotifyserver.com
GOTIFY_BASE_URL = '<your gotify server url>'

# Application Key
GOTIFY_TOKEN = '<your application key here>'

Telegram

Create a bot via telegrams 'BotFather'. You will need the token from this and your own telegram chat id.

Edit the script and enter your bot token and chat_id.

# Telegram settings
TELEGRAM_BOT_TOKEN = '<your telegram bot token>'
TELEGRAM_CHAT_ID = '<your telegram chat id>'

Dependencies

The script uses the Feedparser module to parse RSS feed information, so you'll have to install it first.

pip install feedparser

It also uses Requests to send the notification to the Pushbullet API.

pip install requests

For the telegram version you will also need the python telegram bot module.

pip install python-telegram-bot

Usage

The easiest way to run this scrip continuously is to use nohup

nohup python3 rpilocator-rss-pushbullet.py &

Filters

If you would like to only get notified if certain product categories come in stock in a certain country (for example), you can use the feed customizer at rpilocator.com or hwlocator.com.

After customzing the feed, update the FEED_URL variable.

FEED_URL = 'https://rpilocator.com/feed/?country=US,CA&cat=CM4'

The example above will only send notifications if Compute Module 4 comes in stock at a US or Canadian store.

Terms of use

The script is set to check the RSS feed every minute. Don't be tempted to change this to a faster update interval. Faster updates will be blocked and you will end up missing a stock alert :)

Feel free to modify the script and use with other RSS feeds. If you do so, please change the User Agent to something else. The User Agent is how web servers identify which software is accessing their website.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 95.6%
  • Dockerfile 2.4%
  • Makefile 2.0%