- segs_json = self._search_regex(r'segs: \'(.*)\'', webpage, 'segments')
- segments = json.loads(segs_json)
+ player_url = self._search_regex(
+ r'playerUrl\s*:\s*[\'"]([^\'"]+\.swf)[\'"]',
+ webpage, 'player URL', default=self._PLAYER_URL)
+
+ segments = self._parse_json(self._search_regex(
+ r'segs: \'([^\']+)\'', webpage, 'segments'), video_id)