mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-10 08:38:28 +00:00
fix: [domain history] fix domain status
This commit is contained in:
parent
fbeac2340d
commit
42d32ef310
1 changed files with 9 additions and 5 deletions
|
@ -128,12 +128,16 @@ class HiddenServices(object):
|
||||||
def extract_epoch_from_history(self, crawled_history):
|
def extract_epoch_from_history(self, crawled_history):
|
||||||
epoch_list = []
|
epoch_list = []
|
||||||
for res, epoch_val in crawled_history:
|
for res, epoch_val in crawled_history:
|
||||||
|
epoch_val = int(epoch_val) # force int
|
||||||
|
try:
|
||||||
# domain down
|
# domain down
|
||||||
if res == epoch_val:
|
if int(res) == epoch_val:
|
||||||
status = False
|
status = False
|
||||||
# domain up
|
# domain up
|
||||||
else:
|
else:
|
||||||
status = True
|
status = True
|
||||||
|
except ValueError:
|
||||||
|
status = True
|
||||||
epoch_val = int(epoch_val) # force int
|
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))
|
epoch_list.append((epoch_val, time.strftime('%Y/%m/%d - %H:%M.%S', time.gmtime(epoch_val)), status))
|
||||||
return epoch_list
|
return epoch_list
|
||||||
|
|
Loading…
Reference in a new issue