- playlist_title = self._html_search_regex(
- r'<h2 class="pageheader">(.*?)</h2>', webpage, 'game title')
-
- mweb = re.finditer(r'''(?x)
- 'movie_(?P<videoID>[0-9]+)':\s*\{\s*
- FILENAME:\s*"(?P<videoURL>[\w:/\.\?=]+)"
- (,\s*MOVIE_NAME:\s*\"(?P<videoName>[\w:/\.\?=\+-]+)\")?\s*\},
- ''', webpage)
- titles = re.finditer(
- r'<span class="title">(?P<videoName>.+?)</span>', webpage)
- thumbs = re.finditer(
- r'<img class="movie_thumb" src="(?P<thumbnail>.+?)">', webpage)
- videos = []
-
- for vid, vtitle, thumb in zip(mweb, titles, thumbs):
- video_id = vid.group('videoID')
- title = vtitle.group('videoName')
- video_url = vid.group('videoURL')
- video_thumb = thumb.group('thumbnail')
- if not video_url:
- raise ExtractorError('Cannot find video url for %s' % video_id)
- videos.append({
+ playlist_title = get_element_by_class('apphub_AppName', webpage)
+ for movie_id, movie in flash_vars.items():
+ if not movie:
+ continue
+ video_id = self._search_regex(r'movie_(\d+)', movie_id, 'video id', fatal=False)
+ title = movie.get('MOVIE_NAME')
+ if not title or not video_id:
+ continue
+ entry = {