2 from __future__ import unicode_literals
4 from .common import InfoExtractor
11 class LA7IE(InfoExtractor):
13 _VALID_URL = r'''(?x)(https?://)?(?:
14 (?:www\.)?la7\.it/([^/]+)/(?:rivedila7|video)/|
15 tg\.la7\.it/repliche-tgla7\?id=
19 # 'src' is a plain URL
20 'url': 'http://www.la7.it/crozza/video/inccool8-02-10-2015-163722',
21 'md5': '8b613ffc0c4bf9b9e377169fc19c214c',
26 'description': 'Benvenuti nell\'incredibile mondo della INC. COOL. 8. dove “INC.” sta per “Incorporated” “COOL” sta per “fashion” ed Eight sta per il gesto atletico',
27 'thumbnail': 're:^https?://.*',
28 'uploader_id': 'kdla7pillole@iltrovatore.it',
29 'timestamp': 1443814869,
30 'upload_date': '20151002',
33 # 'src' is a dictionary
34 'url': 'http://tg.la7.it/repliche-tgla7?id=189080',
35 'md5': '6b0d8888d286e39870208dfeceaf456b',
42 'url': 'http://www.la7.it/omnibus/rivedila7/omnibus-news-02-07-2016-189077',
43 'only_matching': True,
46 def _real_extract(self, url):
47 video_id = self._match_id(url)
49 webpage = self._download_webpage(url, video_id)
51 player_data = self._parse_json(
53 [r'(?s)videoParams\s*=\s*({.+?});', r'videoLa7\(({[^;]+})\);'],
54 webpage, 'player data'),
55 video_id, transform_source=js_to_json)
58 '_type': 'url_transparent',
59 'url': smuggle_url('kaltura:103:%s' % player_data['vid'], {
60 'service_url': 'http://nkdam.iltrovatore.it',
63 'title': player_data['title'],
64 'description': self._og_search_description(webpage, default=None),
65 'thumbnail': player_data.get('poster'),