Update app.py
Browse files
app.py
CHANGED
@@ -51,12 +51,13 @@ def find_it(url,q=None,num=None):
|
|
51 |
|
52 |
for p in soup.find_all(f'{q}'):
|
53 |
try:
|
54 |
-
|
|
|
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')
|
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 |
+
test = soup.select(f'{p.name}:first-child')
|
55 |
+
print(test.name)
|
56 |
#print(p.findChildren())
|
57 |
except Exception as e:
|
58 |
print (e)
|
59 |
#out.append(p)
|
60 |
+
out.append([{q:p.string,"parent":p.parent.parent.name,"first-child":soup.select(f'{p.name}:first-child'),"content":p}])
|
61 |
#out.append(p.parent.name)
|
62 |
|
63 |
for url in soup.find_all('a'):
|