1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-08-15 00:48:28 +00:00

Fixed the 'type' variable, which argues with the built-in python function

This commit is contained in:
Nikolay Fedorov 2025-08-01 22:38:27 +03:00 committed by GitHub
parent 70a45aa336
commit ed04965569
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -60,14 +60,14 @@ class SmotrimIE(InfoExtractor):
] ]
def _real_extract(self, url): def _real_extract(self, url):
video_id, type = self._match_valid_url(url).group('id', 'type') video_id, typ = self._match_valid_url(url).group('id', 'type')
webpage = self._download_webpage(url, video_id, f'Resolving {type} link') webpage = self._download_webpage(url, video_id, f'Resolving {typ} link')
iframe_url = self._search_regex( iframe_url = self._search_regex(
r'<iframe\b[^>]+\bsrc=["\'](https?://player\.smotrim\.ru/iframe/[^"\']+)', r'<iframe\b[^>]+\bsrc=["\'](https?://player\.smotrim\.ru/iframe/[^"\']+)',
webpage, webpage,
'iframe URL', 'iframe URL',
) )
if type in {'live', 'channel'}: if typ in {'live', 'channel'}:
# iframe_url = 'https://player.smotrim.ru/iframe/live/uid/381308c7-a066-4c4f-9656-83e2e792a7b4/showZoomBtn/false/isPlay/true/mute/true/sid/smotrim_rk/' # iframe_url = 'https://player.smotrim.ru/iframe/live/uid/381308c7-a066-4c4f-9656-83e2e792a7b4/showZoomBtn/false/isPlay/true/mute/true/sid/smotrim_rk/'
video_id = re.search( video_id = re.search(
r'(?P<video_id>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})', r'(?P<video_id>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})',