KingNish commited on
Commit
ae964f3
·
verified ·
1 Parent(s): 0ee9554

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -21,7 +21,14 @@ def search():
21
  try:
22
  with WEBS() as webs:
23
  results = webs.text(keywords=q, region=region, safesearch=safesearch, backend=backend, max_results=max_results)
24
- return results
 
 
 
 
 
 
 
25
  except Exception as e:
26
  return {"error": f"Error during search: {e}"}
27
 
 
21
  try:
22
  with WEBS() as webs:
23
  results = webs.text(keywords=q, region=region, safesearch=safesearch, backend=backend, max_results=max_results)
24
+ # Extract the data you want to display (adjust based on webscout's structure)
25
+ search_results = [
26
+ {
27
+ 'title': result.title,
28
+ 'description': result.description
29
+ } for result in results
30
+ ]
31
+ return search_results # Return the extracted data
32
  except Exception as e:
33
  return {"error": f"Error during search: {e}"}
34