My first Python script from 2018 finally broke last week
It was a simple web scraper that pulled weather data, but the site changed its layout after five years. I spent three hours trying to fix the BeautifulSoup selectors before giving up. What's the best way to learn how to update old code for new web pages?
Ugh, tell me about it. How do you even keep up when sites change their layout every other week? Feels like a full time job just fixing broken scrapers.
Right? It's like they're playing whack-a-mole with the HTML tags... Barbara's right about the expiration date, you basically have to write code expecting it to break next month. I've started just looking for the data in the network calls instead of the page source, which sometimes lasts longer. Still a huge pain though.