From: fiocfun Date: Sat, 27 May 2017 10:28:08 +0000 (+0300) Subject: [xhamster] Fix author and like/dislike count extraction X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=78e210dea554144c8c1890c617808b0acdab9bfc;p=youtube-dl.git [xhamster] Fix author and like/dislike count extraction --- diff --git a/youtube_dl/extractor/xhamster.py b/youtube_dl/extractor/xhamster.py index 7cf0629e7..ae0c167c4 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=["\'].+?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)