Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -42,8 +42,14 @@ def verify_image(url1):
|
|
42 |
end_index = file.name.rfind('$')
|
43 |
if start_index != -1 and end_index != -1:
|
44 |
name = file.name[start_index + 1:end_index]
|
45 |
-
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
if flag == False:
|
49 |
print("Not Verified")
|
|
|
42 |
end_index = file.name.rfind('$')
|
43 |
if start_index != -1 and end_index != -1:
|
44 |
name = file.name[start_index + 1:end_index]
|
45 |
+
path = f"{name}/"
|
46 |
+
files_username = storage.bucket.list_blobs(prefix=path)
|
47 |
+
for file_username in files_username:
|
48 |
+
if (file_username.name.endswith(".json")):
|
49 |
+
url_username = storage.child(f"{file_username.name}").get_url(None)
|
50 |
+
with requests.get(url_username) as response_username:
|
51 |
+
metadata = response_username.json()
|
52 |
+
return {"username": name,"metadata": metadata}
|
53 |
|
54 |
if flag == False:
|
55 |
print("Not Verified")
|