As of Jan 2020, Wunderground changed their site so the video as recorded, doesn't work. Here's what you need to change.
First, see that the URL has changed from zipcode to state/city, for example:
https://www.wunderground.com/weather/us/or/portland
That means you'll need to ask for state and city rather than zipcode from the user and pass that to get_html_from_web
. This should work now:
# Note: wunderground changed it's URL structure, zipcode no longer works.
# We need to pass state and city (sorry folks outside the US).
# You can update the URL for your country.
state = input('What US state do you want the weather for (e.g. OR)? ')
city = input('What city in {} (e.g. Portland)? ')
html = get_html_from_web(state, city)
Additionally, the CSS selectors have changed to the following:
cityCss = 'h1'
weatherScaleCss = '.wu-unit-temperature .wu-label'
weatherTempCss = '.wu-unit-temperature .wu-value'
weatherConditionCss = '.condition-icon'
Finally, cleanup of the city H1 text needs to change just a little:
loc = soup.find('h1').get_text() \
.replace(' Weather Conditions', '') \
.replace('star_ratehome', '')
Sorry for the trouble, but we can't force them to not change the site.