Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -40,8 +40,7 @@ def translate(text,lang):
|
|
40 |
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15',
|
41 |
'Mozilla/5.0 (Macintosh; Intel Mac OS X 13_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15'
|
42 |
]
|
43 |
-
|
44 |
-
url = f'https://www.google.com/search?{parse.urlencode(params)}'
|
45 |
print(url)
|
46 |
resp = requests.get(
|
47 |
url = url,
|
|
|
40 |
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15',
|
41 |
'Mozilla/5.0 (Macintosh; Intel Mac OS X 13_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15'
|
42 |
]
|
43 |
+
url = f'https://www.google.com/search?q={lang}: {text}'.replace(" ","+")
|
|
|
44 |
print(url)
|
45 |
resp = requests.get(
|
46 |
url = url,
|