From 036decdc886d6c8c30a26b30c602cc9c3dae480c Mon Sep 17 00:00:00 2001 From: fiocfun Date: Sat, 27 May 2017 13:28:08 +0300 Subject: [PATCH] [xhamster] fix author and like count regexps --- youtube_dl/extractor/xhamster.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/xhamster.py b/youtube_dl/extractor/xhamster.py index 7b6703714..2faa8ffa5 100644 --- a/youtube_dl/extractor/xhamster.py +++ b/youtube_dl/extractor/xhamster.py @@ -104,7 +104,7 @@ class XHamsterIE(InfoExtractor): webpage, 'upload date', fatal=False)) uploader = self._html_search_regex( - r']+itemprop=["\']author[^>]+>]+href=["\'].+?xhamster\.com/user/[^>]+>(?P.+?)', + r']+?itemprop=["\']author[^>]+?>]+?href=["\'][^>]+?>]+?itemprop=["\']name[^>]+?>(.+?)\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)