Update sherlock.py

pull/2041/head
John Neijzen 3 months ago committed by GitHub
parent c8a2531713
commit 74ea60bd6b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -768,22 +768,22 @@ def main():
if args.output:
result_file = args.output
elif args.folderoutput:
# The usernames results should be stored in a targeted folder.
# If the folder doesn't exist, create it first
os.makedirs(args.folderoutput, exist_ok=True)
result_file = os.path.join(args.folderoutput, f"{username}.txt")
else:
result_file = f"{username}.txt"
with open(result_file, "w", encoding="utf-8") as file:
exists_counter = 0
for website_name in results:
dictionary = results[website_name]
if dictionary.get("status").status == QueryStatus.CLAIMED:
exists_counter += 1
file.write(dictionary["url_user"] + "\n")
file.write(f"Total Websites Username Detected On : {exists_counter}\n")
# elif args.folderoutput:
# # The usernames results should be stored in a targeted folder.
# # If the folder doesn't exist, create it first
# os.makedirs(args.folderoutput, exist_ok=True)
# result_file = os.path.join(args.folderoutput, f"{username}.txt")
# else:
# result_file = f"{username}.txt"
# with open(result_file, "w", encoding="utf-8") as file:
# exists_counter = 0
# for website_name in results:
# dictionary = results[website_name]
# if dictionary.get("status").status == QueryStatus.CLAIMED:
# exists_counter += 1
# file.write(dictionary["url_user"] + "\n")
# file.write(f"Total Websites Username Detected On : {exists_counter}\n")
if args.csv:
result_file = f"{username}.csv"

Loading…
Cancel
Save