Remove address from location

main
Bob Mottram 2025-05-12 12:05:36 +01:00
parent 566f41c613
commit 8a314436a6
1 changed files with 3 additions and 0 deletions

View File

@ -396,6 +396,9 @@ def store_hash_tags(base_dir: str, nickname: str, domain: str,
# get geolocation from tags # get geolocation from tags
location_str = get_location_from_post(post_json_object) location_str = get_location_from_post(post_json_object)
if location_str: if location_str:
# remove address if needed
if '<br><address>' in location_str:
location_str = location_str.split('<br><address>')[0].strip()
if resembles_url(location_str): if resembles_url(location_str):
zoom, latitude, longitude = \ zoom, latitude, longitude = \
geocoords_from_map_link(location_str, geocoords_from_map_link(location_str,