]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[XHamsterIE] Make hd video search more robust
authorrzhxeo <rzhxeot7z81b4700@mailcatch.com>
Wed, 26 Feb 2014 09:01:44 +0000 (10:01 +0100)
committerrzhxeo <rzhxeot7z81b4700@mailcatch.com>
Wed, 26 Feb 2014 09:01:44 +0000 (10:01 +0100)
youtube_dl/extractor/xhamster.py

index a75e1380d414568a4b8455ba7789da863bf24e87..5374495f9b08f4d13fd7552fd612c19339b99e54 100644 (file)
@@ -103,6 +103,7 @@ class XHamsterIE(InfoExtractor):
         }]
 
         if not hd:
+            mrss_url = self._search_regex(r'<link rel="canonical" href="([^"]+)', webpage, 'mrss_url')
             webpage = self._download_webpage(mrss_url + '?hd', video_id, note='Downloading HD webpage')
             if is_hd(webpage):
                 video_url = extract_video_url(webpage)