From d29006549e37c710aa7158b18ece891feaf94b0e Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Fri, 7 Feb 2025 01:21:06 -0500 Subject: [PATCH] Do some refactoring --- seleniumbase/fixtures/base_case.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/seleniumbase/fixtures/base_case.py b/seleniumbase/fixtures/base_case.py index 8856ba57..be4207bf 100644 --- a/seleniumbase/fixtures/base_case.py +++ b/seleniumbase/fixtures/base_case.py @@ -3256,7 +3256,7 @@ class BaseCase(unittest.TestCase): html_string = "\n".join(new_lines) soup = self.get_beautiful_soup(html_string) found_base = False - links = soup.findAll("link") + links = soup.find_all("link") href = None for link in links: if link.get("rel") == ["canonical"] and link.get("href"): @@ -3272,7 +3272,7 @@ class BaseCase(unittest.TestCase): "", '' % href ) elif not found_base: - bases = soup.findAll("base") + bases = soup.find_all("base") for base in bases: if base.get("href"): href = base.get("href") @@ -3280,7 +3280,7 @@ class BaseCase(unittest.TestCase): html_string = html_string.replace('base: "."', 'base: "%s"' % href) soup = self.get_beautiful_soup(html_string) - scripts = soup.findAll("script") + scripts = soup.find_all("script") for script in scripts: if script.get("type") != "application/json": html_string = html_string.replace(str(script), "")