title: Why does find_next_sibling in bs4 work on one line of code but not another, very similar, line of code?
body: <p>I'm writing a simple web scraper to get data from the Texas Commission on Environmental Quality (TCEQ) website. The info I need is inside 'td' tags. I'm scraping the appropriate 'td' by referencing the preceding 'th', which all have the same text used to ID. I'm using find_next_sibling to scrape the data into a variable. </p>
  
  <p>Here is my code:</p>
  
  <pre><code>import requests
  from bs4 import BeautifulSoup
  
  URL = "https://www2.tceq.texas.gov/oce/eer/index.cfm?fuseaction=main.getDetails&amp;target=323191"
  
  r = requests.get(URL)
  
  soup = BeautifulSoup(r.content, 'html.parser')
  
  ###This one works
  report = soup.find("th", text="Incident Tracking Number:").find_next_sibling("td").text
  
  ###This one doesn't
  owner = soup.find("th", text="Name of Owner or Operator:").find_next_sibling("td").text
  
  </code></pre>
  
  <p>I'm getting this error: AttributeError: 'NoneType' object has no attribute 'find_next_sibling'. This code has several lines like the two above, and, like them, some of them work and some of them don't. I've looked into the HTML to see if there's another tag, but I'm not seeing it if it's there. Please and thank you for any help!</p>