Skip to content

Commit

Permalink
Update functions.py
Browse files Browse the repository at this point in the history
Swapped to lxml for xml parsing
  • Loading branch information
Dingmatt committed Aug 28, 2020
1 parent f52eed6 commit 621d202
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Plug-ins/Amsa.bundle/Contents/Code/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ def XMLFromURL (url, filename="", directory="", cache=constants.DefaultCache, ti
#SaveFile(result, "Test.xml")

if result:
result = XML.ElementFromString(result)
result = etree.fromstring(result)
#result = XML.ElementFromString(result)
if str(result).startswith("<Element error at "):
Log.Debug("Functions - XMLFromURL() - Not an XML file, AniDB banned possibly, result: '%s'" % result)
else:
Expand Down

0 comments on commit 621d202

Please sign in to comment.