-# 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')
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(
}],
'params': {
'skip_download': True,
- 'usenetrc': True,
},
'skip': 'Requires vk account credentials',
}, {
'title': 'Сергей Горбунов - Wall post 85155021_6319',
},
'playlist_count': 1,
- 'params': {
- 'usenetrc': True,
- },
'skip': 'Requires vk account credentials',
}, {
# wall page URL
'artist': performer,
'track': title,
'ext': 'mp4',
- 'protocol': 'm3u8',
+ 'protocol': 'm3u8_native',
})
for video in re.finditer(