Skip to content

Commit

Permalink
Removing lxml and using html5lib to avoid BS4 failing with lxml on HPCs
Browse files Browse the repository at this point in the history
  • Loading branch information
paulstretenowich committed Feb 14, 2025
1 parent e0e5755 commit 162f83d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions pt_cli/connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

import requests
import bs4
import lxml

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -128,7 +127,7 @@ def maybe_json(self, data):
return loads
except json.decoder.JSONDecodeError:
if isinstance(data, str):
soup = bs4.BeautifulSoup(data, features="lxml")
soup = bs4.BeautifulSoup(data, features="html5lib")
if soup.get_text().startswith("----------"):
sys.stdout.write(soup.get_text())
elif soup.get_text().startswith("Welcome"):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dependencies = [
"pyyaml>=6.0",
"requests>=2.28",
"beautifulsoup4>=4.12",
"lxml",
"html5lib",
"shtab",
]

Expand Down

0 comments on commit 162f83d

Please sign in to comment.