- Retrieves bin collection information for a given Unique Property Reference Number (UPRN) specifically for the Wealden Council website.
- Identifies the dates for the next bin collection and next recycling collection.
- Formats the dates in a human-readable format (DD/MM/YYYY).
- Provides a message indicating the type of bin for the next collection.
Important Note: This script is currently only designed to work with the Wealden Council website.
Flask
: Web framework for building the Flask version.requests
: Used for making HTTP requests to the Wealden Council website.json
: Used for decoding JSON data from the response.dotenv
: Used for loading environment variables (for storing UPRN securely).
-
Install the required libraries:
pip install -r requirements.txt
-
Create a
.env
file in the project directory. -
Add the line
UPRN=YOUR_UPRN
to the.env
file, replacingYOUR_UPRN
with your actual UPRN.
-
Open a terminal or command prompt and navigate to the project directory.
-
Run the Flask application using:
python main.py
-
Open a web browser and go to
http://127.0.0.1:5000
to access the application. -
You should see the bin collection information displayed in a webpage.