Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -310,12 +310,13 @@ def find_all(purpose,task,history, url):
|
|
310 |
for p in soup.find_all(q):
|
311 |
out.append([{q:p.string,"parent":p.parent.name,"previous":[b for b in p.previous],"first-child":[b.name for b in p.children],"content":p}])
|
312 |
c=0
|
|
|
313 |
rl = len(out)
|
314 |
print(f'rl:: {rl}')
|
315 |
-
for ea in out:
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
print (f'c:: {c}')
|
320 |
if rl > MAX_DATA:
|
321 |
print("compressing...")
|
|
|
310 |
for p in soup.find_all(q):
|
311 |
out.append([{q:p.string,"parent":p.parent.name,"previous":[b for b in p.previous],"first-child":[b.name for b in p.children],"content":p}])
|
312 |
c=0
|
313 |
+
out = str(out)
|
314 |
rl = len(out)
|
315 |
print(f'rl:: {rl}')
|
316 |
+
#for ea in out:
|
317 |
+
for i in str(out):
|
318 |
+
if i == " " or i=="," or i=="\n":
|
319 |
+
c +=1
|
320 |
print (f'c:: {c}')
|
321 |
if rl > MAX_DATA:
|
322 |
print("compressing...")
|