This project is a web scraper that monitors product prices on Tokopedia and sends alerts when price drops are detected. It uses Playwright for web scraping and a Telegram bot for notifications.
- Scrapes product information from multiple Tokopedia links
- Filters products based on a price range
- Detects price drops by comparing with previously saved data
- Sends notifications via Telegram when price drops are detected
- Runs automatically on a schedule using GitHub Actions
- Bun
- A Telegram bot token and chat ID
-
Clone this repository:
git clone https://github.com/Dev-From-UTC-7/tokopedia-playwright cd tokopedia-playwright
-
Install dependencies:
bun install
-
Set up environment variables (see Configuration section)
Create a .env
file in the root directory with the following content:
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
TELEGRAM_CHAT_ID=your_telegram_chat_id
Replace your_telegram_bot_token
and your_telegram_chat_id
with your actual Telegram bot token and chat ID.
To run the scraper manually:
bun playwright test
The scraper will run automatically on the schedule defined in the .github/workflows/cron.yaml
file.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is open source and available under the MIT License.