X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=youtube_dl%2Fextractor%2Fbeeg.py;h=4e79fea8f0346d8aca19bc0182fd087a78779809;hb=367cc95aa76731aa951e949b325ac9c909af639d;hp=c2692cfdcc0d7d6a94620a290fb4e7f365953891;hpb=7d48c06f27fba7287c6c548e930f90f3aebac07a;p=youtube-dl.git diff --git a/youtube_dl/extractor/beeg.py b/youtube_dl/extractor/beeg.py index c2692cfdc..4e79fea8f 100644 --- a/youtube_dl/extractor/beeg.py +++ b/youtube_dl/extractor/beeg.py @@ -17,6 +17,7 @@ class BeegIE(InfoExtractor): 'description': 'md5:6db3c6177972822aaba18652ff59c773', 'categories': list, # NSFW 'thumbnail': 're:https?://.*\.jpg$', + 'age_limit': 18, } } @@ -26,12 +27,20 @@ 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'