Skip to content

Commit

Permalink
Change presentation of status code (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
inverse authored Jan 26, 2023
1 parent c6cbec6 commit ac0aeff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.7.1

- Change presentation of status code for non-resolved URLs from `-1` to `-`

# 0.7.0

- Async processing of requests
Expand Down
5 changes: 4 additions & 1 deletion cert_host_scraper/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ def search(search: str, status_code: int, timeout: int, clean: bool, strip: bool
table.add_column("URL")
table.add_column("Status Code")
for url_result in display:
table.add_row(url_result.url, str(url_result.status_code))
status_code = (
str(url_result.status_code) if url_result.status_code != -1 else "-"
)
table.add_row(url_result.url, status_code)

console = Console()
console.print(table)
Expand Down

0 comments on commit ac0aeff

Please sign in to comment.