summaryrefslogtreecommitdiff
path: root/scraper/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'scraper/util.py')
-rw-r--r--scraper/util.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/scraper/util.py b/scraper/util.py
index 47e5a4aa..27465487 100644
--- a/scraper/util.py
+++ b/scraper/util.py
@@ -283,6 +283,17 @@ class AddressBook (object):
return self.data[index]
return None
+ def findObject(self, address):
+ row = self.find(address)
+ if row is not None:
+ return {
+ 'address': row[0],
+ 'lat': row[3],
+ 'lng': row[4],
+ 'address_type': row[5],
+ }
+ return None
+
def fetch_spreadsheet():
scope = ['https://spreadsheets.google.com/feeds','https://www.googleapis.com/auth/drive']
credentials = ServiceAccountCredentials.from_json_keyfile_name('./.creds/Megapixels-ef28f91112a9.json', scope)