From 9c138ade0c820797c197d34b3bf9bead65f42ed9 Mon Sep 17 00:00:00 2001 From: Parmjit Virk Date: Fri, 16 Mar 2018 20:22:29 -0500 Subject: [PATCH] [XVideos] Correctly set thumbnail image --- youtube_dl/extractor/xvideos.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/xvideos.py b/youtube_dl/extractor/xvideos.py index 085c8d4f3..bf3ff827e 100644 --- a/youtube_dl/extractor/xvideos.py +++ b/youtube_dl/extractor/xvideos.py @@ -39,6 +39,20 @@ class XVideosIE(InfoExtractor): }, { 'url': 'http://static-hw.xvideos.com/swf/xv-player.swf?id_video=4588838', 'only_matching': True, + }, { + 'url': 'https://www.xvideos.com/video299069/diesel_sfw_xxx_video', + 'md5': 'c0cec3673a7b74a0ed871945c03ab935', + 'info_dict': { + 'id': '299069', + 'ext': 'mp4', + 'title': 'DIESEL SFW XXX Video', + 'thumbnail': r're:https?://.*\.jpg', + 'duration': 80, + 'age_limit': 18, + }, + 'params': { + 'skip_download': True, + } }] def _real_extract(self, url): @@ -58,7 +72,7 @@ class XVideosIE(InfoExtractor): group='title') or self._og_search_title(webpage) thumbnail = self._search_regex( - r'url_bigthumb=(.+?)&', webpage, 'thumbnail', fatal=False) + r'html5player\.setThumbUrl\(\'(.+?)\'\);', webpage, 'thumbnail', fatal=False) duration = int_or_none(self._og_search_property( 'duration', webpage, default=None)) or parse_duration( self._search_regex(