Update app.py
Browse files
app.py
CHANGED
@@ -8,17 +8,10 @@ def fetch_google_maps_reviews(query=None, location=None):
|
|
8 |
params = {
|
9 |
"api_key": "b18f4d37042ab8222028830ee1d3db47481ac48f545382eacd7f0469414f1b1a",
|
10 |
"engine": "google_maps_reviews",
|
|
|
11 |
"google_domain": "google.it",
|
12 |
"hl": "it",
|
13 |
"gl": "it"
|
14 |
-
}
|
15 |
-
|
16 |
-
if query:
|
17 |
-
params["q"] = query
|
18 |
-
if location:
|
19 |
-
params["ll"] = location
|
20 |
-
|
21 |
-
search = GoogleSearch(params)
|
22 |
results = search.get_dict()
|
23 |
return results
|
24 |
|
@@ -28,6 +21,7 @@ st.write("Enter a search query or a geographic location to fetch reviews from Go
|
|
28 |
# Input fields
|
29 |
query = st.text_input("Search Query (q): (Use for fetching reviews)")
|
30 |
|
|
|
31 |
location = st.text_input("Geographic Location (ll): (Format: '@latitude,longitude,zoom')")
|
32 |
|
33 |
# Button to trigger the API call
|
|
|
8 |
params = {
|
9 |
"api_key": "b18f4d37042ab8222028830ee1d3db47481ac48f545382eacd7f0469414f1b1a",
|
10 |
"engine": "google_maps_reviews",
|
11 |
+
|
12 |
"google_domain": "google.it",
|
13 |
"hl": "it",
|
14 |
"gl": "it"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
results = search.get_dict()
|
16 |
return results
|
17 |
|
|
|
21 |
# Input fields
|
22 |
query = st.text_input("Search Query (q): (Use for fetching reviews)")
|
23 |
|
24 |
+
|
25 |
location = st.text_input("Geographic Location (ll): (Format: '@latitude,longitude,zoom')")
|
26 |
|
27 |
# Button to trigger the API call
|