From 0d893c1c562f255a58eee2c89843fc2299bc05f1 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Wed, 11 Sep 2019 17:49:33 +0100 Subject: [PATCH] Gets plugins/edsy.py working. The usual string vs. bytes shenanigans. --- plugins/edsy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/edsy.py b/plugins/edsy.py index 3fda1635..a9c13d64 100644 --- a/plugins/edsy.py +++ b/plugins/edsy.py @@ -17,8 +17,8 @@ def shipyard_url(loadout, is_beta): if not string: return False - out = io.StringIO() + out = io.BytesIO() with gzip.GzipFile(fileobj=out, mode='w') as f: f.write(string) - return (is_beta and 'http://edsy.org/beta/#/I=' or 'http://edsy.org/#/I=') + base64.urlsafe_b64encode(out.getvalue()).replace('=', '%3D') + return (is_beta and 'http://edsy.org/beta/#/I=' or 'http://edsy.org/#/I=') + base64.urlsafe_b64encode(out.getvalue()).decode().replace('=', '%3D')