mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-30 15:14:14 +01:00
svtplay: fix a crash while parsing timezone data
This commit is contained in:
parent
c6e0b3124c
commit
b65b45b471
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user