]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[xhamsterembed] Fix extraction (closes #14308)
authorSergey M․ <dstftw@gmail.com>
Sun, 24 Sep 2017 12:23:08 +0000 (19:23 +0700)
committerSergey M․ <dstftw@gmail.com>
Sun, 24 Sep 2017 12:23:08 +0000 (19:23 +0700)
youtube_dl/extractor/xhamster.py

index c42b59e51f31a02c8508217c1246d5f0a8c4ca9d..be3624ef2ea889835992e55949271c0028e9783b 100644 (file)
@@ -221,7 +221,7 @@ class XHamsterEmbedIE(InfoExtractor):
         webpage = self._download_webpage(url, video_id)
 
         video_url = self._search_regex(
-            r'href="(https?://xhamster\.com/movies/%s/[^"]*\.html[^"]*)"' % video_id,
+            r'href="(https?://xhamster\.com/(?:movies/{0}/[^"]*\.html|videos/[^/]*-{0})[^"]*)"'.format(video_id),
             webpage, 'xhamster url', default=None)
 
         if not video_url: