forked from sd2001/-le-medicin
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnearby.py
37 lines (29 loc) · 840 Bytes
/
nearby.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import geocoder
from serpwow.google_search_results import GoogleSearchResults
import json
ipad=geocoder.ip('me')
serpwow = GoogleSearchResults("883CB6B9970E4AE1858E3381DF8F0674")
def hospital_search(place):
q="Good hospitals near "+place
l=place+","+str(ipad[0])
params = {
"q" : q,
"location":l,
"hl" : "en",
}
# retrieve the Google search results as JSON
result_json = serpwow.get_json(params)
names=result_json['local_results']
return names
def pharmacy_search(place):
q="Good Medical shops near "+place
l=place+","+str(ipad[0])
params = {
"q" : q,
"location":l,
"hl" : "en",
}
# retrieve the Google search results as JSON
result_json = serpwow.get_json(params)
names=result_json['local_results']
return names