Merge branch 'akamai_pv' of https://github.com/remitamine/youtube-dl into remitamine...
[youtube-dl] / youtube_dl / extractor / vk.py
index 670a438afff624b5c9f09d0b79fb34fc4e237a7a..67220f1b7a991e48494adf24c791317e29eda8cd 100644 (file)
@@ -5,10 +5,7 @@ import re
 import json
 
 from .common import InfoExtractor
-from ..compat import (
-    compat_str,
-    compat_urllib_parse,
-)
+from ..compat import compat_str
 from ..utils import (
     ExtractorError,
     int_or_none,
@@ -17,6 +14,7 @@ from ..utils import (
     str_to_int,
     unescapeHTML,
     unified_strdate,
+    urlencode_postdata,
 )
 from .vimeo import VimeoIE
 from .pladform import PladformIE
@@ -142,10 +140,10 @@ class VKIE(InfoExtractor):
             'url': 'https://vk.com/video276849682_170681728',
             'info_dict': {
                 'id': 'V3K4mi0SYkc',
-                'ext': 'mp4',
+                'ext': 'webm',
                 'title': "DSWD Awards 'Children's Joy Foundation, Inc.' Certificate of Registration and License to Operate",
                 'description': 'md5:bf9c26cfa4acdfb146362682edd3827a',
-                'duration': 179,
+                'duration': 178,
                 'upload_date': '20130116',
                 'uploader': "Children's Joy Foundation",
                 'uploader_id': 'thecjf',
@@ -204,7 +202,7 @@ class VKIE(InfoExtractor):
 
         request = sanitized_Request(
             'https://login.vk.com/?act=login',
-            compat_urllib_parse.urlencode(login_form).encode('utf-8'))
+            urlencode_postdata(login_form))
         login_page = self._download_webpage(
             request, None, note='Logging in as %s' % username)