Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -304,10 +304,10 @@ def find_all(purpose,task,history, url):
|
|
304 |
print(soup.title.parent.name)
|
305 |
#rawp.append([tag.name for tag in soup.find_all()] )
|
306 |
print([tag.name for tag in soup.find_all()])
|
307 |
-
rawp=(f'RAW TEXT RETURNED
|
308 |
out.append(rawp)
|
309 |
-
q=
|
310 |
-
for p in soup.find_all(
|
311 |
out.append([{q:p.string,"additional":z,"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)
|
|
|
304 |
print(soup.title.parent.name)
|
305 |
#rawp.append([tag.name for tag in soup.find_all()] )
|
306 |
print([tag.name for tag in soup.find_all()])
|
307 |
+
rawp=(f'RAW TEXT RETURNED: {soup.text}')
|
308 |
out.append(rawp)
|
309 |
+
q=["a","p","span","content","article"]
|
310 |
+
for p in soup.find_all(q):
|
311 |
out.append([{q:p.string,"additional":z,"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)
|