`import requests
from bs4 import BeautifulSoup
class Temperature:
def temperature(place):
placeTemp = []
placeWeather = "Weather in", place
url = f"https://www.google.com/search?q={placeWeather}"
r = requests.get(url)
soup = BeautifulSoup(r.text, "html.parser")
placeTemp.append(soup.find("div", class_="wob_t q8U8x").text)
print(placeWeather,"is",placeTemp)
t = Temperature.temperature("Delhi")
print(t)`
I am making a program that finds the temperature of a place using requests and BeautifulSoup. Whenever I run the code I get this error:
placeTemp.append(soup.find("div", class_="wob_t q8U8x").text)
AttributeError: 'NoneType' object has no attribute 'text'
I've tried changing the class_ part but it always gives the same error.