Skip to content

Commit

Permalink
Merge branch '2130-torrequest' into release/0.15.0-rc2
Browse files Browse the repository at this point in the history
  • Loading branch information
ppfeister committed Jul 8, 2024
2 parents a42bdd8 + f79bbfc commit ffdc7b4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ torrequest = "^0.1.0"
pandas = ">=1.0.0,<3.0.0"
openpyxl = "^3.0.10"

[tool.poetry.extras]
tor = ["torrequest"]

[tool.poetry.group.dev.dependencies]
jsonschema = "^4.0.0"

Expand Down
12 changes: 12 additions & 0 deletions sherlock_project/sherlock.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,18 @@ def sherlock(
query_notify.start(username)
# Create session based on request methodology
if tor or unique_tor:
try:
from torrequest import TorRequest # noqa: E402
except ImportError:
print("Important!")
print("> --tor and --unique-tor are now DEPRECATED, and may be removed in a future release of Sherlock.")
print("> If you've installed Sherlock via pip, you can include the optional dependency via `pip install sherlock-project[tor]`.")
print("> Other packages should refer to their documentation, or install it separately with `pip install torrequest`.\n")
sys.exit(query_notify.finish())

print("Important!")
print("> --tor and --unique-tor are now DEPRECATED, and may be removed in a future release of Sherlock."))

# Requests using Tor obfuscation
try:
underlying_request = TorRequest()
Expand Down

0 comments on commit ffdc7b4

Please sign in to comment.