From b65b45b471c5787befff7b29b1ae85d6e34adf30 Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Wed, 17 Apr 2024 23:15:36 +0200 Subject: [PATCH] svtplay: fix a crash while parsing timezone data --- lib/svtplay_dl/service/svtplay.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/svtplay_dl/service/svtplay.py b/lib/svtplay_dl/service/svtplay.py index de62b8b..9e5607f 100644 --- a/lib/svtplay_dl/service/svtplay.py +++ b/lib/svtplay_dl/service/svtplay.py @@ -404,10 +404,11 @@ class Svtplay(Service, MetadataThumbMixin): validfrom = episode["item"]["validFrom"] if "+" in validfrom: + timeformat = "%Y-%m-%dT%H:%M:%S.%f%z" if "." in episode["item"]["validFrom"] else "%Y-%m-%dT%H:%M:%S%z" date = time.mktime( datetime.datetime.strptime( _fix_broken_timezone_implementation(episode["item"]["validFrom"].replace("Z", "")), - "%Y-%m-%dT%H:%M:%S%z", + timeformat, ).timetuple(), ) else: