From 673122e90d179729efbc3ced5f4c9c127e9c68a8 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 20 Dec 2025 15:54:12 +0000 Subject: [PATCH] Strip date string --- newswire.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/newswire.py b/newswire.py index 959fbed70..c25cb7892 100644 --- a/newswire.py +++ b/newswire.py @@ -349,6 +349,7 @@ def parse_feed_date(pub_date: str, unique_string_identifier: str) -> str: elif '-' in ending: timezone_str = '-' + ending.split('-')[1] pub_date2 = pub_date2.split('.')[0] + timezone_str + pub_date2 = pub_date2.strip() try: published_date = \ @@ -356,7 +357,8 @@ def parse_feed_date(pub_date: str, unique_string_identifier: str) -> str: # published_date = \ # date_from_string_format(pub_date2, [date_format]) except BaseException as exc: - errmsg = ' | ' + date_format + ' ' + str(exc).replace('\n', ' ') + errmsg = ' | ' + date_format + ' ' + \ + str(exc).replace('\n', ' ').replace('\r', ' ') continue if published_date is not None: