Skip to content

Commit a3a9d7f

Browse files
committed
try ceye.io
1 parent 4963ff1 commit a3a9d7f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

module/api/ceye.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ def ceye():
1313
ceye_token = globals.get_value("ceye_token")
1414
ceye_token = globals.get_value("ceye_token")
1515
api_url = "http://api.ceye.io/v1/records?type=dns&token=" + ceye_token
16-
res = requests.get(api_url, headers=headers, timeout=timeout, verify=False)
17-
if res.status_code != 200:
18-
print(now.timed(de=0) + color.red_warn() + color.red(" Ceye.io: " + res.text))
19-
return res.text
16+
try:
17+
res = requests.get(api_url, headers=headers, timeout=timeout, verify=False)
18+
if res.status_code != 200:
19+
print(now.timed(de=0) + color.red_warn() + color.red(" Ceye.io: " + res.text))
20+
return res.text
21+
except Exception:
22+
return "Ceye.io connection failed"

0 commit comments

Comments
 (0)