|Edward Betts 775826349b|
Wheelie Fresh Bins cleaning schedule retrieval
schedule.py is a Python script designed to retrieve the cleaning schedule
information from Wheelie Fresh Bins and save it as HTML and an ICS (iCalendar)
file. This tool automates the process of accessing your cleaning schedule and
provides you with easily accessible calendar data.
Before using this script, make sure you have the following prerequisites:
- Python 3
- Required Python modules:
- Playwright (used for headless web scraping).
Clone or download this repository to your local machine.
Install the required Python modules by running:
pip install playwright lxml ics jinja2 requests
Make sure you have the Playwright dependencies installed for your platform. You can follow the installation instructions for Playwright here.
Customize the configuration in the
configfile to match your requirements.
To use the script, run it from the command line:
The script will log in to the Wheelie Fresh Bins website, retrieve your
cleaning schedule, and save it as an HTML file (
dest) and an ICS file
ics_file). The HTML file can be opened in a web browser, while the ICS file
can be imported into your favorite calendar application.
Scheduling with Crontab
You can automate the execution of
schedule.py by scheduling it to run once per
day using the crontab utility. Here's how to do it:
Edit your crontab file using the following command:
Add the following line to schedule the script to run daily at a specific time. Replace
/path/to/schedule.pywith the actual path to your
0 0 * * * /usr/bin/python3 /path/to/schedule.py
This example schedules the script to run every day at midnight. You can adjust the time and frequency according to your preferences. Save the crontab file.
Crontab will automatically execute the script at the specified time each day, and the schedule data will be updated accordingly.
You can customize the script's behavior by editing the configuration in the
configfile, such as specifying your login credentials, file paths, and other options.
The script uses Jinja2 templates to render the HTML output. You can modify the HTML template in the
templatesdirectory to change the appearance of the schedule.
This script was created by Edward Betts (email@example.com). Feel free to contact me for support or improvements.
This project is licensed under the MIT License - see the LICENSE file for details.