Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -159,17 +159,18 @@ def get_key(inp,data):
|
|
159 |
for i,ba in enumerate(data):
|
160 |
each_key=data[i].keys()
|
161 |
print(each_key)
|
162 |
-
for z,
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
|
|
173 |
print(key_box)
|
174 |
|
175 |
|
|
|
159 |
for i,ba in enumerate(data):
|
160 |
each_key=data[i].keys()
|
161 |
print(each_key)
|
162 |
+
for z,zz in enumerate(list(each_key)[0]):
|
163 |
+
for f,ff in enumerate(data[i][zz]):
|
164 |
+
ea = data[i][zz][f]
|
165 |
+
try:
|
166 |
+
if ea['title'] and key_w in ea['title']:
|
167 |
+
key_box.append(ea)
|
168 |
+
elif ea['description'] and key_w in ea['description']:
|
169 |
+
key_box.append(ea)
|
170 |
+
elif ea['link'] and key_w in ea['link']:
|
171 |
+
key_box.append(ea)
|
172 |
+
except Exception as e:
|
173 |
+
print(e)
|
174 |
print(key_box)
|
175 |
|
176 |
|