- ora_meta = self._parse_json(self._search_regex(
- r'(?s);\s*ora_meta = ({.*?});</script>', webpage, 'ora_meta'), display_id,
- transform_source=lambda data: js_to_json(re.sub('":(document|\().*?(:false|\(\)),', '":null,', data)))
-
- video_data = ora_meta.get('video', ora_meta.get('current'))
- m3u8_url = video_data['hls_stream']
-
+ video_data = self._search_regex(
+ r'"(?:video|current)"\s*:\s*({[^}]+?})', webpage, 'current video')
+ m3u8_url = self._search_regex(
+ r'hls_stream"?\s*:\s*"([^"]+)', video_data, 'm3u8 url', None)