- 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()
-
- og_thumbnail = self._og_search_thumbnail(webpage)
- thumbnail = 'http:' + og_thumbnail
-
- upload_date_raw = self._html_search_regex(
- r'<span style="float:left;font-size:11px;">Datum: ([0-9]+\.[0-9]+\.[0-9]+) ',
- webpage, 'upload_date').split('.')
- upload_date = upload_date_raw[2] + upload_date_raw[1] + upload_date_raw[0]
+ # 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())