projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
201ea3e
)
[extractor/common] Interactive TFA code input
author
Sergey M․
<dstftw@gmail.com>
Sat, 15 Aug 2015 15:55:07 +0000
(21:55 +0600)
committer
Sergey M․
<dstftw@gmail.com>
Sat, 15 Aug 2015 15:55:07 +0000
(21:55 +0600)
youtube_dl/extractor/common.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/common.py
b/youtube_dl/extractor/common.py
index e2ace827fdffac56099e4faa87e25031c6f2b361..65835d257197361a7ea3e5159b37de6f03ec62ad 100644
(file)
--- a/
youtube_dl/extractor/common.py
+++ b/
youtube_dl/extractor/common.py
@@
-15,6
+15,7
@@
import xml.etree.ElementTree
from ..compat import (
compat_cookiejar,
compat_cookies,
from ..compat import (
compat_cookiejar,
compat_cookies,
+ compat_getpass,
compat_HTTPError,
compat_http_client,
compat_urllib_error,
compat_HTTPError,
compat_http_client,
compat_urllib_error,
@@
-610,7
+611,7
@@
class InfoExtractor(object):
return (username, password)
return (username, password)
- def _get_tfa_info(self):
+ def _get_tfa_info(self
, note='two-factor verification code'
):
"""
Get the two-factor authentication info
TODO - asking the user will be required for sms/phone verify
"""
Get the two-factor authentication info
TODO - asking the user will be required for sms/phone verify
@@
-624,7
+625,7
@@
class InfoExtractor(object):
if downloader_params.get('twofactor', None) is not None:
return downloader_params['twofactor']
if downloader_params.get('twofactor', None) is not None:
return downloader_params['twofactor']
- return
None
+ return
compat_getpass('Type %s and press [Return]: ' % note)
# Helper functions for extracting OpenGraph info
@staticmethod
# Helper functions for extracting OpenGraph info
@staticmethod