From: Sergey M․ Date: Sun, 28 May 2017 00:55:56 +0000 (+0700) Subject: [xhamster] Simplify (closes #13216) X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=a846173d9304c958bd7bedb89fe767490c885ae1;p=youtube-dl [xhamster] Simplify (closes #13216) --- diff --git a/youtube_dl/extractor/xhamster.py b/youtube_dl/extractor/xhamster.py index ae0c167c4..6987b2e3a 100644 --- a/youtube_dl/extractor/xhamster.py +++ b/youtube_dl/extractor/xhamster.py @@ -108,7 +108,7 @@ class XHamsterIE(InfoExtractor): webpage, 'upload date', fatal=False)) uploader = self._html_search_regex( - r']+?itemprop=["\']author[^>]+?>]+?href=["\'][^>]+?>]+?itemprop=["\']name[^>]+?>(.+?)]+itemprop=["\']author[^>]+>]+>]+>([^<]+)', webpage, 'uploader', default='anonymous') thumbnail = self._search_regex( @@ -124,7 +124,7 @@ class XHamsterIE(InfoExtractor): r'content=["\']User(?:View|Play)s:(\d+)', webpage, 'view count', fatal=False)) - mobj = re.search(r'hint=[\'"](?P\d+) Likes / (?P\d+) Dislikes[\'"]', webpage) + mobj = re.search(r'hint=[\'"](?P\d+) Likes / (?P\d+) Dislikes', webpage) (like_count, dislike_count) = (mobj.group('likecount'), mobj.group('dislikecount')) if mobj else (None, None) mobj = re.search(r'Comments \((?P\d+)\)', webpage)