opengraph icon indicating copy to clipboard operation
opengraph copied to clipboard

Make it possible to specify the parser for BeautifulSoup4

Open fumiya5863 opened this issue 4 years ago • 0 comments

If you have lxml installed, BeautifulSoup4 will set lxml as the default parser, so it would be better to be able to specify the parser depending on the situation. https://github.com/erikriver/opengraph/blob/e2322563004c923a4c1ce136733a44efe5fc8caa/opengraph/opengraph.py#L63 This is the default setting because we didn't actually do the parser above.

Depending on the environment, the following issue cases may occur due to the above reasons https://github.com/erikriver/opengraph/issues/37

As a solution, I think it would be a good idea to add a new parser that can be selected in the following arguments https://github.com/erikriver/opengraph/blob/e2322563004c923a4c1ce136733a44efe5fc8caa/opengraph/opengraph.py#L28

fumiya5863 avatar Feb 03 '22 04:02 fumiya5863