fix timestamp bug #11
@ -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:]
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user