Skip to content

Commit

Permalink
Prevent out of bounds (#2)
Browse files Browse the repository at this point in the history
* Prevent out of bounds

* CL
  • Loading branch information
inverse authored Jan 18, 2022
1 parent b1b827f commit 9254323
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 0.1.1

- Fix out of bounds for invalid search

# 0.1.0

- Initial release
4 changes: 4 additions & 0 deletions cert_host_scraper/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ def fetch_site(search: str) -> str:
def scrape_urls(contents: str) -> List[str]:
soup = BeautifulSoup(contents, features="html.parser")
tables = soup.findAll("table")

if len(tables) <= 2:
return []

results_table = tables[2]

total_urls = []
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cert-host-scraper"
version = "0.1.0"
version = "0.1.1"
description = ""
authors = ["Malachi Soord <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 9254323

Please sign in to comment.