get password from cli in youku.py

This commit is contained in:
wwqgtxx 2017-07-16 23:53:11 +08:00 committed by GitHub
parent 56efb0ba96
commit 5104e04438

View File

@ -196,6 +196,8 @@ class Youku(VideoExtractor):
if data.get('error'):
if data['error']['code'] == -2002:
self.password_protected = True
self.password = kwargs.get("password", None)
if not self.password:
self.password = input(log.sprint('Password: ', log.YELLOW))
data = youku_ups(self.vid, password=self.password)['data']
if data.get('error'):