From 405b778c74005ebc9410ba25efa3980789418359 Mon Sep 17 00:00:00 2001 From: TheyWorkForYou Live CVS User Date: Fri, 30 Aug 2024 12:37:23 +0100 Subject: [PATCH] [SP] Better spot draft headings. --- pyscraper/sp_2024/convert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyscraper/sp_2024/convert.py b/pyscraper/sp_2024/convert.py index b60f8a28..66bbec80 100644 --- a/pyscraper/sp_2024/convert.py +++ b/pyscraper/sp_2024/convert.py @@ -85,7 +85,7 @@ def convert_xml_to_twfy(file_path: Path, output_dir: Path, verbose: bool = False timestamp = "" # remove [Draft] from title - title = title.replace("[Draft]", "").strip() + title = re.sub(r'\[Draft\]( Business until \d\d:\d\d)?', '', title).strip() # get the date in format Thursday 9 June 2005 date_str = datetime.date.fromisoformat(iso_date).strftime("%A %d %B %Y")