Strip date string

main
Bob Mottram 2025-12-20 15:54:12 +00:00
parent 3336a37179
commit 673122e90d
1 changed files with 3 additions and 1 deletions

View File

@ -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: