mirror of
https://gitlab.com/chicken-riders/RcGcDb.git
synced 2025-02-23 00:54:09 +00:00
Added fallback for case where WIKI_ARTICLE_PATH in client is not known at time of create_article_path function execution
This commit is contained in:
parent
8bd861b84c
commit
09fcfcb070
|
@ -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"""
|
||||
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):
|
||||
|
|
Loading…
Reference in a new issue