Closed tsoahans closed 6 years ago
The error has happened when I run the example code "commoncrawl.py".
This will cause the program to stop.
The bug is in the function __get_publishing_date in commoncrawl_extractor.py.
It should be checked whether the attribute is existing before accessing "article.publish_date".
I don't know why did this bug happen, I just add
if not hasattr(article, "publish_date"): return None
at the beginning of the function to prevent the program stopping.
you may get the fix by running pip3 install -U news-please
pip3 install -U news-please
The error has happened when I run the example code "commoncrawl.py".
This will cause the program to stop.
The bug is in the function __get_publishing_date in commoncrawl_extractor.py.
It should be checked whether the attribute is existing before accessing "article.publish_date".
I don't know why did this bug happen, I just add
at the beginning of the function to prevent the program stopping.