This commit is contained in:
Frisk 2018-09-30 18:06:14 +02:00
parent c95f99a5df
commit 688d176a00
No known key found for this signature in database
GPG key ID: 0E9A7D3C0A01586C

View file

@ -53,6 +53,7 @@ class MyHTMLParser(HTMLParser):
self.recent_href = "https:{rest}".format(rest=self.recent_href) self.recent_href = "https:{rest}".format(rest=self.recent_href)
elif not self.recent_href.startswith("https"): elif not self.recent_href.startswith("https"):
self.recent_href = "https://{wiki}.gamepedia.com".format(wiki=settings["wiki"]) + self.recent_href self.recent_href = "https://{wiki}.gamepedia.com".format(wiki=settings["wiki"]) + self.recent_href
self.recent_href = self.recent_href.replace(")", "\)")
def handle_data(self, data): def handle_data(self, data):
if self.recent_href: if self.recent_href:
self.new_string = self.new_string+"[{}]({})".format(data, self.recent_href) self.new_string = self.new_string+"[{}]({})".format(data, self.recent_href)