X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fsexu.py;h=6365a8779d74e2ac9d82ce83c32c404d51e64b2e;hb=4fcaa4f4a5ef328009bef53ebc491ebe76452550;hp=f45d170898870a1869537e7fe201dd886d7b467a;hpb=d91d12408165a045909c8c63a19dd9dc43d72d7f;p=youtube-dl diff --git a/youtube_dl/extractor/sexu.py b/youtube_dl/extractor/sexu.py index f45d17089..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': 'md5:033cf4a71907aac2758e82f55894a129', + '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(','))