Kodi Community Forum

Full Version: need help converting beautifulsoap 3 to beautifulsoap 4
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I need to convert these codes to work in the kodi matrix with beautifulsoap 4

https://paste.kodi.tv/wecexuwobi

https://paste.kodi.tv/ozalasoxet

https://paste.kodi.tv/ogiyuxiled

https://paste.kodi.tv/pevunamaxa

https://paste.kodi.tv/olisoretiz

in all codes has the xml model
(2020-11-24, 22:19)mitomitoso Wrote: [ -> ]I need to convert these codes to work in the kodi matrix with beautifulsoap 4
https://paste.kodi.tv/wecexuwobi
https://paste.kodi.tv/ozalasoxet
https://paste.kodi.tv/ogiyuxiled
https://paste.kodi.tv/pevunamaxa
https://paste.kodi.tv/olisoretiz
in all codes has the xml model

AFAIK, you cannot do it as BeautifulStoneSoup is not part of BS4.
You have to rewrite the code using defusedxml.

OR try with the method mentioned in BS4 documentation but havent had much luck as it needs an external dependency lxml which is a binary package and is not packaged for Kodi

From BS4 documentation
Code:
There is no longer a BeautifulStoneSoup class for parsing XML. To parse XML you pass in “xml” as the second argument to the BeautifulSoup constructor. For the same reason, the BeautifulSoup constructor no longer recognizes the isHTML argument.