mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-07 08:40:28 +08:00
[la7] fix extractor
This commit is contained in:
parent
3b65a6fbf3
commit
681072504c
@ -4,7 +4,6 @@ from __future__ import unicode_literals
|
|||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
js_to_json,
|
js_to_json,
|
||||||
smuggle_url,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -49,14 +48,20 @@ class LA7IE(InfoExtractor):
|
|||||||
webpage = self._download_webpage(url, video_id)
|
webpage = self._download_webpage(url, video_id)
|
||||||
|
|
||||||
player_data = self._parse_json(
|
player_data = self._parse_json(
|
||||||
self._search_regex(r'videoLa7\(({[^;]+})\);', webpage, 'player data'),
|
self._search_regex(
|
||||||
|
[r'(?s)videoParams\s*=\s*({.+?});', r'videoLa7\(({[^;]+})\);'],
|
||||||
|
webpage, 'player data'),
|
||||||
video_id, transform_source=js_to_json)
|
video_id, transform_source=js_to_json)
|
||||||
|
|
||||||
|
url = player_data['src']['m3u8']
|
||||||
|
url = url.replace('http://la7-vh.akamaihd.net/i/',
|
||||||
|
'https://vodpkg.iltrovatore.it/local/dash/')
|
||||||
|
url = url.replace('csmil/master.m3u8', 'urlset/manifest.mpd')
|
||||||
|
|
||||||
|
formats = self._extract_mpd_formats(url, video_id)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'_type': 'url_transparent',
|
'formats': formats,
|
||||||
'url': smuggle_url('kaltura:103:%s' % player_data['vid'], {
|
|
||||||
'service_url': 'http://kdam.iltrovatore.it',
|
|
||||||
}),
|
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'title': player_data['title'],
|
'title': player_data['title'],
|
||||||
'description': self._og_search_description(webpage, default=None),
|
'description': self._og_search_description(webpage, default=None),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user