Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -48,7 +48,7 @@ def find_all(url):
|
|
48 |
out.append(rawp)
|
49 |
q=("a","p","span","content","article")
|
50 |
for p in soup.find_all(q):
|
51 |
-
out.append([{q:p.string,"parent":p.parent.name,"previous":[
|
52 |
print (f'OUT :: {out}')
|
53 |
'''
|
54 |
c=0
|
@@ -214,7 +214,7 @@ def summarize(inp,history,data=None,file=None,url=None):
|
|
214 |
val, out = find_all(url)
|
215 |
if not val:
|
216 |
data="Error"
|
217 |
-
rawp = out
|
218 |
else:
|
219 |
rawp=out
|
220 |
if file:
|
|
|
48 |
out.append(rawp)
|
49 |
q=("a","p","span","content","article")
|
50 |
for p in soup.find_all(q):
|
51 |
+
out.append([{q:p.string,"parent":p.parent.name,"previous":[p.previous],"first-child":[b.name for b in p.children],"content":p}])
|
52 |
print (f'OUT :: {out}')
|
53 |
'''
|
54 |
c=0
|
|
|
214 |
val, out = find_all(url)
|
215 |
if not val:
|
216 |
data="Error"
|
217 |
+
rawp = str(out)
|
218 |
else:
|
219 |
rawp=out
|
220 |
if file:
|