From 3a142e48102c620fe14db812be3016bb8e4dd5a5 Mon Sep 17 00:00:00 2001 From: Luke Rogers Date: Tue, 1 Oct 2013 02:37:00 +1300 Subject: [PATCH] final tweaks --- plugins/imgur.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/plugins/imgur.py b/plugins/imgur.py index 7a947d9..1e91db4 100644 --- a/plugins/imgur.py +++ b/plugins/imgur.py @@ -28,7 +28,7 @@ def imgur(inp): data = data["data"]["children"] random.shuffle(data) - # filter list to only have 10 imgur links + # filter list to only have imgur links filtered_posts = [i["data"] for i in data if is_valid(i["data"])] if not filtered_posts: @@ -48,7 +48,7 @@ def imgur(inp): url = album_api.format(match.group(2)) images = http.get_json(url, headers=headers)["data"] - # loop over the images in the gallery and add to the list + # loop over the images in the album and add to the list for image in images: items.append(image["id"]) @@ -56,13 +56,4 @@ def imgur(inp): # post is an image items.append(match.group(2)) - #post_data = { - # "ids": items, - # "title": "images from /r/{}/".format(inp) - #} - - #album = http.get("https://api.imgur.com/3/album/", post_data=post_data, get_method="post", headers=headers) - #pprint(album) - - return web.isgd("http://imgur.com/" + ','.join(items)) \ No newline at end of file