Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -21,16 +21,17 @@ def find_all(url,q=None,num=None):
|
|
| 21 |
#print(soup.find_all('p'))
|
| 22 |
|
| 23 |
|
| 24 |
-
rawp.append([tag.name for tag in soup.find_all()] )
|
| 25 |
|
| 26 |
-
|
|
|
|
| 27 |
#print(tag.findChildren("a" , recursive=False))
|
| 28 |
-
try:
|
| 29 |
#n = tag.get(tag.string)
|
| 30 |
-
|
| 31 |
-
except Exception as e:
|
| 32 |
-
|
| 33 |
-
|
| 34 |
|
| 35 |
#rawp.append(tag.string)
|
| 36 |
#for url in soup.find_all('a'):
|
|
|
|
| 21 |
#print(soup.find_all('p'))
|
| 22 |
|
| 23 |
|
| 24 |
+
#rawp.append([tag.name for tag in soup.find_all()] )
|
| 25 |
|
| 26 |
+
#for tag in soup.find_all('h1','h2','h3','p','div','ul'):
|
| 27 |
+
for tag in soup.find_all():
|
| 28 |
#print(tag.findChildren("a" , recursive=False))
|
| 29 |
+
#try:
|
| 30 |
#n = tag.get(tag.string)
|
| 31 |
+
rawp.append({tag.name:tag.string,"parent":tag.parent.name})
|
| 32 |
+
#except Exception as e:
|
| 33 |
+
# print (e)
|
| 34 |
+
# rawp.append({tag.name:tag.string)
|
| 35 |
|
| 36 |
#rawp.append(tag.string)
|
| 37 |
#for url in soup.find_all('a'):
|