X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/72625dc72a628d843d7a3ebc0c813689408b4cf8..2d1a22705f7f2f067f2c839c32caf55941a37b01:/nominatim/db/status.py diff --git a/nominatim/db/status.py b/nominatim/db/status.py index 71e58787..d31196b3 100644 --- a/nominatim/db/status.py +++ b/nominatim/db/status.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# This file is part of Nominatim. (https://nominatim.org) +# +# Copyright (C) 2022 by the Nominatim developer community. +# For a full list of authors see the git log. """ Access and helper functions for the status and status log table. """ @@ -28,7 +34,7 @@ def compute_database_date(conn): LOG.info("Using node id %d for timestamp lookup", osmid) # Get the node from the API to find the timestamp when it was created. - node_url = 'https://www.openstreetmap.org/api/0.6/node/{}/1'.format(osmid) + node_url = f'https://www.openstreetmap.org/api/0.6/node/{osmid}/1' data = get_url(node_url) match = re.search(r'timestamp="((\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}))Z"', data)