diff options
author | Sergey M․ <dstftw@gmail.com> | 2018-01-23 22:23:12 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2018-01-23 22:23:12 +0700 |
commit | cf2820710d61742818a906af07f6d6c9669d58a9 (patch) | |
tree | 49da7e89124bcbfd9d297906d8436ff1cd107820 /youtube_dl/downloader | |
parent | 5d7d805ca90992cac1cdffbe5d3df3d894d2b979 (diff) |
Switch codebase to use compat_b64decode
Diffstat (limited to 'youtube_dl/downloader')
-rw-r--r-- | youtube_dl/downloader/f4m.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/youtube_dl/downloader/f4m.py b/youtube_dl/downloader/f4m.py index fdb80f42a..15e71be9a 100644 --- a/youtube_dl/downloader/f4m.py +++ b/youtube_dl/downloader/f4m.py @@ -1,12 +1,12 @@ from __future__ import division, unicode_literals -import base64 import io import itertools import time from .fragment import FragmentFD from ..compat import ( + compat_b64decode, compat_etree_fromstring, compat_urlparse, compat_urllib_error, @@ -312,7 +312,7 @@ class F4mFD(FragmentFD): boot_info = self._get_bootstrap_from_url(bootstrap_url) else: bootstrap_url = None - bootstrap = base64.b64decode(node.text.encode('ascii')) + bootstrap = compat_b64decode(node.text) boot_info = read_bootstrap_info(bootstrap) return boot_info, bootstrap_url @@ -349,7 +349,7 @@ class F4mFD(FragmentFD): live = boot_info['live'] metadata_node = media.find(_add_ns('metadata')) if metadata_node is not None: - metadata = base64.b64decode(metadata_node.text.encode('ascii')) + metadata = compat_b64decode(metadata_node.text) else: metadata = None |