Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -51,12 +51,12 @@ def find_it(url,q=None,num=None):
|
|
| 51 |
|
| 52 |
for p in soup.find_all(f'{q}'):
|
| 53 |
try:
|
| 54 |
-
print(soup.select(f'{p.name}: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)
|
| 61 |
|
| 62 |
for url in soup.find_all('a'):
|
|
|
|
| 51 |
|
| 52 |
for p in soup.find_all(f'{q}'):
|
| 53 |
try:
|
| 54 |
+
print(soup.select(f'{p.name}:first-child').name)
|
| 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,"first-child":soup.select(f'{p.name}:first-child').name,"content":p}])
|
| 60 |
#out.append(p.parent.name)
|
| 61 |
|
| 62 |
for url in soup.find_all('a'):
|