v19 need help converting beautifulsoap 3 to beautifulsoap 4
#1
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
Reply
#2
(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.
Kodi 21 Windows 10 and 11 | 21 Xbox One X | 21 Linux Mint Virginia XFCE | CoreELEC NO 21 nightly S905X4 aarch64
Reply

Logout Mark Read Team Forum Stats Members Help
need help converting beautifulsoap 3 to beautifulsoap 40