Skip to content

Commit

Permalink
perf: better output info
Browse files Browse the repository at this point in the history
  • Loading branch information
Datalux committed Oct 18, 2021
1 parent ac326c7 commit ac9fd5d
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/Osintgram.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,8 @@ def get_followers(self):
results = self.api.user_followers(str(self.target_id), rank_token=rank_token, max_id=next_max_id)
_followers.extend(results.get('users', []))
next_max_id = results.get('next_max_id')
sys.stdout.write("\rCatched %i followers" % len(_followers))
sys.stdout.flush()

print("\n")

Expand Down Expand Up @@ -398,6 +400,8 @@ def get_followings(self):
results = self.api.user_following(str(self.target_id), rank_token=rank_token, max_id=next_max_id)
_followings.extend(results.get('users', []))
next_max_id = results.get('next_max_id')
sys.stdout.write("\rCatched %i followings" % len(_followings))
sys.stdout.flush()

print("\n")

Expand Down Expand Up @@ -1243,6 +1247,8 @@ def get_fwersemail(self):
if len(results) > value:
break
results.append(follow)
sys.stdout.write("\rCatched %i followers email" % len(results))
sys.stdout.flush()

except ClientThrottledError as e:
pc.printout("\nError: Instagram blocked the requests. Please wait a few minutes before you try again.", pc.RED)
Expand Down Expand Up @@ -1348,6 +1354,8 @@ def get_fwingsemail(self):
if len(results) > value:
break
results.append(follow)
sys.stdout.write("\rCatched %i followings email" % len(results))
sys.stdout.flush()

except ClientThrottledError as e:
pc.printout("\nError: Instagram blocked the requests. Please wait a few minutes before you try again.", pc.RED)
Expand Down Expand Up @@ -1454,6 +1462,8 @@ def get_fwersnumber(self):
if len(results) > value:
break
results.append(follow)
sys.stdout.write("\rCatched %i followers phone numbers" % len(results))
sys.stdout.flush()

except ClientThrottledError as e:
pc.printout("\nError: Instagram blocked the requests. Please wait a few minutes before you try again.", pc.RED)
Expand Down Expand Up @@ -1561,6 +1571,8 @@ def get_fwingsnumber(self):
if len(results) > value:
break
results.append(follow)
sys.stdout.write("\rCatched %i followings phone numbers" % len(results))
sys.stdout.flush()

except ClientThrottledError as e:
pc.printout("\nError: Instagram blocked the requests. Please wait a few minutes before you try again.", pc.RED)
Expand Down Expand Up @@ -1680,6 +1692,8 @@ def get_followers_subset(self):
results = self.api.user_followers(str(self.target_id), rank_token=rank_token, max_id=next_max_id)
_followers_target_1.extend(results.get('users', []))
next_max_id = results.get('next_max_id')
sys.stdout.write("\rCatched %i followers" % len(_followers_target_1))
sys.stdout.flush()

print("\n")

Expand All @@ -1705,7 +1719,9 @@ def get_followers_subset(self):
results = self.api.user_followers(str(self.target_id), rank_token=rank_token, max_id=next_max_id)
_followers_target_2.extend(results.get('users', []))
next_max_id = results.get('next_max_id')

sys.stdout.write("\rCatched %i followers" % len(_followers_target_2))
sys.stdout.flush()

print("\n")

for user in _followers_target_1:
Expand Down

0 comments on commit ac9fd5d

Please sign in to comment.