]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/vk.py
[cleanup] Misc cleanup
[yt-dlp.git] / yt_dlp / extractor / vk.py
index fab16780fb1b811311fbee6bb546e450d31ba00c..3b105e6c02cc091eaafc405891208f52b11baca2 100644 (file)
@@ -1,6 +1,3 @@
-# coding: utf-8
-from __future__ import unicode_literals
-
 import collections
 import re
 
 class VKBaseIE(InfoExtractor):
     _NETRC_MACHINE = 'vk'
 
-    def _login(self):
-        username, password = self._get_login_info()
-        if username is None:
-            return
-
+    def _perform_login(self, username, password):
         login_page, url_handle = self._download_webpage_handle(
             'https://vk.com', None, 'Downloading login page')
 
@@ -57,9 +50,6 @@ def _login(self):
             raise ExtractorError(
                 'Unable to login, incorrect username and/or password', expected=True)
 
-    def _real_initialize(self):
-        self._login()
-
     def _download_payload(self, path, video_id, data, fatal=True):
         data['al'] = 1
         code, payload = self._download_json(
@@ -600,7 +590,6 @@ class VKWallPostIE(VKBaseIE):
         }],
         'params': {
             'skip_download': True,
-            'usenetrc': True,
         },
         'skip': 'Requires vk account credentials',
     }, {
@@ -611,9 +600,6 @@ class VKWallPostIE(VKBaseIE):
             'title': 'Сергей Горбунов - Wall post 85155021_6319',
         },
         'playlist_count': 1,
-        'params': {
-            'usenetrc': True,
-        },
         'skip': 'Requires vk account credentials',
     }, {
         # wall page URL
@@ -688,7 +674,7 @@ def _real_extract(self, url):
                 'artist': performer,
                 'track': title,
                 'ext': 'mp4',
-                'protocol': 'm3u8',
+                'protocol': 'm3u8_native',
             })
 
         for video in re.finditer(