From 28bddd69ce6e1a37f201b5ced6066c51bbef0061 Mon Sep 17 00:00:00 2001 From: vincent Date: Fri, 10 May 2019 09:45:08 +0200 Subject: [PATCH] fix bug timestamp --- backend/chainetv/emission.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/backend/chainetv/emission.py b/backend/chainetv/emission.py index e94bd3e..b8a8af3 100644 --- a/backend/chainetv/emission.py +++ b/backend/chainetv/emission.py @@ -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:] -