Omnibus commited on
Commit
c69bac0
1 Parent(s): 87074b3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
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
- print(p.findChildren())
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)