mirror of
https://github.com/BigBodyCobain/Shadowbroker.git
synced 2026-04-27 13:05:59 +02:00
6281085045
Former-commit-id: 3b8912a8f67efd51c08cc6f4c77d43266b8fdc1b
13 lines
297 B
Python
13 lines
297 B
Python
import json
|
|
import urllib.request
|
|
import time
|
|
|
|
time.sleep(5)
|
|
try:
|
|
data = urllib.request.urlopen('http://localhost:8000/api/live-data').read()
|
|
d = json.loads(data)
|
|
ships = d.get('ships', [])
|
|
print(f"Ships: {len(ships)}")
|
|
except Exception as e:
|
|
print(f"Error fetching API: {e}")
|