Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error handling #1

Merged
merged 5 commits into from
Dec 26, 2018
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Merge branch 'master' into master
  • Loading branch information
shijuleon authored Dec 26, 2018
commit 58dff89e5ef0da435111b87e444f67360b7a92e8
6 changes: 5 additions & 1 deletion sherlock.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,12 @@ def sherlock(username):
for social_network in data:
url = data.get(social_network).get("url").format(username)
error_type = data.get(social_network).get("errorType")
cant_have_period = data.get(social_network).get("noPeriod")

if cant_have_period == "True":
print("\033[37;1m[\033[91;1m-\033[37;1m]\033[92;1m {}:\033[93;1m Not Found!".format(social_network))
continue

r, error_type = make_request(url=url, headers=headers, error_type=error_type, social_network=social_network)

if error_type == "message":
Expand Down Expand Up @@ -109,7 +114,6 @@ def sherlock(username):

print("\033[1;92m[\033[0m\033[1;77m*\033[0m\033[1;92m] Saved: \033[37;1m{}\033[0m".format(username+".txt"))


class ArgumentParserError(Exception): pass

class ArgumentParser(argparse.ArgumentParser):
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.