diff --git a/.gitignore b/.gitignore index 79511bc..d62b408 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ /old geckodriver.log -config.cfg .vscode/ update.sh /Git @@ -10,4 +9,4 @@ login.csv requirements.txt data **/__pycache__ -config +/user_data diff --git a/main.py b/main.py index 76378bd..4fb47f5 100644 --- a/main.py +++ b/main.py @@ -2,8 +2,12 @@ import configparser import os -print -config_path = f"{os.path.abspath( os.path.dirname( __file__ ) )}/user_data/config.cfg" +import shutil + +default_config = f"{os.path.abspath( os.path.dirname( __file__ ) )}/user_data/config.default" +new = f"{os.path.abspath( os.path.dirname( __file__ ) )}/user_data/config.cfg" +shutil.copyfile(default_config, config_path) + config = configparser.ConfigParser() config.read(config_path)