Skip to content

Commit

Permalink
squash xml/html parsing warning that seems irrelevant
Browse files Browse the repository at this point in the history
  • Loading branch information
TomDonoghue committed Aug 30, 2024
1 parent 5ff7644 commit 16dd6ab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lisc/collect/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ def get_db_info(req, info_url):
>>> db_info = get_db_info(Requester(), url)
"""

# Squash warning that arises despite specifying XML parsing
from bs4.builder import XMLParsedAsHTMLWarning
import warnings
warnings.filterwarnings("ignore", category=XMLParsedAsHTMLWarning)

# Get the info page and parse with BeautifulSoup
info_page = req.request_url(info_url)
info_page_soup = BeautifulSoup(info_page.content, 'lxml')
Expand Down

0 comments on commit 16dd6ab

Please sign in to comment.