def __init__(self, user, password, wiki_family: str, language_domain: str, dry_run: bool) -> None: """ Constructor. @param user: Username to login to the wiki @param password: Password to log into the account @param wiki_family: The "family" of the wiki. This is the domain name of the wiki (e.g. 'wiktionary') @param language_domain: The "language" of the wiki (e.g. 'fr', 'en', etc.) """ self.API_ENDPOINT = f"https://{language_domain}.{wiki_family}.org/w/api.php" self.api = pywiki.Pywiki(user, password, self.API_ENDPOINT, "user", dry_run) self.language_domain = language_domain
def __init__(self, user, password): self.user = user self.password = password self.api = pywiki.Pywiki(user, password, API_ENDPOINT, "user") self.dry_run = False