Omnibus commited on
Commit
345c836
1 Parent(s): 34c790c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
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
- for i in str(ea):
317
- if i == " " or i==",":
318
- c +=1
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...")