I'm trying to get wind speeds from the Google 7 day forecast. When I inspect the webpage code I can see the wind speeds but when I use find_all()
on the class it returns only temperature data and todays wind speed from the 7 day forecast.
import requests
from bs4 import BeautifulSoup
page = requests.get("https://www.google.co.nz/search?ei=CQmzW9_zHsaiwAPuvruwCQ&q=tauranga+weather+forecast&oq=tauranga++forecast&gs_l=psy-ab.3.0.0i7i30k1l10.9062.9062.0.11810.1.1.0.0.0.0.205.205.2-1.1.0....0...1c.1.64.psy-ab..0.1.205....0.R-r6_9AWgnA")
soup = BeautifulSoup(page.content, "html.parser")
wind = soup.find_all("span", class_="wob_t")
for i, e in enumerate(wind):
print(i, e.get_text())
What am I doing wrong here?