Omnibus commited on
Commit
8a6be4c
1 Parent(s): b37a103

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -19,14 +19,18 @@ def find_all(url,q=None,num=None):
19
  # getting specific values:
20
  #print(soup.p)
21
  #print(soup.find_all('p'))
22
- for tag in soup.find_all(True):
 
 
 
 
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'):
 
19
  # getting specific values:
20
  #print(soup.p)
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
  #print(tag.findChildren("a" , recursive=False))
28
  try:
29
  #n = tag.get(tag.string)
30
  rawp.append({tag.name:tag.text,"parent":tag.parent.name})
31
  except Exception as e:
32
  print (e)
33
+ rawp.append({tag.name:tag.text})'''
34
 
35
  #rawp.append(tag.string)
36
  #for url in soup.find_all('a'):