So, I'm trying to pull a temperature value from www.theweathernetwork.com and when I inspect the element I'm getting the following structure:
<div class="mainTemp-wrap">
<p class="temperature">
14
<span>
°C
</span>
</p>
<p class="mcity-feels-like">Feels like
<span>13</span>
</p>
</div>
But when I run the following code, I get nothing returned:
import requests
from bs4 import BeautifulSoup
url = "https://www.theweathernetwork.com/us/weather/illinois/chicago"
r = requests.get(url)
soup = BeautifulSoup(r.content)
g_data = soup.findAll("p", {"class": "temperature"})
print g_data