Private GIT

Skip to content
Snippets Groups Projects
Commit 8bb7d3b5 authored by Dustyn Gibson's avatar Dustyn Gibson
Browse files

Merge branch 'hotfix-tvdb' into develop

parents 33e119f1 34e418ce
No related branches found
No related tags found
No related merge requests found
......@@ -24,7 +24,6 @@ import datetime as dt
import requests
import xmltodict
import HTMLParser
try:
import xml.etree.cElementTree as ElementTree
......@@ -618,12 +617,12 @@ class Tvdb:
zipdata = StringIO.StringIO()
zipdata.write(resp.content)
myzipfile = zipfile.ZipFile(zipdata)
return xmltodict.parse(HTMLParser.HTMLParser().unescape(myzipfile.read('%s.xml' % language)), postprocessor=process)
return xmltodict.parse(myzipfile.read('%s.xml' % language), postprocessor=process)
except zipfile.BadZipfile:
raise tvdb_error("Bad zip file received from thetvdb.com, could not read it")
else:
try:
return xmltodict.parse(HTMLParser.HTMLParser().unescape(resp.text), postprocessor=process)
return xmltodict.parse(resp.text, postprocessor=process)
except:
return dict([(u'data', None)])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment