From b8adaecf3900cfeea06d969707c0f49280f11da4 Mon Sep 17 00:00:00 2001 From: Mateusz Konieczny Date: Tue, 1 Nov 2022 20:19:15 +0100 Subject: [PATCH] special handling of Hackney links --- .../obtain_livestream_data_and_load_into_database.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/etl/planning_data/obtain_livestream_data_and_load_into_database.py b/etl/planning_data/obtain_livestream_data_and_load_into_database.py index 56570b90..a7a55ab4 100644 --- a/etl/planning_data/obtain_livestream_data_and_load_into_database.py +++ b/etl/planning_data/obtain_livestream_data_and_load_into_database.py @@ -64,6 +64,10 @@ def load_data_into_database(cursor, data): "data_source": "Greater London Authority's Planning London DataHub", "data_source_link": None } + if "Hackney" in entry["application_id"]: + entry["application_url"] != None: + if "https://" not in entry["application_url"]: + entry["application_url"] = "https://developmentandhousing.hackney.gov.uk" + entry["application_url"] insert_entry(cursor, entry) except TypeError as e: print()