mirror of https://github.com/yt-dlp/yt-dlp.git
Merge branch 'iamleot-la7-fix'
This commit is contained in:
commit
071e87a33d
|
@ -3,7 +3,6 @@ from __future__ import unicode_literals
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
js_to_json,
|
|
||||||
smuggle_url,
|
smuggle_url,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -29,15 +28,6 @@ class LA7IE(InfoExtractor):
|
||||||
'timestamp': 1443814869,
|
'timestamp': 1443814869,
|
||||||
'upload_date': '20151002',
|
'upload_date': '20151002',
|
||||||
},
|
},
|
||||||
}, {
|
|
||||||
# 'src' is a dictionary
|
|
||||||
'url': 'http://tg.la7.it/repliche-tgla7?id=189080',
|
|
||||||
'md5': '6b0d8888d286e39870208dfeceaf456b',
|
|
||||||
'info_dict': {
|
|
||||||
'id': '189080',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': 'TG LA7',
|
|
||||||
},
|
|
||||||
}, {
|
}, {
|
||||||
'url': 'http://www.la7.it/omnibus/rivedila7/omnibus-news-02-07-2016-189077',
|
'url': 'http://www.la7.it/omnibus/rivedila7/omnibus-news-02-07-2016-189077',
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
|
@ -48,20 +38,19 @@ 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._search_regex(
|
||||||
self._search_regex(
|
|
||||||
[r'(?s)videoParams\s*=\s*({.+?});', r'videoLa7\(({[^;]+})\);'],
|
[r'(?s)videoParams\s*=\s*({.+?});', r'videoLa7\(({[^;]+})\);'],
|
||||||
webpage, 'player data'),
|
webpage, 'player data')
|
||||||
video_id, transform_source=js_to_json)
|
vid = self._search_regex(r'vid\s*:\s*"(.+?)",', player_data, 'vid')
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'_type': 'url_transparent',
|
'_type': 'url_transparent',
|
||||||
'url': smuggle_url('kaltura:103:%s' % player_data['vid'], {
|
'url': smuggle_url('kaltura:103:%s' % vid, {
|
||||||
'service_url': 'http://nkdam.iltrovatore.it',
|
'service_url': 'http://nkdam.iltrovatore.it',
|
||||||
}),
|
}),
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'title': player_data['title'],
|
'title': self._og_search_title(webpage, default=None),
|
||||||
'description': self._og_search_description(webpage, default=None),
|
'description': self._og_search_description(webpage, default=None),
|
||||||
'thumbnail': player_data.get('poster'),
|
'thumbnail': self._og_search_thumbnail(webpage, default=None),
|
||||||
'ie_key': 'Kaltura',
|
'ie_key': 'Kaltura',
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue