1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-17 17:42:20 +03:00

Gets plugins/edsy.py working. The usual string vs. bytes shenanigans.

This commit is contained in:
Athanasius 2019-09-11 17:49:33 +01:00
parent 14d6d353a8
commit 7be0c76986

View File

@ -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')