This is a great plugin, thank you so much. My only issue is that I get hundreds of warnings while the site is being built:
mkdocs | INFO - 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.
mkdocs |
mkdocs | The code that caused this warning is on line 32 of the file /usr/lib/python3.11/site-packages/backlinks_plugin/plugin.py. To get rid of this warning, pass the additional argument 'features="lxml"' to the BeautifulSoup constructor.
mkdocs |
mkdocs | File "/usr/lib/python3.11/site-packages/backlinks_plugin/plugin.py", line 32, in links
mkdocs | links = BeautifulSoup(self.html).find_all('a')
mkdocs | File "/usr/lib/python3.11/site-packages/bs4/__init__.py", line 299, in __init__
mkdocs | warnings.warn(
It looks to me, that changing line 32 from links = BeautifulSoup(self.html).find_all('a') to links = BeautifulSoup(self.html, feature='lxml').find_all('a') would avoid those warnings. Could that be added? Or does it have to be made configurable? Although, it's not now either.
This is a great plugin, thank you so much. My only issue is that I get hundreds of warnings while the site is being built:
It looks to me, that changing line 32 from
links = BeautifulSoup(self.html).find_all('a')
tolinks = BeautifulSoup(self.html, feature='lxml').find_all('a')
would avoid those warnings. Could that be added? Or does it have to be made configurable? Although, it's not now either.