- title = self._html_search_meta('fulltitle', webpage, default=None)
- if not title or title == "c't":
- title = self._search_regex(
- r'<div[^>]+class="videoplayerjw"[^>]+data-title="([^"]+)"',
- webpage, 'title')
+ def extract_title(default=NO_DEFAULT):
+ title = self._html_search_meta(
+ ('fulltitle', 'title'), webpage, default=None)
+ if not title or title == "c't":
+ title = self._search_regex(
+ r'<div[^>]+class="videoplayerjw"[^>]+data-title="([^"]+)"',
+ webpage, 'title', default=None)
+ if not title:
+ title = self._html_search_regex(
+ r'<h1[^>]+\bclass=["\']article_page_title[^>]+>(.+?)<',
+ webpage, 'title', default=default)
+ return title
+
+ title = extract_title(default=None)
+ description = self._og_search_description(
+ webpage, default=None) or self._html_search_meta(
+ 'description', webpage)
+
+ def _make_kaltura_result(kaltura_url):
+ return {
+ '_type': 'url_transparent',
+ 'url': smuggle_url(kaltura_url, {'source_url': url}),
+ 'ie_key': KalturaIE.ie_key(),
+ 'title': title,
+ 'description': description,
+ }
+
+ kaltura_url = KalturaIE._extract_url(webpage)
+ if kaltura_url:
+ return _make_kaltura_result(kaltura_url)
+
+ kaltura_id = self._search_regex(
+ r'entry-id=(["\'])(?P<id>(?:(?!\1).)+)\1', webpage, 'kaltura id',
+ default=None, group='id')
+ if kaltura_id:
+ return _make_kaltura_result('kaltura:2238431:%s' % kaltura_id)