Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
from typing import Annotated, Optional
|
2 |
|
3 |
-
from fastapi import FastAPI, Header
|
4 |
|
5 |
import html2text
|
6 |
import requests
|
@@ -22,7 +22,7 @@ app.add_middleware(
|
|
22 |
|
23 |
|
24 |
@app.get("/google_search")
|
25 |
-
async def google_search(q: str, delimiter: str = "\n---\n", sites:
|
26 |
print(sites)
|
27 |
print(type(sites))
|
28 |
url = f"https://www.google.com/search?q={q}"
|
|
|
1 |
from typing import Annotated, Optional
|
2 |
|
3 |
+
from fastapi import FastAPI, Header, Query
|
4 |
|
5 |
import html2text
|
6 |
import requests
|
|
|
22 |
|
23 |
|
24 |
@app.get("/google_search")
|
25 |
+
async def google_search(q: str, delimiter: str = "\n---\n", sites: Annotated[list[str] | None, Query()] = None):
|
26 |
print(sites)
|
27 |
print(type(sites))
|
28 |
url = f"https://www.google.com/search?q={q}"
|