1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-14 02:57:47 +01:00

Sportbox extractor fix.

This commit is contained in:
Vitaliy Syrchikov 2015-05-15 16:52:11 +04:00
parent c4fc559f45
commit a7b8467ac0

View File

@ -11,7 +11,7 @@ from ..utils import (
class SportBoxIE(InfoExtractor): class SportBoxIE(InfoExtractor):
_VALID_URL = r'https?://news\.sportbox\.ru/Vidy_sporta/(?:[^/]+/)+spbvideo_NI\d+_(?P<display_id>.+)' _VALID_URL = r'https?://news\.sportbox\.ru/(?:[^/]+/)+spbvideo_NI\d+_(?P<display_id>.+)'
_TESTS = [ _TESTS = [
{ {
'url': 'http://news.sportbox.ru/Vidy_sporta/Avtosport/Rossijskij/spbvideo_NI483529_Gonka-2-zaezd-Obyedinenniy-2000-klassi-Turing-i-S', 'url': 'http://news.sportbox.ru/Vidy_sporta/Avtosport/Rossijskij/spbvideo_NI483529_Gonka-2-zaezd-Obyedinenniy-2000-klassi-Turing-i-S',
@ -50,7 +50,7 @@ class SportBoxIE(InfoExtractor):
display_id, 'Downloading player webpage') display_id, 'Downloading player webpage')
hls = self._search_regex( hls = self._search_regex(
r"var\s+original_hls_file\s*=\s*'([^']+)'", player, 'hls file') r"sportboxPlayer\.jwplayer_common_params\.file\s*=\s*['\"]+([^\"]+)['\"]+", player, 'hls file')
formats = self._extract_m3u8_formats(hls, display_id, 'mp4') formats = self._extract_m3u8_formats(hls, display_id, 'mp4')