mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-29 21:52:54 +00:00
Sportbox source fix. HD videos support.
This commit is contained in:
parent
a7b8467ac0
commit
ae670a6ed8
1 changed files with 8 additions and 4 deletions
|
@ -42,11 +42,15 @@ class SportBoxIE(InfoExtractor):
|
||||||
|
|
||||||
webpage = self._download_webpage(url, display_id)
|
webpage = self._download_webpage(url, display_id)
|
||||||
|
|
||||||
video_id = self._search_regex(
|
sobj = re.search(r'src="/vdl/player/(?P<media_type>\w+)/(?P<video_id>\d+)"', webpage)
|
||||||
r'src="/vdl/player/media/(\d+)"', webpage, 'video id')
|
if (sobj):
|
||||||
|
video_id = sobj.group('video_id')
|
||||||
|
media_type = sobj.group('media_type')
|
||||||
|
else:
|
||||||
|
raise RegexNotFoundError('Unable to extract video_id')
|
||||||
|
|
||||||
player = self._download_webpage(
|
player = self._download_webpage(
|
||||||
'http://news.sportbox.ru/vdl/player/media/%s' % video_id,
|
'http://news.sportbox.ru/vdl/player/%s/%s' % (media_type, video_id),
|
||||||
display_id, 'Downloading player webpage')
|
display_id, 'Downloading player webpage')
|
||||||
|
|
||||||
hls = self._search_regex(
|
hls = self._search_regex(
|
||||||
|
|
Loading…
Reference in a new issue