/circuit-bell

Web scraper built with Python, Beautiful Soup and Discord webhooks to notify users of product prices at pre-determined intervals

Primary LanguagePythonMIT LicenseMIT


Logo

Circuit Bell

Get notified for the products you love!
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. License
  5. Contact

About The Project

Circuit Bell is a web scraper built with Python and Discord webhooks to notify users of product prices at pre-determined intervals.

Currently supports skincare products from Stylevana.

Built With

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

  • Ensure you have Python 3 installed

  • Beautiful Soup

    $ pip install beautifulsoup4
  • lxml

    $ pip install lxml
  • discord.py

    $ python3 -m pip install -U discord.py
  • geckodriver: Download here and place it in a directory such as /usr/bin.

  • Firefox: Download here

Installation

  1. Clone the repo
    $ git clone git@github.com:t-hnh10/circuit-bell.git

Usage

The program requires a list of URLs and Discord webhooks, for example:

from discord import Webhook, RequestsWebhookAdapter

hada_labo_webhook = Webhook.partial(WEBHOOK_ID, WEBHOOK_TOKEN,\
 adapter=RequestsWebhookAdapter())

hada_labo_list = ['https://www.stylevana.com/en_AU/rohto-mentholatum-hada-labo-shirojyun-premium-whitening-lotion-170ml-moist-japan-version-170ml-random-delivery-on-packaging-3.html']

Ensure the script is executable with the following command:

sudo chmod +x main.py

Import this file to the main.py file.

Run the following command to execute the program:

$ python main.py

Consider using a utility such as cron to set the intervals at which you would like to run this web scraper.

License

Distributed under the MIT License.

Contact

Tony Huynh - @t_hnh10 - huynh.tony55@gmail.com

Project Link: https://github.com/t-hnh10/circuit-bell