- info_page = self._download_webpage(
- 'http://player.cnevids.com/player/video.js',
- video_id, 'Downloading video info', query=query, fatal=False)
- if info_page:
- video_info = self._parse_json(self._search_regex(
- r'loadCallback\(({.+})\)', info_page, 'video info'), video_id)['video']
+ if params.get('playerId'):
+ info_page = self._download_json(
+ 'http://player.cnevids.com/player/video.js',
+ video_id, 'Downloading video info', fatal=False, query=params)
+ if info_page:
+ video_info = info_page.get('video')
+ if not video_info:
+ info_page = self._download_webpage(
+ 'http://player.cnevids.com/player/loader.js',
+ video_id, 'Downloading loader info', query=params)