Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BeautifulSoup is casting a GuessedAtParserWarning whenever Disambiguation occurs #323

Open
vscheff opened this issue Jul 20, 2023 · 1 comment

Comments

@vscheff
Copy link

vscheff commented Jul 20, 2023

The following warning is output to the console whenever Disambiguation occurs:

[source_file_path]\wikipedia\wikipedia.py:389: GuessedAtParserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("lxml"). 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.

The code that caused this warning is on line 389 of the file [source_file_path]\wikipedia\wikipedia.py. To get rid of this warning, pass the additional argument 'features="lxml"' to the BeautifulSoup constructor.

  lis = BeautifulSoup(html).find_all('li')

For an example on when this happens, try calling the page function with "Javine" as an argument.

@Luen
Copy link

Luen commented Apr 30, 2024

#107

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants