diff options
| author | J08nY | 2022-07-16 16:14:38 +0200 |
|---|---|---|
| committer | J08nY | 2022-07-16 16:14:38 +0200 |
| commit | e0a2a1420cf3c21f0522b4de6db28446b19bbb69 (patch) | |
| tree | 219604f10de4ca97c818290d01cb7ce870778819 /sec_certs/dataset/fips_algorithm.py | |
| parent | ef2a3defe1138dc15ba959df5a631ed16894df00 (diff) | |
| download | sec-certs-e0a2a1420cf3c21f0522b4de6db28446b19bbb69.tar.gz sec-certs-e0a2a1420cf3c21f0522b4de6db28446b19bbb69.tar.zst sec-certs-e0a2a1420cf3c21f0522b4de6db28446b19bbb69.zip | |
Use html5lib instead of html.parser.
Diffstat (limited to 'sec_certs/dataset/fips_algorithm.py')
| -rw-r--r-- | sec_certs/dataset/fips_algorithm.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sec_certs/dataset/fips_algorithm.py b/sec_certs/dataset/fips_algorithm.py index caaa5a7b..e9e3680c 100644 --- a/sec_certs/dataset/fips_algorithm.py +++ b/sec_certs/dataset/fips_algorithm.py @@ -40,7 +40,7 @@ class FIPSAlgorithmDataset(Dataset, ComplexSerializableType): logger.error("Couldn't download first page of algo dataset") with open(self.root_dir / "page1.html", "r") as alg_file: - soup = BeautifulSoup(alg_file.read(), "html.parser") + soup = BeautifulSoup(alg_file.read(), "html5lib") num_pages_elem = soup.select("span[data-total-pages]")[0].attrs num_pages = int(num_pages_elem["data-total-pages"]) @@ -89,7 +89,7 @@ class FIPSAlgorithmDataset(Dataset, ComplexSerializableType): continue with open(f, "r", encoding="utf-8") as handle: - html_soup = BeautifulSoup(handle.read(), "html.parser") + html_soup = BeautifulSoup(handle.read(), "html5lib") table = html_soup.find("table", class_="table table-condensed publications-table table-bordered") tbody_contents = table.find("tbody").find_all("tr") |
