title: AttributeError: 'NoneType' object has no attribute 'find' BeautifulSoup soup.find error
body: <p>I am trying to scrape weather form weather.com but it is not working for some reason here is the error:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;main.py&quot;, line 6, in &lt;module&gt;
      all=soup.find(&quot;div&quot;,{&quot;class&quot;:&quot;locations-title ten-day-page-title&quot;}).find(&quot;h1&quot;).text
  AttributeError: 'NoneType' object has no attribute 'find'
  </code></pre>
  <p>I don't know what is going wrong here.
  Here is the code:</p>
  <pre><code>import requests
  from bs4 import BeautifulSoup
  page = requests.get(&quot;https://weather.com/en-IE/weather/tenday/l/bf217d537cc1c8074ec195ce07fb74de3c1593caa6033b7c3be4645ccc5b01de&quot;)
  soup = BeautifulSoup(page.content,&quot;html.parser&quot;)
  
  all=soup.find(&quot;div&quot;,{&quot;class&quot;:&quot;locations-title ten-day-page-title&quot;}).find(&quot;h1&quot;).text
  table=soup.find_all(&quot;table&quot;,{&quot;class&quot;:&quot;twc-table&quot;})
  l=[]
  for items in table:
   for i in range(len(items.find_all(&quot;tr&quot;))-1):
    d = {}  
    d[&quot;day&quot;]=items.find_all(&quot;span&quot;,{&quot;class&quot;:&quot;date-time&quot;})[i].text
    d[&quot;date&quot;]=items.find_all(&quot;span&quot;,{&quot;class&quot;:&quot;day-detail&quot;})[i].text
    d[&quot;desc&quot;]=items.find_all(&quot;td&quot;,{&quot;class&quot;:&quot;description&quot;})[i].text 
    d[&quot;temp&quot;]=items.find_all(&quot;td&quot;,{&quot;class&quot;:&quot;temp&quot;})[i].text 
    d[&quot;precip&quot;]=items.find_all(&quot;td&quot;,{&quot;class&quot;:&quot;precip&quot;})[i].text
    d[&quot;wind&quot;]=items.find_all(&quot;td&quot;,{&quot;class&quot;:&quot;wind&quot;})[i].text  
    d[&quot;humidity&quot;]=items.find_all(&quot;td&quot;,{&quot;class&quot;:&quot;humidity&quot;})[i].text 
    l.append(d)
  </code></pre>
  <p>I really don't understand what is going on here as I am new to python and this library as a whole. I hope someone can help me with this problem.</p>