Skip to content

Commit d290065

Browse files
committed
Do some refactoring
1 parent 1e25659 commit d290065

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

seleniumbase/fixtures/base_case.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -3256,7 +3256,7 @@ def load_html_string(self, html_string, new_page=True):
32563256
html_string = "\n".join(new_lines)
32573257
soup = self.get_beautiful_soup(html_string)
32583258
found_base = False
3259-
links = soup.findAll("link")
3259+
links = soup.find_all("link")
32603260
href = None
32613261
for link in links:
32623262
if link.get("rel") == ["canonical"] and link.get("href"):
@@ -3272,15 +3272,15 @@ def load_html_string(self, html_string, new_page=True):
32723272
"<head>", '<head><base href="%s">' % href
32733273
)
32743274
elif not found_base:
3275-
bases = soup.findAll("base")
3275+
bases = soup.find_all("base")
32763276
for base in bases:
32773277
if base.get("href"):
32783278
href = base.get("href")
32793279
if href:
32803280
html_string = html_string.replace('base: "."', 'base: "%s"' % href)
32813281

32823282
soup = self.get_beautiful_soup(html_string)
3283-
scripts = soup.findAll("script")
3283+
scripts = soup.find_all("script")
32843284
for script in scripts:
32853285
if script.get("type") != "application/json":
32863286
html_string = html_string.replace(str(script), "")

0 commit comments

Comments
 (0)