Skip to content

Commit a289606

Browse files
committed
Return full location for the events
1 parent 0e6ddc6 commit a289606

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tools/events-automation/generate_events_meetup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@ def get_20_events(groups) -> list[Event]:
248248

249249
# Convert obtained latitude and longitude of an event to formatted location
250250
address = (GEOLOCATOR.reverse(str(venue["lat"]) +","+ str(venue["lng"]))).raw["address"]
251-
#TODO: return the full address for location
252251
location = format_location(address)
253252
date = node["dateTime"]
254253
url = node["eventUrl"]
@@ -265,12 +264,13 @@ def format_location(address) -> str:
265264
if not address:
266265
return "No location"
267266

268-
# Components in the order for location
269-
components = ['city', 'state', 'country']
270-
271-
# Get available components, otherwise replace missing component with empty string
267+
# All components for a location
268+
components = ['road', 'city', 'state', 'postcode', 'country', 'country_code', 'suburb', 'neighborhood', 'county']
269+
270+
# Get available components, otherwise replace missing component with an empty string
272271
location = [address.get(component, "") for component in components]
273272

273+
274274
return ','.join(location) if location else "No location"
275275

276276
def get_events() -> list[Event]:

0 commit comments

Comments
 (0)