From 414d3f61268a948357889bb18885a4e0f060ec14 Mon Sep 17 00:00:00 2001 From: Leonard Richardson Date: Sat, 6 May 2017 12:09:52 -0400 Subject: Change no-parser-specified warning to avoid the implication that you should put your markup into square brackets. --- bs4/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bs4/__init__.py b/bs4/__init__.py index 46caac0..0fff7e1 100644 --- a/bs4/__init__.py +++ b/bs4/__init__.py @@ -82,7 +82,7 @@ class BeautifulSoup(Tag): ASCII_SPACES = '\x20\x0a\x09\x0c\x0d' - NO_PARSER_SPECIFIED_WARNING = "No parser was explicitly specified, so I'm using the best available %(markup_type)s parser for this system (\"%(parser)s\"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.\n\nThe code that caused this warning is on line %(line_number)s of the file %(filename)s. To get rid of this warning, change code that looks like this:\n\n BeautifulSoup([your markup])\n\nto this:\n\n BeautifulSoup([your markup], \"%(parser)s\")\n" + NO_PARSER_SPECIFIED_WARNING = "No parser was explicitly specified, so I'm using the best available %(markup_type)s parser for this system (\"%(parser)s\"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.\n\nThe code that caused this warning is on line %(line_number)s of the file %(filename)s. To get rid of this warning, change code that looks like this:\n\n BeautifulSoup(YOUR_MARKUP})\n\nto this:\n\n BeautifulSoup(YOUR_MARKUP, \"%(parser)s\")\n" def __init__(self, markup="", features=None, builder=None, parse_only=None, from_encoding=None, exclude_encodings=None, -- cgit v1.2.1