- title = self._search_regex(
- r'(?<=\"name\": ")(?P<title>.*?)(?=\"\,)', webpage, r'Filename')
- duration = int(self._search_regex(
- r'(?<=\"duration\"\: )(?P<duration>.*?)(?=,)', webpage, r'Duration'))
- formats_raw = self._search_regex(
- r'(?<=\"mp4\":)(.*?)(}])', webpage, r'formats') + '}]'
- formats_json = json.loads(formats_raw)
- formats = []
- for f in formats_json:
- formats.append(
- {'url': f['src'], r'ext': r'mp4', 'tbr': int(f['bitrate'][:-1])})
+
+ info = self._parse_json(self._search_regex(
+ r'(?s)<script type="application/ld\+json">(.*?)</script>',
+ webpage, 'video info'), video_id)