From 17a68599f83f4cb4fc1d37efa31bce5b974df6fb Mon Sep 17 00:00:00 2001 From: girst Date: Mon, 17 Aug 2020 21:24:01 +0200 Subject: [PATCH] don't need to patch youtubedown any more as of somewhere between Aug 15 00:52 (last unpatched version downloaded) and Mon, 17 Aug 2020 19:07:08 GMT (HTTP Last-Modified), it is no longer necessary to modify youtubedown, as jwz has accepted my patch regarding caller(). The %ciphers hash has an entry of 13 Aug 2020, so that's probably the date he applied it locally. --- app/common/utils.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/common/utils.py b/app/common/utils.py index fae03c8..ca34a1c 100755 --- a/app/common/utils.py +++ b/app/common/utils.py @@ -213,12 +213,8 @@ def ytdown_guess(cipher_id, verbose, force): elif verbose >= 2: sys.stderr.write(f'done (code {r.status_code})\n') - # youtubedown unconditionally calls "main(); exit 0;", which breaks - # using it as a module: - contents = "\n".join(r.text.splitlines()[:-2] + ["1;"]) - - with open(ytdown, 'w', encoding='utf-8') as f: - f.write(contents) + with open(ytdown, 'wb') as f: + f.write(r.content) perl = subprocess.run( ["perl", "-wE", """ -- 2.39.3