- og_title = self._og_search_title(webpage)
- title = og_title.replace(' - Video bei GameStar.de', '').strip()
-
- url = 'http://gamestar.de/_misc/videos/portal/getVideoUrl.cfm?premium=0&videoId=' + video_id
-
- description = self._og_search_description(webpage).strip()
-
- thumbnail = self._proto_relative_url(
- self._og_search_thumbnail(webpage), scheme='http:')
-
- upload_date = unified_strdate(self._html_search_regex(
- r'<span style="float:left;font-size:11px;">Datum: ([0-9]+\.[0-9]+\.[0-9]+) ',
- webpage, 'upload_date', fatal=False))
-
- duration = parse_duration(self._html_search_regex(
- r' Länge: ([0-9]+:[0-9]+)</span>', webpage, 'duration',
- fatal=False))
-
- view_count = str_to_int(self._html_search_regex(
- r' Zuschauer: ([0-9\.]+) ', webpage,
- 'view_count', fatal=False))
+ # TODO: there are multiple ld+json objects in the webpage,
+ # while _search_json_ld finds only the first one
+ json_ld = self._parse_json(self._search_regex(
+ r'(?s)<script[^>]+type=(["\'])application/ld\+json\1[^>]*>(?P<json_ld>[^<]+VideoObject[^<]+)</script>',
+ webpage, 'JSON-LD', group='json_ld'), video_id)
+ info_dict = self._json_ld(json_ld, video_id)
+ info_dict['title'] = remove_end(
+ info_dict['title'], ' - Game%s' % site.title())