Omnibus commited on
Commit
df4b728
1 Parent(s): 5039147

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -285,11 +285,12 @@ def find_all(purpose,task,history, url):
285
  return_list=[]
286
  print (url)
287
  #if action_input in query.tasks:
288
- print ("trying")
289
  try:
290
  if url != "" and url != None:
291
  rawp = []
292
- source = urllib.request.urlopen(url).read()
 
293
  soup = bs4.BeautifulSoup(source,'lxml')
294
  # title of the page
295
  print(soup.title)
 
285
  return_list=[]
286
  print (url)
287
  #if action_input in query.tasks:
288
+ print (f"trying URL:: {url}")
289
  try:
290
  if url != "" and url != None:
291
  rawp = []
292
+ source = requests.get(url)
293
+ #source = urllib.request.urlopen(url).read()
294
  soup = bs4.BeautifulSoup(source,'lxml')
295
  # title of the page
296
  print(soup.title)