Scraping today's movies from my local movie theatre so I can avoid any potential popups/notifications/etc.
- BeautifulSoup4 for scraping
- TMDB's API to get movie details like genre
- occasionally use the Levenshtein distance algorithm to match movie titles - (read more here)
- store movie info in an sqlite db
- send HTML over the wire using Jinja2 for template rendering and HTMX for dynamic content updates
- if a movie has already started, we add
line-through
styling to that showtime - a minimalist/neo-brutalist design style
python3 -m venv myvenv
andsource myvenv/bin/activate
pip3 install -r requirements.txt
- initialize the db:
python3 app/database/db_init.py
- run the scrape module:
python3 -m app.scraper.scrape
- start the server:
uvicorn app.main:app --reload
- go to
http://localhost:8000/
default content when first scraped - no movies have started yet, so none are crossed out
crossed out movies if they have already started/finished playing