[safari] Use postdata_urlencode (#7465)
authorYen Chi Hsuan <yan12125@gmail.com>
Fri, 11 Dec 2015 15:59:25 +0000 (23:59 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Sat, 12 Dec 2015 06:28:05 +0000 (14:28 +0800)
youtube_dl/extractor/safari.py

index 91970426103c0384a4998407443907182d7976b5..7de7b7273523ea8a43a6d22e8ab684afb4fc5875 100644 (file)
@@ -6,12 +6,12 @@ import re
 from .common import InfoExtractor
 from .brightcove import BrightcoveLegacyIE
 
-from ..compat import compat_urllib_parse
 from ..utils import (
     ExtractorError,
     sanitized_Request,
     smuggle_url,
     std_headers,
+    urlencode_postdata,
 )
 
 
@@ -57,7 +57,7 @@ class SafariBaseIE(InfoExtractor):
         }
 
         request = sanitized_Request(
-            self._LOGIN_URL, compat_urllib_parse.urlencode(login_form), headers=headers)
+            self._LOGIN_URL, urlencode_postdata(login_form), headers=headers)
         login_page = self._download_webpage(
             request, None, 'Logging in as %s' % username)