This repository contains a Python script that scrapes upcoming meeting dates from the St Mewan Parish Council website and builds an iCalendar (.ics
) file. The generated calendar can be imported into any calendar application that supports the iCalendar format.
- Python 3
requests
beautifulsoup4
Install the dependencies using pip
:
pip install -r requirements.txt
Run the script to fetch the meeting information and generate stmewan.ics
:
python generate_ics.py
The script downloads the meeting pages, extracts upcoming dates and associated links (agenda and minutes when available) and writes them into stmewan.ics
.
The generate_ics.py
script contains a list of meeting pages under MEETING_TYPES
.
For each page it:
- Fetches the HTML with
requests
. - Parses upcoming meeting entries using BeautifulSoup.
- Converts the textual dates and times into Python
datetime
objects. - Creates an iCalendar event for each meeting, appending any agenda or minutes links to the event description.
- Writes all events to
stmewan.ics
in standard iCalendar format.
An example stmewan.ics
is included in this repository. After running the script you can import the file into your preferred calendar application to view upcoming Parish Council meetings.