Update app.py
Browse files
app.py
CHANGED
@@ -23,10 +23,10 @@ def find_all(url,q=None,num=None):
|
|
23 |
#print(tag.findChildren("a" , recursive=False))
|
24 |
try:
|
25 |
#n = tag.get(tag.string)
|
26 |
-
rawp.append({tag.name:tag.
|
27 |
except Exception as e:
|
28 |
print (e)
|
29 |
-
rawp.append({tag.name:tag.
|
30 |
|
31 |
#rawp.append(tag.string)
|
32 |
#for url in soup.find_all('a'):
|
@@ -52,7 +52,7 @@ def find_it(url,q=None,num=None):
|
|
52 |
for url in soup.find_all('a'):
|
53 |
print(url.get('href'))
|
54 |
|
55 |
-
print(soup.get_text())
|
56 |
return out
|
57 |
|
58 |
def find_it2(url):
|
|
|
23 |
#print(tag.findChildren("a" , recursive=False))
|
24 |
try:
|
25 |
#n = tag.get(tag.string)
|
26 |
+
rawp.append({tag.name:tag.text,"parent":tag.parent.name})
|
27 |
except Exception as e:
|
28 |
print (e)
|
29 |
+
rawp.append({tag.name:tag.text})
|
30 |
|
31 |
#rawp.append(tag.string)
|
32 |
#for url in soup.find_all('a'):
|
|
|
52 |
for url in soup.find_all('a'):
|
53 |
print(url.get('href'))
|
54 |
|
55 |
+
#print(soup.get_text())
|
56 |
return out
|
57 |
|
58 |
def find_it2(url):
|