There are multiple ways to write this script, but you can find the version described in the book (except with comments) in exercise-9-2.py.
Here's what one of the HTML files that this script created looks like. This one is called 6098_05-18-20 12:45:12_Chasing Cell Phones presented via Zoom Webinar.html
.