From f74835f9ffdc935ec78b73dfc5c30d80ccce141a Mon Sep 17 00:00:00 2001 From: Rnhmjoj Date: Wed, 3 Dec 2014 20:47:25 +0100 Subject: [PATCH] Another encoding issue I hope this is the last one. --- pirate-get.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pirate-get.py b/pirate-get.py index 3da1af8..7b3f919 100755 --- a/pirate-get.py +++ b/pirate-get.py @@ -445,7 +445,7 @@ def main(): if f.info().get('Content-Encoding') == 'gzip': f = gzip.GzipFile(fileobj=BytesIO(f.read())) - res = f.read().replace(" ", " ") + res = f.read().decode('utf-8').replace(" ", " ") files = re.findall(r"\s*([^<]+?)\s*\s*([^<]+?)\s*", res) name = re.search("dn=([^\&]*)", mags[int(link)][0])