I am new to Python so any help would be appreciated. I have a web crawler using beautifulsoup. It works but for the below it returns the error 'None type object has no attribute'. I know it means it has come across a page where there is no entry. How do I stop this error and make it return all the other pages that have entries. Some of the pages in the web crawler have the entry and some are blank.
bbb = re.compile('First listed')
next_s = soup.find(text=bbb).parent.parent.get_text(strip=True)
Thanks