diff options
author | Sergey M <dstftw@gmail.com> | 2015-10-31 18:15:21 +0000 |
---|---|---|
committer | Sergey M <dstftw@gmail.com> | 2015-10-31 18:15:21 +0000 |
commit | 30eecc6a044d4070d0e8ea4a6e0637867f0d3a28 (patch) | |
tree | c120cc9df90a468bb0d58bb7a7601cb8418eb32f /youtube_dl/extractor/bilibili.py | |
parent | dbd82a1d4fff1655920e111cc25a7fd526d7bf9a (diff) | |
parent | ae37338e681319a28d98dc551253d9fa1830969a (diff) |
Merge pull request #7296 from jaimeMF/xml_attrib_unicode
Use a wrapper around xml.etree.ElementTree.fromstring in python 2.x (…
Diffstat (limited to 'youtube_dl/extractor/bilibili.py')
-rw-r--r-- | youtube_dl/extractor/bilibili.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/youtube_dl/extractor/bilibili.py b/youtube_dl/extractor/bilibili.py index ecc17ebeb..6c66a1236 100644 --- a/youtube_dl/extractor/bilibili.py +++ b/youtube_dl/extractor/bilibili.py @@ -4,9 +4,11 @@ from __future__ import unicode_literals import re import itertools import json -import xml.etree.ElementTree as ET from .common import InfoExtractor +from ..compat import ( + compat_etree_fromstring, +) from ..utils import ( int_or_none, unified_strdate, @@ -88,7 +90,7 @@ class BiliBiliIE(InfoExtractor): except ValueError: pass - lq_doc = ET.fromstring(lq_page) + lq_doc = compat_etree_fromstring(lq_page) lq_durls = lq_doc.findall('./durl') hq_doc = self._download_xml( |