Omnibus commited on
Commit
26f9624
1 Parent(s): 792d4ad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -6
app.py CHANGED
@@ -28,13 +28,16 @@ def find_it1(url,q=None,num=None):
28
 
29
  #print(paragraph.string)
30
  #print(str(paragraph.text))
31
- out.append(f'{p}\n')
32
- out.append(f'{p.string}\n')
33
- out.append(f'{p.text}\n')
34
- out.append("\n")
 
 
 
35
  #print([str(tag) for tag in soup.find_all()])
36
  for tag in soup.find_all():
37
- rawp.append(f'{tag}\n')
38
  for url in soup.find_all('a'):
39
  print(url.get('href'))
40
 
@@ -62,7 +65,7 @@ with gr.Blocks() as app:
62
  num = gr.Number(value=1)
63
  btn = gr.Button()
64
  with gr.Row():
65
- rawp = gr.Textbox()
66
  outp = gr.JSON()
67
  btn.click(find_it1,[inp,q,num],[rawp,outp])
68
  app.launch()
 
28
 
29
  #print(paragraph.string)
30
  #print(str(paragraph.text))
31
+ #out.append(f'{p}\n')
32
+ #out.append(f'{p.string}\n')
33
+ #out.append(f'{p.text}\n')
34
+ #out.append("\n")
35
+ out.append(p)
36
+ out.append(p.string)
37
+ out.append(p.text)
38
  #print([str(tag) for tag in soup.find_all()])
39
  for tag in soup.find_all():
40
+ rawp.append(tag)
41
  for url in soup.find_all('a'):
42
  print(url.get('href'))
43
 
 
65
  num = gr.Number(value=1)
66
  btn = gr.Button()
67
  with gr.Row():
68
+ rawp = gr.JSON()
69
  outp = gr.JSON()
70
  btn.click(find_it1,[inp,q,num],[rawp,outp])
71
  app.launch()