[mixcloud] Use a HEAD request when checking if the url is valid
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Tue, 26 Aug 2014 12:55:15 +0000 (14:55 +0200)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Tue, 26 Aug 2014 12:55:15 +0000 (14:55 +0200)
youtube_dl/extractor/mixcloud.py

index 5f64e7bd0d98b74aea2a4350a51f057b4d0280ba..520f27fca14a3ed819b452281ede6f4aa86fe4a5 100644 (file)
@@ -6,6 +6,7 @@ from .common import InfoExtractor
 from ..utils import (
     compat_urllib_parse,
     ExtractorError,
+    HEADRequest,
     int_or_none,
     parse_iso8601,
 )
@@ -38,7 +39,7 @@ class MixcloudIE(InfoExtractor):
             try:
                 # We only want to know if the request succeed
                 # don't download the whole file
-                self._request_webpage(url, None, False)
+                self._request_webpage(HEADRequest(url), None, False)
                 return url
             except ExtractorError:
                 url = None