X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=inline;f=youtube_dl%2Fextractor%2Fbeeg.py;h=314e37f8bea9d44bc5ffe1545b17d02cc7d13fe2;hb=baa708036c64e2dce419b5f0648ee6b84ce2132e;hp=d7301fe18ccf7f2324e3cb233ac93102ed076ba6;hpb=94388f50b39e750f81e9baeb9fea0354f209d4e9;p=youtube-dl diff --git a/youtube_dl/extractor/beeg.py b/youtube_dl/extractor/beeg.py index d7301fe18..314e37f8b 100644 --- a/youtube_dl/extractor/beeg.py +++ b/youtube_dl/extractor/beeg.py @@ -27,8 +27,16 @@ class BeegIE(InfoExtractor): webpage = self._download_webpage(url, video_id) - video_url = self._html_search_regex( - r"'480p'\s*:\s*'([^']+)'", webpage, 'video URL') + quality_arr = self._search_regex( + r'(?s)var\s+qualityArr\s*=\s*{\s*(.+?)\s*}', webpage, 'quality formats') + + formats = [{ + 'url': fmt[1], + 'format_id': fmt[0], + 'height': int(fmt[0][:-1]), + } for fmt in re.findall(r"'([^']+)'\s*:\s*'([^']+)'", quality_arr)] + + self._sort_formats(formats) title = self._html_search_regex( r'