1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-26 10:24:33 +01:00

Make proxy PRIVATE in verbose

This commit is contained in:
bato3 2018-07-27 14:52:48 +02:00
parent 0c7b4f49eb
commit be477061e8
2 changed files with 5 additions and 2 deletions

View File

@ -2273,7 +2273,10 @@ class YoutubeDL(object):
for handler in self._opener.handlers:
if hasattr(handler, 'proxies'):
proxy_map.update(handler.proxies)
self._write_string('[debug] Proxy map: ' + compat_str(proxy_map) + '\n')
self._write_string('[debug] Proxy map: ' + re.sub(
r'(https?://)(?:(?:[^:/\'"@]+:)?[^@]+)(@)',
r'\1PRIVATE\2',
compat_str(proxy_map)) + '\n')
if self.params.get('call_home', False):
ipaddr = self.urlopen('https://yt-dl.org/ip').read().decode('utf-8')

View File

@ -21,7 +21,7 @@ from .version import __version__
def _hide_login_info(opts):
PRIVATE_OPTS = set(['-p', '--password', '-u', '--username', '--video-password', '--ap-password', '--ap-username'])
PRIVATE_OPTS = set(['-p', '--password', '-u', '--username', '--video-password', '--ap-password', '--ap-username', '--proxy'])
eqre = re.compile('^(?P<key>' + ('|'.join(re.escape(po) for po in PRIVATE_OPTS)) + ')=.+$')
def _scrub_eq(o):