diff --git a/crawler.py b/crawler.py index d9af85b..4097afd 100644 --- a/crawler.py +++ b/crawler.py @@ -49,6 +49,9 @@ class Crawler: return urls def __check_for_yaa__(self, soup) -> bool: + if not soup.find(class_='article-author'): + return False + author = soup.find(class_='article-author').text if 'yaa' in author: