Compare commits

..

2 Commits

Author SHA1 Message Date
lauren n. liberda
d009450b4f [extractor/sejm] review changes 2024-01-12 18:02:01 +01:00
lauren n. liberda
6b469573db [extractor/redge] review changes 2024-01-12 18:01:45 +01:00
2 changed files with 3 additions and 3 deletions

View File

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

View File

@ -14,7 +14,6 @@ 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