mirror of https://github.com/CIRCL/AIL-framework
fix: [domain history] fix domain status
parent
fbeac2340d
commit
42d32ef310
|
@ -128,11 +128,15 @@ 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:
|
||||||
# domain down
|
epoch_val = int(epoch_val) # force int
|
||||||
if res == epoch_val:
|
try:
|
||||||
status = False
|
# domain down
|
||||||
# domain up
|
if int(res) == epoch_val:
|
||||||
else:
|
status = False
|
||||||
|
# domain up
|
||||||
|
else:
|
||||||
|
status = True
|
||||||
|
except ValueError:
|
||||||
status = True
|
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))
|
||||||
|
|
Loading…
Reference in New Issue