From db58cb58b5d5612ec2aa347d0f8531b26ab2e7f3 Mon Sep 17 00:00:00 2001 From: niliara-edu Date: Fri, 27 Sep 2024 14:04:23 +0200 Subject: upload changes --- scrap/database.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'scrap') 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)] -- cgit v1.2.3