diff --git a/src/api/client.py b/src/api/client.py index 9f48085..0ec6b51 100644 --- a/src/api/client.py +++ b/src/api/client.py @@ -81,7 +81,13 @@ class Client: def create_article_path(self, article: str) -> str: """Takes the string and creates an URL with it as the article name""" - return self.WIKI_ARTICLE_PATH.replace("$1", article) + try: + return self.WIKI_ARTICLE_PATH.replace("$1", article) + except AttributeError: # Provide fallback. This has been especially noticed with Fandom where discussion check is faster than regular wiki check + if self.__recent_changes.domain.name == "fandom.com": + return self.WIKI_SCRIPT_PATH + "wiki/" + article + else: + return self.WIKI_SCRIPT_PATH + "w/" + article @property def last_request(self):