File tree Expand file tree Collapse file tree 1 file changed +0
-12
lines changed Expand file tree Collapse file tree 1 file changed +0
-12
lines changed Original file line number Diff line number Diff line change @@ -25,26 +25,14 @@ def __init__(self, url="No API URL"):
25
25
print (f"The API was called at: { self .timestamp } " )
26
26
27
27
def extract_image (self , camera_id ):
28
- # Debugging step to ensure camera_id is correctly parsed
29
- #print(f"Searching for camera_id: {camera_id}")
30
-
31
28
# Loop through the items and cameras to find the correct camera_id
32
29
for item in self .metadata ["items" ]:
33
30
for camera in item ["cameras" ]:
34
- # Debugging step to print the camera_id being checked
35
- #print(f"Checking camera_id: {camera['camera_id']}")
36
-
37
31
if camera ["camera_id" ] == str (camera_id ):
38
- #print(f"Found camera_id: {camera_id}")
39
32
return camera ["image" ] # Return the image URL if the camera ID matches
40
-
41
33
# If camera ID is not found
42
34
return f"Camera ID { camera_id } not found."
43
35
44
- #Debugging
45
- #client = APIClient(API_URL)
46
- #image_url = client.extract_image(1111)
47
- #print("Camera Image URL:", image_url)
48
36
49
37
50
38
You can’t perform that action at this time.
0 commit comments