Fixing NoneType error when no author is given
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user