[tennistv] Add support for tennistv.com
This commit is contained in:
parent
08250b69c2
commit
f226880c6d
4 changed files with 120 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue