From e194b29522ecb56c5da89b4306903a339f833820 Mon Sep 17 00:00:00 2001 From: hurinhu Date: Sat, 3 Apr 2021 11:59:23 +1300 Subject: [PATCH] fixed undefined 'np' --- GoogleNews/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GoogleNews/__init__.py b/GoogleNews/__init__.py index edd8dc2..6ecfd47 100644 --- a/GoogleNews/__init__.py +++ b/GoogleNews/__init__.py @@ -22,7 +22,7 @@ def lexical_date_parser(date_to_check): if datetime_tmp==None: date_tmp=date_tmp[1:] count+=1 - + if datetime_tmp==None: date_tmp=date_to_check else: @@ -52,7 +52,7 @@ def define_date(date): date_list = date.replace(',','').split()[-3:] return datetime.datetime(day=int(date_list[1]), month=months[month], year=int(date_list[2])) except: - return float(np.nan) + return float('nan') ### CLASSEs