Omnibus commited on
Commit
3b77cd2
·
1 Parent(s): 10cb70b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py CHANGED
@@ -6,6 +6,19 @@ import requests
6
  #from IPython.display import IFrame
7
 
8
  def scrape(instring):
 
 
 
 
 
 
 
 
 
 
 
 
 
9
 
10
  #r = requests.get(instring)
11
  chunk_size=2000
 
6
  #from IPython.display import IFrame
7
 
8
  def scrape(instring):
9
+ # set the url to perform the get request
10
+ URL = f'{instring}'
11
+ page = requests.get(URL)
12
+
13
+ # load the page content
14
+ text = page.content
15
+
16
+ # make a soup object by using beautiful
17
+ # soup and set the markup as html parser
18
+ soup = bs(text, "html.parser")
19
+ out = str(soup.prettify())
20
+ return gr.HTML.update(f'''{out}''')
21
+ def scrape0(instring):
22
 
23
  #r = requests.get(instring)
24
  chunk_size=2000