From 42d32ef310db30256bd94b8573a7c2a1da952fdc Mon Sep 17 00:00:00 2001 From: Terrtia Date: Tue, 18 Jun 2019 11:19:56 +0200 Subject: [PATCH] fix: [domain history] fix domain status --- bin/packages/HiddenServices.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/bin/packages/HiddenServices.py b/bin/packages/HiddenServices.py index ae96b830..b60c6d99 100755 --- a/bin/packages/HiddenServices.py +++ b/bin/packages/HiddenServices.py @@ -128,11 +128,15 @@ class HiddenServices(object): def extract_epoch_from_history(self, crawled_history): epoch_list = [] for res, epoch_val in crawled_history: - # domain down - if res == epoch_val: - status = False - # domain up - else: + epoch_val = int(epoch_val) # force int + try: + # domain down + if int(res) == epoch_val: + status = False + # domain up + else: + status = True + except ValueError: status = True epoch_val = int(epoch_val) # force int epoch_list.append((epoch_val, time.strftime('%Y/%m/%d - %H:%M.%S', time.gmtime(epoch_val)), status))