May-09-2021, 10:16 AM
It looks like
You could either break this line up and only call find_next if there was a result or use a try/except that captures the AttributeError.
soup.find("h3", class_="screen-reader-text")
has not found anything.You could either break this line up and only call find_next if there was a result or use a try/except that captures the AttributeError.