[compat] compat_etree_fromstring: also decode the text attribute
Deletes parse_xml from utils, because it also does it.
This commit is contained in:
parent
387db16a78
commit
f78546272c
5 changed files with 30 additions and 30 deletions
|
@ -14,8 +14,8 @@ from ..utils import (
|
|||
parse_duration,
|
||||
unified_strdate,
|
||||
xpath_text,
|
||||
parse_xml,
|
||||
)
|
||||
from ..compat import compat_etree_fromstring
|
||||
|
||||
|
||||
class ARDMediathekIE(InfoExtractor):
|
||||
|
@ -161,7 +161,7 @@ class ARDMediathekIE(InfoExtractor):
|
|||
raise ExtractorError('This program is only suitable for those aged 12 and older. Video %s is therefore only available between 20 pm and 6 am.' % video_id, expected=True)
|
||||
|
||||
if re.search(r'[\?&]rss($|[=&])', url):
|
||||
doc = parse_xml(webpage)
|
||||
doc = compat_etree_fromstring(webpage.encode('utf-8'))
|
||||
if doc.tag == 'rss':
|
||||
return GenericIE()._extract_rss(url, video_id, doc)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue