Compare commits

..

No commits in common. "47e6dc3e441e0b59453ca560076e7e57115e9fbe" and "e2d05bf782759eb167447388a0a05e6968ccdf7e" have entirely different histories.

2 changed files with 11 additions and 12 deletions

View File

@ -7,9 +7,9 @@ from ..utils import (
int_or_none,
join_nonempty,
parse_qs,
traverse_obj,
update_url_query,
)
from ..utils.traversal import traverse_obj
class RedCDNLivxIE(InfoExtractor):

View File

@ -1,23 +1,22 @@
import datetime
from .common import InfoExtractor
from .redge import RedCDNLivxIE
from ..utils import (
clean_html,
join_nonempty,
js_to_json,
strip_or_none,
traverse_obj,
update_url_query,
)
from ..utils.traversal import traverse_obj
import datetime
def is_dst(date):
last_march = datetime.datetime(date.year, 3, 31)
last_october = datetime.datetime(date.year, 10, 31)
last_sunday_march = last_march - datetime.timedelta(days=last_march.isoweekday() % 7)
last_sunday_october = last_october - datetime.timedelta(days=last_october.isoweekday() % 7)
return last_sunday_march.replace(hour=2) <= date <= last_sunday_october.replace(hour=3)
year = date.year
# last sunday of march and october, respectively. might break on switch days.
dst_start = datetime.datetime(year, 3, 31, 2) - datetime.timedelta(days=(datetime.datetime(year, 3, 31).weekday() + 1) % 7)
dst_end = datetime.datetime(year, 10, 31, 3) - datetime.timedelta(days=(datetime.datetime(year, 10, 31).weekday() + 1) % 7)
return dst_start <= date <= dst_end
def rfc3339_to_atende(date):
@ -140,7 +139,7 @@ class SejmIE(InfoExtractor):
video_id)
params = data['params']
title = strip_or_none(data.get('title'))
title = data['title'].strip()
if data.get('status') == 'VIDEO_ENDED':
live_status = 'was_live'
@ -187,7 +186,7 @@ class SejmIE(InfoExtractor):
'_type': 'url_transparent',
'ie_key': RedCDNLivxIE.ie_key(),
'id': stream_id,
'title': join_nonempty(title, stream_id, delim=' - '),
'title': f'{title} - {stream_id}',
})
cameras = self._search_json(