mirror of
https://gitlab.com/chicken-riders/RcGcDw.git
synced 2025-02-23 00:24:09 +00:00
Fixed possible issue with linking to interwiki
This commit is contained in:
parent
b8b7d8ac56
commit
c95f99a5df
|
@ -49,7 +49,9 @@ class MyHTMLParser(HTMLParser):
|
||||||
for attr in attrs:
|
for attr in attrs:
|
||||||
if attr[0] == 'href':
|
if attr[0] == 'href':
|
||||||
self.recent_href=attr[1]
|
self.recent_href=attr[1]
|
||||||
if not self.recent_href.startswith("https"):
|
if self.recent_href.startswith("//"):
|
||||||
|
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 = "https://{wiki}.gamepedia.com".format(wiki=settings["wiki"]) + self.recent_href
|
||||||
def handle_data(self, data):
|
def handle_data(self, data):
|
||||||
if self.recent_href:
|
if self.recent_href:
|
||||||
|
|
Loading…
Reference in a new issue