Spaces:
Running
Running
Update imgsearch.py
Browse files- imgsearch.py +1 -1
imgsearch.py
CHANGED
@@ -3,7 +3,7 @@ from random import choice
|
|
3 |
from env import GOOGLE_API_KEY, CX, IMSEARCH_API_KEY
|
4 |
|
5 |
def search_img(term, orientation="landscape"):
|
6 |
-
_t = f"{orientation} image of {term}"
|
7 |
_ret = requests.get(
|
8 |
url=f"https://www.googleapis.com/customsearch/v1?key={IMSEARCH_API_KEY}&cx={CX}&q={_t}&searchType=image&fields=items(link)"
|
9 |
)
|
|
|
3 |
from env import GOOGLE_API_KEY, CX, IMSEARCH_API_KEY
|
4 |
|
5 |
def search_img(term, orientation="landscape"):
|
6 |
+
_t = f"{orientation} image of \"{term}\""
|
7 |
_ret = requests.get(
|
8 |
url=f"https://www.googleapis.com/customsearch/v1?key={IMSEARCH_API_KEY}&cx={CX}&q={_t}&searchType=image&fields=items(link)"
|
9 |
)
|