Skip to content

Commit

Permalink
Add flag to display URLs for usernames on supported platforms (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
iojw committed May 30, 2020
1 parent b1c5e0b commit c9df19c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ optional arguments:
file containing list of HTTP proxy servers to execute
queries with
--verbose, -v show query responses as they are received
--show-urls display profile URLs for usernames on supported platforms
(profiles may not exist if usernames are reserved or belong to deleted/banned accounts)
--version show program's version number and exit
```

Expand Down
9 changes: 9 additions & 0 deletions socialscan/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ async def main():
parser.add_argument(
"--verbose", "-v", action="store_true", help="show query responses as they are received"
)
parser.add_argument(
"--show-urls",
action="store_true",
help="display profile URLs for usernames on supported platforms (profiles may not exist if usernames are reserved or belong to deleted/banned accounts)",
)
parser.add_argument("--version", version=f"%(prog)s {__version__}", action="version")
args = parser.parse_args()

Expand Down Expand Up @@ -174,9 +179,13 @@ async def main():
col = COLOUR_INVALID
else:
col = COLOUR_UNAVAILABLE

result_text = f"{col.Primary}{value}"
if not platform_response.valid:
result_text += f": {col.Secondary}{platform_response.message}"
elif platform_response.link and args.show_urls:
result_text += f"{col.Secondary} - {platform_response.link}"

print(result_text)

print("\n" + COLOUR_AVAILABLE.Primary + "Available, ", end="")
Expand Down

0 comments on commit c9df19c

Please sign in to comment.