Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -50,8 +50,11 @@ def find_it(url,q=None,num=None):
|
|
50 |
soup = bs4.BeautifulSoup(source,'lxml')
|
51 |
|
52 |
for p in soup.find_all(f'{q}'):
|
53 |
-
|
54 |
-
|
|
|
|
|
|
|
55 |
#out.append(p)
|
56 |
out.append([{q:p.string,"parent":p.parent.parent.name,"content":p}])
|
57 |
#out.append(p.parent.name)
|
|
|
50 |
soup = bs4.BeautifulSoup(source,'lxml')
|
51 |
|
52 |
for p in soup.find_all(f'{q}'):
|
53 |
+
try:
|
54 |
+
print(soup.select(f'{p}:first-child'))
|
55 |
+
#print(p.findChildren())
|
56 |
+
except Exception as e:
|
57 |
+
print (e)
|
58 |
#out.append(p)
|
59 |
out.append([{q:p.string,"parent":p.parent.parent.name,"content":p}])
|
60 |
#out.append(p.parent.name)
|