Skip to content

Commit

Permalink
Update a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
CoolCoderCarl committed Apr 23, 2024
1 parent 481b282 commit 10c2de9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,15 @@ def http_requests(hosts: list):
try:
logging.info(f"Going to request {h}")
sleep(1)
response = requests.get(f"http://{h}")
logging.info(
f"{response.status_code} is type {type(response.status_code)}"
)
response = requests.get(f"http://{h}", timeout=10)
logging.info(response.text)
logging.info(response.headers)
logging.info(response.ok)

logging.info(
f"{response.ok} is type {type(response.ok)}"
)

if response.status_code != 200:
telegram_sender.send_alert_to_telegram(
f"Status code: {response.status_code} for this host: {h}"
Expand Down

0 comments on commit 10c2de9

Please sign in to comment.