Skip to main content

A program that scraps websites for prices and notifies you about it.

Project description

Web Price Watcher

A tiny script that scrapes a page in headless Chrome and sends an ntfy.sh notification when your target text (a price) changes. Currently, the example is checking Palworld's price on Steam, but you can easily adapt it to other websites by changing the URL and CSS selectors. It scrapes the pages every 24 hours, but you can change the schedule as needed. Scrape data is saved to a JSON file, so it can be compared with the last scraped data.

Based on: slashtechno/scrape-and-ntfy The Ntfy class was adapted from there.

Usage

To use, just use:

from website_price_notifier import utils
utils.main()

To customize, from website_price_notifier, import the Ntfy class and the PriceScraper class, then create your own instances of PriceScraper with the URL and CSS selector for the price you want to track. You can also change the ntfy_notifier URL to your own ntfy topic.

Install

git clone https://github.com/Bai756/website-price-notifier.git
cd web-price-watcher
pip install selenium webdriver-manager httpx schedule

Usage

To use, edit the top of the main function. Add your own urls and css-selectors, and change the ntfy_notifier url to your ntfy topic. Add as many PriceScraper instances as you want.

Then run:

python main.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

website_price_notifier-1.1.1.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

website_price_notifier-1.1.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file website_price_notifier-1.1.1.tar.gz.

File metadata

File hashes

Hashes for website_price_notifier-1.1.1.tar.gz
Algorithm Hash digest
SHA256 e1ff28f1461f6cecbc5fdb8fbf06254753afbb81a5d437d968eac45a35118092
MD5 c3f72c90338a7f040dfb0d105b948192
BLAKE2b-256 4ce1d5ca582fa7df5fed4492f0843d625b8770951d1b0f7b698f36c380e60f1b

See more details on using hashes here.

File details

Details for the file website_price_notifier-1.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for website_price_notifier-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d2d7c5dc11228862d2bccdbd084de94936a910c3333881443e87990cf3f22ebf
MD5 4564dbfa5b59a1361a9fa3d8a8535bff
BLAKE2b-256 25e15338930b9d6d1795bbfb42b0652c7376d804926129d0e9c10307a9213d30

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page