jonathanjordan21 commited on
Commit
51cbaf5
·
verified ·
1 Parent(s): 633923e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -24,8 +24,8 @@ app.add_middleware(
24
  @app.get("/google_search")
25
  async def google_search(q: str, delimiter: str = "\n---\n", sites: Optional[list] = None):
26
  url = f"https://www.google.com/search?q={q}"
27
- # if sites:
28
- # url += "&" + " OR ".join(["site:"+site for site in sites])
29
 
30
  texts = ""
31
  soup = BeautifulSoup(requests.get(url).content, "html.parser")
 
24
  @app.get("/google_search")
25
  async def google_search(q: str, delimiter: str = "\n---\n", sites: Optional[list] = None):
26
  url = f"https://www.google.com/search?q={q}"
27
+ if sites:
28
+ url += "&" + " OR ".join(["site:"+site for site in sites])
29
 
30
  texts = ""
31
  soup = BeautifulSoup(requests.get(url).content, "html.parser")