A simple yet powerful Node.js application for scraping websites for deals and discounts. This project uses Axios for making HTTP requests, Cheerio for parsing HTML, and node-cron for scheduling tasks. It's designed to notify users via Discord when it finds deals that match specified criteria.
These instructions will help you set up and run the project on your local machine for development and testing purposes.
Before you begin, ensure you have the following installed:
- Node.js
- npm (Node Package Manager)
To get the project running, follow these steps:
-
Clone the Repository git clone https://github.com/Biot-Savart/bargain-hunter.git cd bargain-hunter
-
Install Dependencies npm install
-
Setting Up Environment Variables
- Create a
.envfile in the root directory. - Add the necessary environment variables, e.g.,
DISCORD_WEBHOOK_URL.
- Start the Application npm start
- Web scraping functionality using Axios and Cheerio.
- Scheduled scraping with node-cron.
- Discord notifications for found deals.
- Environment variable management for sensitive data.
After setting up the project, it will periodically check for deals based on the specified schedule in the cron configuration. When a deal meeting the set criteria is found, the application will send a notification to the configured Discord channel.
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Ryno Myburgh - Initial Work - Biot-Savart
This project is licensed under the MIT License - see the LICENSE.md file for details.
- Hat tip to anyone whose code was used as inspiration.
- The open-source community for continuous learning and sharing.