From f226880c6d44098b5e99b05a83ed739e18d15690 Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Wed, 14 Mar 2018 01:28:40 +0100 Subject: [tennistv] Add support for tennistv.com --- youtube_dl/utils.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'youtube_dl/utils.py') diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index a21455f70..027d12785 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -1211,6 +1211,11 @@ def unified_timestamp(date_str, day_first=True): if m: date_str = date_str[:-len(m.group('tz'))] + # Python only supports microseconds, so remove nanoseconds + m = re.search(r'^([0-9]{4,}-[0-9]{1,2}-[0-9]{1,2}T[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}\.[0-9]{6})[0-9]+$', date_str) + if m: + date_str = m.group(1) + for expression in date_formats(day_first): try: dt = datetime.datetime.strptime(date_str, expression) - timezone + datetime.timedelta(hours=pm_delta) -- cgit v1.2.3