mirror of
https://github.com/bellingcat/instagram-location-search.git
synced 2026-06-08 02:28:29 +03:00
Merge pull request #5 from Pimverleg/patch-1
Update instagram-locations.py
This commit is contained in:
@@ -41,17 +41,17 @@ def get_fuzzy_locations(lat, lng, cookie, sigma=2):
|
||||
return locs
|
||||
|
||||
# converts list of instagram locations into valid geojson
|
||||
def make_geojson(locs):
|
||||
def make_geojson(locations):
|
||||
features = []
|
||||
|
||||
for l in [l for l in locs if 'lng' in l]:
|
||||
for location in [location for location in locations if 'lng' in location]:
|
||||
feature = {
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "Point",
|
||||
"coordinates": [l["lng"], l["lat"]]
|
||||
"coordinates": [location["lng"], location["lat"]]
|
||||
},
|
||||
"properties": l}
|
||||
"properties": location}
|
||||
features.append(feature)
|
||||
|
||||
return {"type": "FeatureCollection", "features": features}
|
||||
|
||||
Reference in New Issue
Block a user