From 2a95589a1d77ae9a0e89fe28e4c23639c25ac3d4 Mon Sep 17 00:00:00 2001 From: Alexander Graf <17130992+aandergr@users.noreply.github.com> Date: Thu, 30 May 2024 10:15:46 +0200 Subject: [PATCH] Fix checkpoint URL output --- instaloader/instaloadercontext.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/instaloader/instaloadercontext.py b/instaloader/instaloadercontext.py index a7b00a3..cad54c0 100644 --- a/instaloader/instaloadercontext.py +++ b/instaloader/instaloadercontext.py @@ -289,9 +289,10 @@ class InstaloaderContext: resp_json['two_factor_info']['two_factor_identifier']) raise TwoFactorAuthRequiredException("Login error: two-factor authentication required.") if resp_json.get('checkpoint_url'): - raise ConnectionException("Login: Checkpoint required. Point your browser to " - "https://www.instagram.com{} - " - "follow the instructions, then retry.".format(resp_json.get('checkpoint_url'))) + raise ConnectionException( + f"Login: Checkpoint required. Point your browser to {resp_json.get('checkpoint_url')} - " + f"follow the instructions, then retry." + ) if resp_json['status'] != 'ok': if 'message' in resp_json: raise ConnectionException("Login error: \"{}\" status, message \"{}\".".format(resp_json['status'],