summaryrefslogtreecommitdiff
path: root/scrap
diff options
context:
space:
mode:
Diffstat (limited to 'scrap')
-rw-r--r--scrap/database.py11
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)]