2 from __future__ import unicode_literals
6 from .common import InfoExtractor
7 from .brightcove import BrightcoveIE
8 from ..utils import ExtractorError
11 class EitbIE(InfoExtractor):
13 _VALID_URL = r'https?://www\.eitb\.tv/(eu/bideoa|es/video)/[^/]+/(?P<playlist_id>\d+)/(?P<chapter_id>\d+)'
16 'add_ie': ['Brightcove'],
17 'url': 'http://www.eitb.tv/es/video/60-minutos-60-minutos-2013-2014/2677100210001/2743577154001/lasa-y-zabala-30-anos/',
18 'md5': 'edf4436247185adee3ea18ce64c47998',
20 'id': '2743577154001',
22 'title': '60 minutos (Lasa y Zabala, 30 aƱos)',
23 # All videos from eitb has this description in the brightcove info
25 'uploader': 'Euskal Telebista',
29 def _real_extract(self, url):
30 mobj = re.match(self._VALID_URL, url)
31 chapter_id = mobj.group('chapter_id')
32 webpage = self._download_webpage(url, chapter_id)
33 bc_url = BrightcoveIE._extract_brightcove_url(webpage)
35 raise ExtractorError('Could not extract the Brightcove url')
36 # The BrightcoveExperience object doesn't contain the video id, we set
38 bc_url += '&%40videoPlayer={0}'.format(chapter_id)
39 return self.url_result(bc_url, BrightcoveIE.ie_key())