Compare commits

..

No commits in common. "d009450b4fcc0898bdfacb026c6cfc19070d8689" and "6a3ae2c0bc6a77409c72a12cb46eaae0660979c7" have entirely different histories.

2 changed files with 3 additions and 3 deletions

View File

@ -85,9 +85,8 @@ class RedCDNLivxIE(InfoExtractor):
# no id or title for a transmission. making ones up.
title = path \
.replace('/live', '').replace('live/', '') \
.replace('/channel', '').replace('channel/', '') \
.strip('/')
.replace('/live/', '/').replace('/live', '').replace('live/', '') \
.replace('/channel/', '/').replace('/channel', '').replace('channel/', '')
video_id = join_nonempty(title.replace('/', '-'), start_time, stop_time)
formats = []

View File

@ -14,6 +14,7 @@ from datetime import datetime, timedelta
def is_dst(date):
year = date.year
# last sunday of march and october, respectively. might break on switch days.
# but if they meet on a sunday, we probably got bigger problems than videos, right?
dst_start = datetime(year, 3, 31, 2) - timedelta(days=(datetime(year, 3, 31).weekday() + 1) % 7)
dst_end = datetime(year, 10, 31, 3) - timedelta(days=(datetime(year, 10, 31).weekday() + 1) % 7)
return dst_start <= date <= dst_end