fix bug timestamp

This commit is contained in:
vincent 2019-05-10 09:45:08 +02:00
parent 2991eb2f59
commit 28bddd69ce

View File

@ -19,10 +19,10 @@ class Emmission(object):
return None
print("load")
self.html = BeautifulSoup(response.read(),"html.parser")
self.timestamp=datetime.utcnow()
self.timeexp=datetime.utcnow() +timedelta(minutes=5)
def parse_emmission(self,strsearch):
if (self.timestamp > self.timestamp+timedelta(minutes=5)):
if (datetime.utcnow() > self.timeexp):
self._LoadreferencePage()
strsearch=strsearch.replace('É','E')
linkchaine=self.html.find(text=re.compile(re.escape(strsearch)))
@ -61,4 +61,3 @@ def remove_first_space (string):
break
return string[space_number:]