From 5e7ce331e8a1358e68017560e73f9d278f835daa Mon Sep 17 00:00:00 2001 From: J08nY Date: Tue, 4 Feb 2025 16:05:09 +0100 Subject: Fix #470. Bad bad bs4! --- src/sec_certs/sample/protection_profile.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/sec_certs/sample/protection_profile.py b/src/sec_certs/sample/protection_profile.py index 31dedcc2..35eab2dc 100644 --- a/src/sec_certs/sample/protection_profile.py +++ b/src/sec_certs/sample/protection_profile.py @@ -156,34 +156,34 @@ class ProtectionProfile( @staticmethod def _html_row_get_name(cell: Tag) -> str: - return cell.find_all("a")[0].string + return str(cell.find_all("a")[0].string) @staticmethod def _html_row_get_link(cell: Tag) -> str: - return constants.CC_PORTAL_BASE_URL + cell.find_all("a")[0].get("href") + return constants.CC_PORTAL_BASE_URL + str(cell.find_all("a")[0].get("href")) @staticmethod def _html_row_get_version(cell: Tag) -> str: - return cell.text + return str(cell.text) @staticmethod def _html_row_get_security_level(cell: Tag) -> set[str]: - return set(cell.stripped_strings) + return set(map(str, cell.stripped_strings)) @staticmethod def _html_row_get_scheme(cell: Tag) -> str | None: - schemes = list(cell.stripped_strings) + schemes = list(map(str, cell.stripped_strings)) return schemes[0] if schemes else None @staticmethod def _html_row_get_collaborative_name(cell: Tag) -> str: - return list(cell.stripped_strings)[0] + return list(map(str, cell.stripped_strings))[0] @staticmethod def _html_row_get_collaborative_pp_link(cell: Tag) -> str: - return constants.CC_PORTAL_BASE_URL + [x for x in cell.find_all("a") if x.string == "Protection Profile"][ - 0 - ].get("href") + return constants.CC_PORTAL_BASE_URL + str( + [x for x in cell.find_all("a") if x.string == "Protection Profile"][0].get("href") + ) @dataclass class InternalState(ComplexSerializableType): -- cgit v1.3.1