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