Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion sherlock_project/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import pathlib
import tomli


def get_version() -> str:
"""Fetch the version number of the installed package."""
try:
Expand Down
9 changes: 8 additions & 1 deletion sherlock_project/sherlock.py
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,13 @@ def main():
]
)
if args.xlsx:
result_file = f"{username}.xlsx"
if 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, result_file)

usernames = []
names = []
url_main = []
Expand Down Expand Up @@ -922,7 +929,7 @@ def main():
"response_time_s": response_time_s,
}
)
DataFrame.to_excel(f"{username}.xlsx", sheet_name="sheet1", index=False)
DataFrame.to_excel(result_file, sheet_name="sheet1", index=False)

print()
query_notify.finish()
Expand Down
2 changes: 1 addition & 1 deletion sherlock_project/sites.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def __init__(self, name, url_home, url_username_format, username_claimed,
self.url_username_format = url_username_format

self.username_claimed = username_claimed
self.username_unclaimed = secrets.token_urlsafe(32)
self.username_unclaimed = username_unclaimed
self.information = information
Comment on lines 58 to 60
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SiteInformation.username_unclaimed is now taken from the username_unclaimed parameter, but SitesInformation currently constructs SiteInformation(...) without passing any unclaimed username from the loaded site data. As a result, every site will use the constructor default, and because that default is computed at function-definition time (username_unclaimed=secrets.token_urlsafe(10)), all instances will share the same value. To actually preserve the site model input, pass through site_data[site_name].get("username_unclaimed") (or similar) when constructing SiteInformation, and change the constructor default to something like None so a fresh token can be generated per-instance when missing.

Copilot uses AI. Check for mistakes.
self.is_nsfw = is_nsfw

Expand Down