From 691263b066965124b7635d971d7282ac46f0b1a9 Mon Sep 17 00:00:00 2001 From: Markus Date: Tue, 5 Feb 2019 21:14:17 +0000 Subject: [PATCH 1/3] Avoid cache for uploaded images --- rcgcdw.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rcgcdw.py b/rcgcdw.py index 611c22b..5073b43 100644 --- a/rcgcdw.py +++ b/rcgcdw.py @@ -202,7 +202,7 @@ def webhook_formatter(action, STATIC, **params): logging.debug(urls) if "-1" not in urls: # oage removed before we asked for it img_info = next(iter(urls.values()))["imageinfo"] - embed["image"]["url"] = img_info[0]["url"] + embed["image"]["url"] = img_info[0]["url"] + "?version=" + "".join([x for x in img_info[0]["timestamp"] if x.isdigit()]) additional_info_retrieved = True else: pass From 662d30fd4f1cb0a52eff4e8edfab370a20a4711d Mon Sep 17 00:00:00 2001 From: Markus Date: Tue, 5 Feb 2019 21:40:42 +0000 Subject: [PATCH 2/3] added comment --- rcgcdw.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rcgcdw.py b/rcgcdw.py index 5073b43..0d4e757 100644 --- a/rcgcdw.py +++ b/rcgcdw.py @@ -200,9 +200,9 @@ def webhook_formatter(action, STATIC, **params): additional_info_retrieved = False if urls is not None: logging.debug(urls) - if "-1" not in urls: # oage removed before we asked for it + if "-1" not in urls: # page removed before we asked for it img_info = next(iter(urls.values()))["imageinfo"] - embed["image"]["url"] = img_info[0]["url"] + "?version=" + "".join([x for x in img_info[0]["timestamp"] if x.isdigit()]) + embed["image"]["url"] = img_info[0]["url"] + "?version=" + "".join([x for x in img_info[0]["timestamp"] if x.isdigit()]) # prevent image from being cached additional_info_retrieved = True else: pass From 55c559a15dc1ea21d416c4b82ca8e7a01a4d6008 Mon Sep 17 00:00:00 2001 From: Frisk Date: Tue, 5 Feb 2019 23:48:43 +0100 Subject: [PATCH 3/3] Bump version --- settings.json.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings.json.example b/settings.json.example index 145b7c2..6f8ea66 100644 --- a/settings.json.example +++ b/settings.json.example @@ -3,7 +3,7 @@ "wiki": "minecraft", "lang": "en", "header": { - "user-agent": "FrisksRcGcDw/1.5" + "user-agent": "FrisksRcGcDw/1.5.1" }, "limit": 11, "webhookURL": "https://discordapp.com/api/webhooks/111111111111111111/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",