Skip to content

Commit

Permalink
Update getData.py
Browse files Browse the repository at this point in the history
  • Loading branch information
moghya authored Dec 29, 2016
1 parent fdceeca commit a9a3f37
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions getData/getData.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ def searchPlaces(url):
res = s.get(url)
return str(res.text)

def getPlaces():
center = '12.985966,77.580084'
dist = '40000'
def getPlaces(center,dist):
url = 'https://graph.facebook.com/v2.8/search?access_token='+token+'&type=place&center='+center+'&debug=all&distance='+dist+'&format=json&method=get&pretty=1&suppress_http_code=1'
visit = url
after = True
Expand Down Expand Up @@ -60,13 +58,16 @@ def exportData(file):
file.write(jdata)
file.close()

def getData():
getPlaces()
def getData(center,dist):
getPlaces(center,dist)
for placeID in placeIDS:
getPlaceDetails(placeID)
exportData('cityName')

getData()

center = '12.985966,77.580084'
dist = '40000'
getData(center,dist)



Expand Down

0 comments on commit a9a3f37

Please sign in to comment.