From ad55b0f423b247b86ccc1058c577b4d7773f5493 Mon Sep 17 00:00:00 2001 From: Frisk Date: Tue, 25 Dec 2018 11:27:21 +0100 Subject: [PATCH] Fixes and more debug --- rcgcdw.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rcgcdw.py b/rcgcdw.py index f58404e..b1f9d55 100644 --- a/rcgcdw.py +++ b/rcgcdw.py @@ -55,7 +55,7 @@ class LinkParser(HTMLParser): self.recent_href = attr[1] if self.recent_href.startswith("//"): self.recent_href = "https:{rest}".format(rest=self.recent_href) - elif not self.recent_href.startswith("https"): + elif not self.recent_href.startswith("http"): self.recent_href = "https://{wiki}.gamepedia.com".format(wiki=settings["wiki"]) + self.recent_href self.recent_href = self.recent_href.replace(")", "\\)") @@ -191,6 +191,7 @@ def webhook_formatter(action, STATIC, **params): article=params["title"].replace(" ", "_")) additional_info_retrieved = False if urls is not None: + 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"]