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/web-price-watcher.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-0.0.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-0.0.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for website_price_notifier-0.0.1.tar.gz
Algorithm Hash digest
SHA256 3f5e51e0ad4622a2155a079b9138e2109e7b39889835aa9d5bc2ed480c89219d
MD5 a5ca95395632cd707761c49a1154d02a
BLAKE2b-256 e050e8dbfe72b6754772ac9a257cf9096aef38dd843fdd670381c8cf6e17fee6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for website_price_notifier-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 33af7ab03ab4660faf73966473d5f804ff4cd9c9cf98692268fddf8403dcde4a
MD5 3bfb4b4b2a7e32a75ec3d58c7d3273cd
BLAKE2b-256 10a19f421c218f4f70600876fcb22f5edd162d734abff657f4b50d621eaff277

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