X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fsexu.py;h=6365a8779d74e2ac9d82ce83c32c404d51e64b2e;hb=8f4a2124a914207912bf9fc37e593210e8dd423b;hp=7002643bc04bff1c4d8c204ff9b43d1bb8e7a224;hpb=bbd5f2de5ee970599b03796e029676ec03f510e4;p=youtube-dl diff --git a/youtube_dl/extractor/sexu.py b/youtube_dl/extractor/sexu.py index 7002643bc..6365a8779 100644 --- a/youtube_dl/extractor/sexu.py +++ b/youtube_dl/extractor/sexu.py @@ -13,7 +13,7 @@ class SexuIE(InfoExtractor): 'info_dict': { 'id': '961791', 'ext': 'mp4', - 'title': str, # NSFW + 'title': 'md5:4d05a19a5fc049a63dbbaf05fb71d91b', 'description': 'md5:c5ed8625eb386855d5a7967bd7b77a54', 'categories': list, # NSFW 'thumbnail': 're:https?://.*\.jpg$', @@ -22,13 +22,11 @@ class SexuIE(InfoExtractor): } def _real_extract(self, url): - mobj = re.match(self._VALID_URL, url) - video_id = mobj.group('id') - + video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) - quality_arr = self._search_regex(r'sources:\s*\[([^\]]+)\]', webpage, 'quality formats') - + quality_arr = self._search_regex( + r'sources:\s*\[([^\]]+)\]', webpage, 'forrmat string') formats = [{ 'url': fmt[0].replace('\\', ''), 'format_id': fmt[1], @@ -37,15 +35,17 @@ class SexuIE(InfoExtractor): self._sort_formats(formats) title = self._html_search_regex( - r'([^<]+)\s*-\s*Sexu.Com', webpage, 'title') + r'([^<]+)\s*-\s*Sexu\.Com', webpage, 'title') - description = self._html_search_meta('description', webpage, 'description') + description = self._html_search_meta( + 'description', webpage, 'description') thumbnail = self._html_search_regex( r'image:\s*"([^"]+)"', webpage, 'thumbnail', fatal=False) - categories_str = self._html_search_meta('keywords', webpage, 'categories', fatal=False) + categories_str = self._html_search_meta( + 'keywords', webpage, 'categories') categories = ( None if categories_str is None else categories_str.split(','))