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