diff --git a/lib/svtplay_dl/service/solidtango.py b/lib/svtplay_dl/service/solidtango.py index a5e5329..f488f7b 100644 --- a/lib/svtplay_dl/service/solidtango.py +++ b/lib/svtplay_dl/service/solidtango.py @@ -8,6 +8,7 @@ from svtplay_dl.service import Service from svtplay_dl.fetcher.hls import hlsparse from svtplay_dl.error import ServiceError from svtplay_dl.utils.urllib import urlparse +from svtplay_dl.utils import is_py2 class Solidtango(Service): @@ -53,7 +54,10 @@ class Solidtango(Service): if data.status_code != 200: yield ServiceError("Can't find video info. if there is a video on the page. its a bug.") return - xml = ET.XML(data.text) + xmldoc = data.text + if is_py2 and isinstance(xmldoc, unicode): + xmldoc = xmldoc.encode("utf8") + xml = ET.XML(xmldoc) elements = xml.findall(".//manifest") streams = hlsparse(self.options, self.http.request("get", elements[0].text), elements[0].text) for n in list(streams.keys()):