[SOLVED] Parse XML on BeautifulSoup
Published: October 16, 2024 - 3:38 PM
Hello,
I need to create a "Clari Copilot" package (easy, their installer.exe works correctly with /S).
However, I'm stuck on the update_package.py function because the binary is hosted on a CDN, without a main HTML page, but I was able to find an XML page listing the releases.
In setupdevhelpers.py, there are the bs_find and bs_find_all functions (which call BeautifulSoup (bs4)) with features="html.parser" by default.
BeautifulSoup, as well as the bs_find* functions, accept feature="xml", except that BeautifulSoup needs the "lxml" Python library, which isn't present by default in WAPT's Python virtual environment, I believe.
I could create a crude parser using a workaround, but it would be better to use bs_find* and BeautifulSoup natively with XML.
Do you have any suggestions? Is there a plan to integrate this LXML library into a future release? Or perhaps I've missed something?...
Thank you very much in advance.
Sincerely,
Jordi
I need to create a "Clari Copilot" package (easy, their installer.exe works correctly with /S).
However, I'm stuck on the update_package.py function because the binary is hosted on a CDN, without a main HTML page, but I was able to find an XML page listing the releases.
In setupdevhelpers.py, there are the bs_find and bs_find_all functions (which call BeautifulSoup (bs4)) with features="html.parser" by default.
BeautifulSoup, as well as the bs_find* functions, accept feature="xml", except that BeautifulSoup needs the "lxml" Python library, which isn't present by default in WAPT's Python virtual environment, I believe.
I could create a crude parser using a workaround, but it would be better to use bs_find* and BeautifulSoup natively with XML.
Do you have any suggestions? Is there a plan to integrate this LXML library into a future release? Or perhaps I've missed something?...
Thank you very much in advance.
Sincerely,
Jordi