From d2223914d48ad440ddd927e50d0e38f58e55a341 Mon Sep 17 00:00:00 2001 From: Khoironi Kurnia Syah Date: Tue, 28 May 2024 13:58:36 +0700 Subject: [PATCH] fix signup feature --- instagrapi/mixins/private.py | 2 +- instagrapi/mixins/signup.py | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/instagrapi/mixins/private.py b/instagrapi/mixins/private.py index a7fa2770..6e5a7989 100644 --- a/instagrapi/mixins/private.py +++ b/instagrapi/mixins/private.py @@ -324,7 +324,7 @@ def _send_private_request( if endpoint == "/challenge/": # wow so hard, is it safe tho? endpoint = "/v1/challenge/" - api_url = f"https://{self.domain or config.API_DOMAIN}/api{endpoint}" + api_url = f"https://{domain or config.API_DOMAIN}/api{endpoint}" self.logger.info(api_url) if data: # POST # Client.direct_answer raw dict diff --git a/instagrapi/mixins/signup.py b/instagrapi/mixins/signup.py index 1c2107f5..572e5ca7 100644 --- a/instagrapi/mixins/signup.py +++ b/instagrapi/mixins/signup.py @@ -133,29 +133,23 @@ def accounts_create( data = { "is_secondary_account_creation": "true", "jazoest": str(int(random.randint(22300, 22399))), # "22341", - "tos_version": "row", "suggestedUsername": "sn_result", "do_not_auto_login_if_credentials_match": "false", "phone_id": self.phone_id, "enc_password": self.password_encrypt(password), "username": str(username), "first_name": str(full_name), - "day": str(day), "adid": self.adid, "guid": self.uuid, - "year": str(year), "device_id": self.device_id, "_uuid": self.uuid, "email": email, - "month": str(month), - "sn_nonce": sn_nonce, "force_sign_up_code": signup_code, "waterfall_id": self.waterfall_id, - "password": password, "one_tap_opt_in": "true", **kwargs, } - return self.private_request("accounts/create/", data) + return self.private_request("accounts/create/", data, domain= "www.instagram.com") def challenge_flow(self, data): data = self.challenge_api(data)