diff options
Diffstat (limited to 'data/script.py')
-rw-r--r-- | data/script.py | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/data/script.py b/data/script.py index 138435f..e7e37e1 100644 --- a/data/script.py +++ b/data/script.py @@ -1,5 +1,4 @@ api_key="499c19189bmsh1de144300936427p134bd5jsnbdcec35e8f65" - import urllib.parse import requests import json @@ -68,23 +67,3 @@ for borough in boroughs: with open("./data/pubs.json", "w") as f: f.write(json.dumps(final)) - -# with open("./data/pubs.json", "r") as f: -# hello = json.load(f) -# print(hello[0]) - - -# from algoliasearch.search_client import SearchClient - -# client = SearchClient.create('YSWWVAX5RB', '31ce537df5b4594e34a03673e09cd662') -# index = client.init_index('pubfinder') - -# with open("./data/pubs.json", "r+") as f: -# records = json.load(f) -# for record in records: -# if record.get("geoloc", {}).get("lat", None) is None: -# records.remove(record) -# f.write(json.dumps(records)) - - - |