Fix reddit plugin
authorJack Miller <jack@codezen.org>
Wed, 8 Feb 2012 02:47:15 +0000 (20:47 -0600)
committerJack Miller <jack@codezen.org>
Wed, 8 Feb 2012 02:47:15 +0000 (20:47 -0600)
Signed-off-by: Jack Miller <jack@codezen.org>
plugins/reddit.py

index 1c8564e..b2df2ff 100644 (file)
@@ -81,7 +81,7 @@ class RedditFetchJSON(DaemonFetchThreadPlugin):
                     response = urllib.request.urlopen(\
                             "http://reddit.com/by_id/t3_" + reddit_id + ".json")
 
-                    r = json.load(response)
+                    r = json.loads(response.read().decode())
                     entry["reddit-json"] = r
                 except Exception as e:
                     log.error("Error fetching Reddit JSON: %s" % e)