This commit is contained in:
Frisk 2018-09-30 18:06:14 +02:00
parent 58a3f0b0f7
commit e6523e3a96
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)
elif not self.recent_href.startswith("https"):
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):
if self.recent_href:
self.new_string = self.new_string+"[{}]({})".format(data, self.recent_href)