This project is a web scraper designed to automate the process of claiming AVAIL tokens from the AVAIL Faucet once a day.
The script uses Selenium to interact with the web page, log the events, and send email notifications about the success or failure of the claim process.
- Automates the AVAIL token claim process.
- Logs important events to a log file with a unique identifier for each run.
- Sends email notifications upon success or failure of the claim process.
- Python 3
dotenv
for environment variable managementsmtplib
for sending emails
-
Install Dependencies:
pip install -r requirements.txt
-
Set Up Environment Variables:
Create a
.env
file in the root directory of the project and add the following variables:ADDRESS=your_avail_address [email protected] SMTP_SERVER=smtp.example.com SMTP_PORT=587 SMTP_USER=your_smtp_username SMTP_PASSWORD=your_smtp_password
-
Ensure ChromeDriver is installed and in your PATH.
-
Run the Script:
python web_scraper.py
The script will attempt to claim AVAIL tokens once a day, log the events, and send email notifications about the success or failure of each attempt.
.
├── logs # Directory where log files are stored
├── venv # Virtual environment directory
├── .env # Environment variables file
├── web_scraper.py # Web Scraper script
├── requirements.txt # Python dependencies
└── README.md # Project README file
The script creates a log file in a logs
directory with a unique identifier for each run. The log file name follows the pattern <timestamp>.log
, where <timestamp>
is the date and time the script was executed.
The script sends email notifications for the following events:
- Successful claim of AVAIL tokens.
- Error indicating that AVAIL tokens have already been claimed in the last 24 hours.
- Unknown errors during the claim process.
Run the following command to format the code:
autopep8 --recursive --exclude venv --diff .