Hide input while entering password

This commit is contained in:
Erik 2021-10-19 13:08:51 +02:00
parent f03014d180
commit e94385eb95

View File

@ -17,6 +17,7 @@ from librespot.audio.decoders import AudioQuality, VorbisOnlyAudioQuality
from librespot.core import Session from librespot.core import Session
from librespot.metadata import TrackId from librespot.metadata import TrackId
from pydub import AudioSegment from pydub import AudioSegment
from getpass import getpass
SESSION: Session = None SESSION: Session = None
@ -73,7 +74,7 @@ def login():
pass pass
while True: while True:
user_name = input("UserName: ") user_name = input("UserName: ")
password = input("Password: ") password = getpass()
try: try:
SESSION = Session.Builder().user_pass(user_name, password).create() SESSION = Session.Builder().user_pass(user_name, password).create()
return return