From 8a314436a63d815f8fdf6a2a422c06f7b853f20f Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 12 May 2025 12:05:36 +0100 Subject: [PATCH] Remove address from location --- webapp_hashtagswarm.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/webapp_hashtagswarm.py b/webapp_hashtagswarm.py index 350ac4aaf..f16b6b08d 100644 --- a/webapp_hashtagswarm.py +++ b/webapp_hashtagswarm.py @@ -396,6 +396,9 @@ def store_hash_tags(base_dir: str, nickname: str, domain: str, # get geolocation from tags location_str = get_location_from_post(post_json_object) if location_str: + # remove address if needed + if '
' in location_str: + location_str = location_str.split('
')[0].strip() if resembles_url(location_str): zoom, latitude, longitude = \ geocoords_from_map_link(location_str,