- return {
- 'id': video_id,
- 'url': video_url,
- 'title': title,
- 'description': description,
- 'timestamp': timestamp,
- }
+ for num, url_ in enumerate(URLS, 1):
+ webpage = self._download_webpage(
+ url_, video_id, fatal=num == len(URLS))
+
+ default = NO_DEFAULT if num == len(URLS) else None
+
+ partner_id = self._search_regex(
+ r"var\s+partnerId\s*=\s*'([^']+)", webpage, 'partner id',
+ default=default)
+
+ kaltura_id = self._search_regex(
+ [r'id="kaltura_player_([^"]+)"',
+ r"_wb_entry_id\s*:\s*'([^']+)",
+ r'data-kaltura-entry-id="([^"]+)'],
+ webpage, 'kaltura id', default=default)
+
+ if partner_id and kaltura_id:
+ break
+
+ return self.url_result('kaltura:%s:%s' % (partner_id, kaltura_id), 'Kaltura')