From bdb54c218ac9edac9c38c743d21557ddd7df7427 Mon Sep 17 00:00:00 2001 From: AjanSharma Date: Sat, 27 Feb 2021 22:25:24 -0500 Subject: [PATCH] Update Username.py In the Instagram function, the status code is coming out to be 429 (which corresponds to too many request) due to which it is giving "Error: Something went wrong" every time. That has been fixed. Kindly, review the code. --- plugins/Username.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Username.py b/plugins/Username.py index bf90cd1..399d210 100644 --- a/plugins/Username.py +++ b/plugins/Username.py @@ -85,7 +85,7 @@ def find_home_details(): def Instagram(username): - r = requests.get("https://www.instagram.com/"+ username +"/?__a=1") + r = requests.get("https://www.instagram.com/"+ username +"/?__a=1", headers = {'User-agent': 'your bot 0.1'}) if r.status_code == 200: res = r.json()['graphql']['user'] print("\nUsername: " + res['username'])