1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-27 21:54:17 +01:00

parse date periods with hours and seconds only

This commit is contained in:
Jakob Schlyter 2018-07-31 10:20:43 +02:00 committed by Johan Andersson
parent 7736af04b5
commit 57e51c8bb1

View File

@ -180,7 +180,7 @@ def dashparse(config, res, url, output=None):
def parse_dates(date_str): def parse_dates(date_str):
date_patterns = ["%Y-%m-%dT%H:%M:%S.%fZ", "PT%HH%MM%S.%fS", "PT%HH%MM%SS", "PT%MM%S.%fS", "PT%MM%SS"] date_patterns = ["%Y-%m-%dT%H:%M:%S.%fZ", "PT%HH%MM%S.%fS", "PT%HH%MM%SS", "PT%MM%S.%fS", "PT%MM%SS", "PT%HH%SS", "PT%HH%S.%fS"]
dt = None dt = None
for pattern in date_patterns: for pattern in date_patterns:
try: try: