aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/downloader/f4m.py
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2015-10-25 20:04:55 +0100
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2015-10-25 20:13:16 +0100
commit36e6f62cd0883f0f486d1666d010e5d9e6d515bd (patch)
tree16d8824f9a82d33276350799f89a9dcb40d58b64 /youtube_dl/downloader/f4m.py
parent755ff8d22ca5607400c1232b194e20a004e4e9eb (diff)
downloadyoutube-dl-36e6f62cd0883f0f486d1666d010e5d9e6d515bd.tar.xz
Use a wrapper around xml.etree.ElementTree.fromstring in python 2.x (#7178)
Attributes aren't unicode objects, so they couldn't be directly used in info_dict fields (for example '--write-description' doesn't work with bytes).
Diffstat (limited to 'youtube_dl/downloader/f4m.py')
-rw-r--r--youtube_dl/downloader/f4m.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/downloader/f4m.py b/youtube_dl/downloader/f4m.py
index 7f6143954..6170cc155 100644
--- a/youtube_dl/downloader/f4m.py
+++ b/youtube_dl/downloader/f4m.py
@@ -5,10 +5,10 @@ import io
import itertools
import os
import time
-import xml.etree.ElementTree as etree
from .fragment import FragmentFD
from ..compat import (
+ compat_etree_fromstring,
compat_urlparse,
compat_urllib_error,
compat_urllib_parse_urlparse,
@@ -290,7 +290,7 @@ class F4mFD(FragmentFD):
man_url = urlh.geturl()
manifest = urlh.read()
- doc = etree.fromstring(manifest)
+ doc = compat_etree_fromstring(manifest)
formats = [(int(f.attrib.get('bitrate', -1)), f)
for f in self._get_unencrypted_media(doc)]
if requested_bitrate is None: