From ada3bece712d5e272e657832f4c147247d7a4e11 Mon Sep 17 00:00:00 2001 From: Alok Date: Wed, 9 Oct 2024 10:41:20 +0530 Subject: [PATCH] Fix Instagram detection method to use error message instead of status code --- sherlock_project/resources/data.json | 3 ++- sherlock_project/sherlock.py | 2 +- sherlock_project/tempCodeRunnerFile.py | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 sherlock_project/tempCodeRunnerFile.py diff --git a/sherlock_project/resources/data.json b/sherlock_project/resources/data.json index 8f38fd004..b5d6baf19 100644 --- a/sherlock_project/resources/data.json +++ b/sherlock_project/resources/data.json @@ -1137,7 +1137,8 @@ "username_claimed": "blue" }, "Instagram": { - "errorType": "status_code", + "errorType": "message", + "errorMsg":"Sorry, this page isn't available", "url": "https://instagram.com/{}", "urlMain": "https://instagram.com/", "urlProbe": "https://www.picuki.com/profile/{}", diff --git a/sherlock_project/sherlock.py b/sherlock_project/sherlock.py index e36ca6cc8..470c7fde4 100644 --- a/sherlock_project/sherlock.py +++ b/sherlock_project/sherlock.py @@ -272,7 +272,7 @@ def sherlock( url = interpolate_string(net_info["url"], username.replace(' ', '%20')) # Don't make request if username is invalid for the site - regex_check = net_info.get("regexCheck") + regex_check = net_info.get("Check") if regex_check and re.search(regex_check, username) is None: # No need to do the check at the site: this username is not allowed. results_site["status"] = QueryResult( diff --git a/sherlock_project/tempCodeRunnerFile.py b/sherlock_project/tempCodeRunnerFile.py new file mode 100644 index 000000000..822e14a8c --- /dev/null +++ b/sherlock_project/tempCodeRunnerFile.py @@ -0,0 +1 @@ +regex \ No newline at end of file