Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ async def google_search(q: str, delimiter: str = "\n---\n", sites: Annotated[lis
|
|
27 |
print(type(sites))
|
28 |
url = f"https://www.google.com/search?q={q}"
|
29 |
if sites:
|
30 |
-
url += "
|
31 |
|
32 |
texts = ""
|
33 |
soup = BeautifulSoup(requests.get(url).content, "html.parser")
|
|
|
27 |
print(type(sites))
|
28 |
url = f"https://www.google.com/search?q={q}"
|
29 |
if sites:
|
30 |
+
url += " OR ".join(["site:"+site for site in sites])
|
31 |
|
32 |
texts = ""
|
33 |
soup = BeautifulSoup(requests.get(url).content, "html.parser")
|