Skip to content

Commit 930ed2a

Browse files
committed
Merge branch '2130-torrequest' into release/0.15.0-rc2
2 parents 1836735 + f79bbfc commit 930ed2a

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ torrequest = "^0.1.0"
5252
pandas = ">=1.0.0,<3.0.0"
5353
openpyxl = "^3.0.10"
5454

55+
[tool.poetry.extras]
56+
tor = ["torrequest"]
57+
5558
[tool.poetry.group.dev.dependencies]
5659
jsonschema = "^4.0.0"
5760

sherlock_project/sherlock.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import sys
1111

1212
try:
13-
from sherlock.__init__ import import_error_test_var # noqa: F401
13+
from sherlock_project.__init__ import import_error_test_var # noqa: F401
1414
except ImportError:
1515
print("Did you run Sherlock with `python3 sherlock/sherlock.py ...`?")
1616
print("This is an outdated method. Please see https://sherlockproject.xyz/installation for up to date instructions.")
@@ -211,6 +211,18 @@ def sherlock(
211211
query_notify.start(username)
212212
# Create session based on request methodology
213213
if tor or unique_tor:
214+
try:
215+
from torrequest import TorRequest # noqa: E402
216+
except ImportError:
217+
print("Important!")
218+
print("> --tor and --unique-tor are now DEPRECATED, and may be removed in a future release of Sherlock.")
219+
print("> If you've installed Sherlock via pip, you can include the optional dependency via `pip install 'sherlock-project[tor]'`.")
220+
print("> Other packages should refer to their documentation, or install it separately with `pip install torrequest`.\n")
221+
sys.exit(query_notify.finish())
222+
223+
print("Important!")
224+
print("> --tor and --unique-tor are now DEPRECATED, and may be removed in a future release of Sherlock.")
225+
214226
# Requests using Tor obfuscation
215227
try:
216228
underlying_request = TorRequest()

0 commit comments

Comments
 (0)