From e94385eb95071192e942b30993f62641045ebce2 Mon Sep 17 00:00:00 2001 From: Erik Date: Tue, 19 Oct 2021 13:08:51 +0200 Subject: [PATCH] Hide input while entering password --- zspotify.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zspotify.py b/zspotify.py index 877c588d..cdd7d35d 100644 --- a/zspotify.py +++ b/zspotify.py @@ -17,6 +17,7 @@ from librespot.audio.decoders import AudioQuality, VorbisOnlyAudioQuality from librespot.core import Session from librespot.metadata import TrackId from pydub import AudioSegment +from getpass import getpass SESSION: Session = None @@ -73,7 +74,7 @@ def login(): pass while True: user_name = input("UserName: ") - password = input("Password: ") + password = getpass() try: SESSION = Session.Builder().user_pass(user_name, password).create() return