diff options
author | niliara-edu <nil.jimeno@estudiant.fjaverianas.com> | 2024-09-27 14:04:23 +0200 |
---|---|---|
committer | niliara-edu <nil.jimeno@estudiant.fjaverianas.com> | 2024-09-27 14:04:23 +0200 |
commit | db58cb58b5d5612ec2aa347d0f8531b26ab2e7f3 (patch) | |
tree | 948e96bf2eabc7694194c07e9ac19acafa760b94 /scrap | |
parent | 9d70bfed33df8ea4cd77f915454da265edccf401 (diff) |
upload changes
Diffstat (limited to 'scrap')
-rw-r--r-- | scrap/database.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/scrap/database.py b/scrap/database.py index d7c0e0c..2319812 100644 --- a/scrap/database.py +++ b/scrap/database.py @@ -1,14 +1,23 @@ import mysql.connector +import getpass + + +def get_database_password(): + return getpass.getpass("Insert database password: ") + connector = mysql.connector.connect( host="localhost", - user="root", + user="balalaika_user", + password=get_database_password(), database="balalaika", ) cursor = connector.cursor() + + def process_albums(album_list): [process_album(album, album_id) for album_id, album in enumerate(album_list, 1)] |