Sort import

pull/12769/head
Ben Faerber 1 month ago
parent 5f632986db
commit 188ca4b629
No known key found for this signature in database
GPG Key ID: 6D33349087BCDC6E

@ -2,11 +2,11 @@ import datetime
from yt_dlp.utils._utils import UserNotLive from yt_dlp.utils._utils import UserNotLive
from .common import InfoExtractor
from ..utils import ( from ..utils import (
int_or_none, int_or_none,
traverse_obj, traverse_obj,
) )
from .common import InfoExtractor
class PartiBaseIE(InfoExtractor): class PartiBaseIE(InfoExtractor):
@ -52,7 +52,7 @@ class PartiVideoIE(PartiBaseIE):
'url': ('livestream_recording', {str}), 'url': ('livestream_recording', {str}),
'title': ('event_title', {str}), 'title': ('event_title', {str}),
'upload_date': ('event_start_ts', {lambda ts: datetime.date.fromtimestamp(ts).strftime('%Y%m%d')}), 'upload_date': ('event_start_ts', {lambda ts: datetime.date.fromtimestamp(ts).strftime('%Y%m%d')}),
}) })
def _real_extract(self, url): def _real_extract(self, url):
video_id = self._match_id(url) video_id = self._match_id(url)
@ -108,7 +108,7 @@ class PartiLivestreamIE(PartiBaseIE):
'auth_token': ('channel_info', 'channel', 'playback_auth_token', {str}), 'auth_token': ('channel_info', 'channel', 'playback_auth_token', {str}),
'viewer_count': ('channel_info', 'stream', 'viewer_count', {int_or_none}), 'viewer_count': ('channel_info', 'stream', 'viewer_count', {int_or_none}),
'is_live': ('channel_info', 'stream', {lambda x: x is not None}), 'is_live': ('channel_info', 'stream', {lambda x: x is not None}),
}) })
base_url = extracted['base_url'] base_url = extracted['base_url']
auth_token = extracted['auth_token'] auth_token = extracted['auth_token']

Loading…
Cancel
Save