From f758c466662fb875bea2c96a6964010477557ea9 Mon Sep 17 00:00:00 2001 From: rockfly830 Date: Sun, 4 Aug 2024 18:02:28 -0300 Subject: [PATCH] "fix: status 201: public request ...." --- instagrapi/mixins/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instagrapi/mixins/user.py b/instagrapi/mixins/user.py index 30be7cd8..7a31251f 100644 --- a/instagrapi/mixins/user.py +++ b/instagrapi/mixins/user.py @@ -141,7 +141,7 @@ def user_info_by_username_gql(self, username: str) -> User: An object of User type """ username = str(username).lower() - return extract_user_gql(self.public_a1_request(f"/{username!s}/")["user"]) + return extract_user_gql(self.private_request(f"users/web_profile_info/?username={username!s}")["data"]["user"]) def user_info_by_username_v1(self, username: str) -> User: """