From 33df554063b074cf35d145a03b1d8de71f1eed1f Mon Sep 17 00:00:00 2001 From: SoClose <33631880+SoClosee@users.noreply.github.com> Date: Tue, 3 Mar 2026 11:26:11 +0100 Subject: [PATCH] fix: implement credential validation --- main.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.py b/main.py index 8ec29cc..2beb073 100644 --- a/main.py +++ b/main.py @@ -49,6 +49,9 @@ # Configuration # --------------------------------------------------------------------------- +import os +from dotenv import load_dotenv + load_dotenv() LOG_FORMAT = "%(asctime)s [%(levelname)s] %(message)s" @@ -211,6 +214,10 @@ def main() -> None: logger.info("=" * 50) username, password = get_credentials() + if not validate_credentials(username, password): + logger.error("Invalid credentials. Exiting.") + return + output_name = input("Enter output file name (without extension): ").strip() or "instagram_profiles" output_file = Path(f"{output_name}.csv")