From eb498fb629c7717269a8865b02d4ab0179812ead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Proch=C3=A1zka?= Date: Mon, 30 Dec 2024 19:36:14 +0100 Subject: [PATCH] add time before opening the browser --- alfetcher/al_config_utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/alfetcher/al_config_utils.py b/alfetcher/al_config_utils.py index 3d8f1bc..61495da 100644 --- a/alfetcher/al_config_utils.py +++ b/alfetcher/al_config_utils.py @@ -3,6 +3,7 @@ from gevent.pywsgi import WSGIServer from urllib.parse import parse_qs from .utils import utils_save_json +from time import sleep def get_ip_address(): try: @@ -125,8 +126,9 @@ def generate_api_key(client_id, client_secret): client_id = get_input(gen_please("Anilist API Client ID","https://anilist.co/settings/developer")) client_secret = get_input(gen_please("Anilist API Client Secret",f"https://anilist.co/settings/client/{client_id}")) else: - webbrowser.open("https://anilist.co/settings/developer", 0) client_id = get_input(gen_please("Anilist API Client ID","Paste the Client ID")) + sleep(1) + webbrowser.open("https://anilist.co/settings/developer", 0) client_secret = get_input(gen_please("Anilist API Client Secret","Paste the Client Secret")) config_dict['anilist_user_token'] = generate_api_key(client_id, client_secret) if not print_only: