mirror of
https://github.com/sherlock-project/sherlock
synced 2024-11-15 16:47:57 +00:00
Script can now load the data.json file when invoked from different directory
If the script is run from a different directory than the where it resides then it would fail to load because it could not find data.json. fixes #47
This commit is contained in:
parent
f9d59270a3
commit
cf7ec54f23
1 changed files with 2 additions and 1 deletions
|
@ -90,7 +90,8 @@ def sherlock(username, verbose=False, tor=False, unique_tor=False):
|
|||
}
|
||||
|
||||
# Load the data
|
||||
with open("data.json", "r", encoding="utf-8") as raw:
|
||||
script_directory = os.path.dirname(os.path.realpath(__file__))
|
||||
with open(script_directory + "/data.json", "r", encoding="utf-8") as raw:
|
||||
data = json.load(raw)
|
||||
|
||||
# Allow 1 thread for each external service, so `len(data)` threads total
|
||||
|
|
Loading…
Reference in a new issue