cert-host-scraper 0.7.7__tar.gz → 0.8.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cert-host-scraper
3
- Version: 0.7.7
3
+ Version: 0.8.0
4
4
  Summary:
5
5
  Home-page: https://github.com/inverse/cert-host-scraper
6
6
  License: MIT
@@ -4,6 +4,7 @@ import sys
4
4
 
5
5
  import click
6
6
  from requests import RequestException
7
+ from rich import box
7
8
  from rich.console import Console
8
9
  from rich.progress import track
9
10
  from rich.table import Table
@@ -87,14 +88,20 @@ def search(search: str, status_code: int, timeout: int, clean: bool, strip: bool
87
88
  else:
88
89
  display = result.scraped
89
90
 
90
- table = Table(show_header=True, header_style="bold")
91
+ table = Table(show_header=True, header_style="bold", box=box.MINIMAL)
91
92
  table.add_column("URL")
92
93
  table.add_column("Status Code")
93
94
  for url_result in display:
94
95
  display_code = str(url_result.status_code)
95
96
  if url_result.status_code == -1:
96
97
  display_code = "-"
97
- table.add_row(url_result.url, display_code)
98
+
99
+ url = url_result.url
100
+ if url_result.status_code == 200:
101
+ display_code = f"[green]{display_code}[/green]"
102
+ url = f"[green]{url}[/green]"
103
+
104
+ table.add_row(url, display_code)
98
105
 
99
106
  console = Console()
100
107
  console.print(table)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "cert-host-scraper"
3
- version = "0.7.7"
3
+ version = "0.8.0"
4
4
  description = ""
5
5
  authors = ["Malachi Soord <inverse.chi@gmail.com>"]
6
6
  license = "MIT"
@@ -21,7 +21,7 @@ rich = ">=11,<14"
21
21
  single-source = "^0.3.0"
22
22
 
23
23
  [tool.poetry.dev-dependencies]
24
- pytest = "^7.4.0"
24
+ pytest = "^7.4.2"
25
25
  pytest-socket = "^0.6.0"
26
26
  vcrpy = "^5.1.0"
27
27