Skip to content

Commit

Permalink
adopt warning filter for latest beautifulsoup version
Browse files Browse the repository at this point in the history
  • Loading branch information
hannob committed Jul 25, 2024
1 parent 41a2d30 commit c788e62
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion snallygaster
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ dns_cache = {}

# This prevents BeautifulSoup from causing warnings when the
# content of a webpage looks suspicious, i.e. when it only
# contains a single URL or a filename.
# contains a single URL or a filename. Since 4.9.1.
warnings.filterwarnings("ignore", category=bs4.MarkupResemblesLocatorWarning)
# For BeautifulSoup before 4.9.1, can be removed at some point.
warnings.filterwarnings("ignore", category=UserWarning, module="bs4")
# Disable warnings when BeautifulSoup sees an XML document
warnings.filterwarnings("ignore", category=XMLParsedAsHTMLWarning, module="html.parser")
Expand Down

0 comments on commit c788e62

Please sign in to comment.