diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-05-09 17:24:28 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-05-09 17:59:26 +0530 |
commit | 0f06bcd7591332937fdec497d6cbb4914358bc79 (patch) | |
tree | d202c952782c1ea96277f60ca55dcb182e0a1916 /yt_dlp/downloader/mhtml.py | |
parent | d239db030671b9445c77c7d8cb190ba5fee76b96 (diff) | |
download | hypervideo-pre-0f06bcd7591332937fdec497d6cbb4914358bc79.tar.lz hypervideo-pre-0f06bcd7591332937fdec497d6cbb4914358bc79.tar.xz hypervideo-pre-0f06bcd7591332937fdec497d6cbb4914358bc79.zip |
[cleanup] Minor fixes (See desc)
* [youtube] Fix `--youtube-skip-dash-manifest`
* [build] Use `$()` in `Makefile`. Closes #3684
* Fix bug in 385ffb467b2285e85a2a5495b90314ba1f8e0700
* Fix bug in 43d7f5a5d0c77556156a3f8caa6976d3908a1e38
* [cleanup] Remove unnecessary `utf-8` from `str.encode`/`bytes.decode`
* [utils] LazyList: Expose unnecessarily "protected" attributes
and other minor cleanup
Diffstat (limited to 'yt_dlp/downloader/mhtml.py')
-rw-r--r-- | yt_dlp/downloader/mhtml.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/yt_dlp/downloader/mhtml.py b/yt_dlp/downloader/mhtml.py index 8a6619960..f999fca78 100644 --- a/yt_dlp/downloader/mhtml.py +++ b/yt_dlp/downloader/mhtml.py @@ -54,7 +54,7 @@ body > figure > img { def _escape_mime(s): return '=?utf-8?Q?' + (b''.join( bytes((b,)) if b >= 0x20 else b'=%02X' % b - for b in quopri.encodestring(s.encode('utf-8'), header=True) + for b in quopri.encodestring(s.encode(), header=True) )).decode('us-ascii') + '?=' def _gen_cid(self, i, fragment, frag_boundary): @@ -151,7 +151,7 @@ body > figure > img { length=len(stub), title=self._escape_mime(title), stub=stub - ).encode('utf-8')) + ).encode()) extra_state['header_written'] = True for i, fragment in enumerate(fragments): |