Skip to content
Open
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
7 changes: 7 additions & 0 deletions sherlock_project/sherlock.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from typing import Optional

import requests
import urllib3
from requests_futures.sessions import FuturesSession

from sherlock_project.__init__ import (
Expand Down Expand Up @@ -121,6 +122,12 @@ def get_response(request_future, error_type, social_network):
if response.status_code:
# Status code exists in response object
error_context = None
except urllib3.exceptions.LocationParseError as errl:
error_context = "Illegal URL"
exception_text = str(errl)
except requests.exceptions.InvalidURL as erriu:
error_context = "Invalid URL"
exception_text = str(erriu)
except requests.exceptions.HTTPError as errh:
error_context = "HTTP Error"
exception_text = str(errh)
Expand Down