Skip to content

Commit

Permalink
coords extractor bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
papko26 committed Dec 2, 2024
1 parent 455473d commit f8150cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/gtw.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,8 @@ def extract_coordinates_with_regex(url):
# user browsed after he chosed the destination.
# Lets ensure we will not try to parse it.
# Same for /dir/ locations - it is google maps directions (route).
if "/place/" in url or "/dir/":
logger.debug("fastrrack: it is a 'places' link, parsing skipped")
if url and ("/place/" in url or "/dir/" in url):
logger.debug("fastrrack: it is a 'places' or 'dir' link, parsing skipped")
return None
# Regex pattern to match latitude and longitude pairs
pattern = r"(-?\d+(\.\d+)?),\s*(-?\d+(\.\d+)?)"
Expand Down

0 comments on commit f8150cc

Please sign in to comment.