https://github.com/sourasishbasu/producttracker
Track price drops and Check for product availability using webscraping
https://github.com/sourasishbasu/producttracker
beautifulsoup python script selenium webscraping
Last synced: 6 months ago
JSON representation
Track price drops and Check for product availability using webscraping
- Host: GitHub
- URL: https://github.com/sourasishbasu/producttracker
- Owner: SourasishBasu
- Created: 2023-08-10T20:12:55.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-19T18:58:02.000Z (over 2 years ago)
- Last Synced: 2025-01-09T10:39:07.135Z (about 1 year ago)
- Topics: beautifulsoup, python, script, selenium, webscraping
- Language: Python
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ProductTracker
Python scripts that use webscraping on various e-commerce websites such as Amazon, Flipkart and TheSouledStore to track product availability or price drops.
### Prerequisites:
- Python 3.7 & up
- Open Command prompt and type:
```bash
pip install beautifulsoup4
pip install requests
pip install -U selenium
```
- Download the [Chromium Webdriver](https://chromedriver.chromium.org/downloads) for Google Chrome or [Geckodriver](https://github.com/mozilla/geckodriver/releases) for Mozilla Firefox
## Usage
ProductTracker.py has the following features:
- Can check whether a product is in stock on Amazon/Flipkart
- Can check whether a product price has dropped on Amazon/Flipkart
- Automatically sends a mail to specified gmail address upon success
checkstock.py uses Selenium WebDriver to check whether a specific shirt size is available on TheSouledStore site.
- I made this as an example since some websites are created via javascript after the initial HTML page has loaded into the browser.
- Requests is just an HTTP client, not a full-fledged browser engine, so it doesn't execute the Javascript that contains the element such as the shirt size from this website. Hence Selenium is used.
## Mailing Feature
Follow these steps to utilize the mailing feature on the scripts:
- Go to your google account enable 2 Step Verification
- Search for App Passwords in Your Account
- Set the type of application, to Mail and type of device to Windows Computer.
- Click Generate, replace the password provided in the popup into the script where it says 'EMAIL_PASSWORD'.
- Change the recipient and senders email address details in the respective places within the script.
## To run in terminal:
- Open Powershell in the local repository folder
- Type:
```bash
python ProductTracker.py
```
or
```bash
python checkstock.py
```