def __init__(self, **kwargs): self.country = kwargs.get('country', 'united states').lower() self.formatted = kwargs.pop('formatted', False) self.session = _init_session(kwargs.pop('session', None), **kwargs) self.crumb = kwargs.pop('crumb', None) if kwargs.get('username') and kwargs.get('password'): self.login(kwargs.get('username'), kwargs.get('password'))
def __init__(self, **kwargs): for k, v in self.DEFAULT_QUERY_PARAMS.items(): self.DEFAULT_QUERY_PARAMS[k] = kwargs.pop(k, v) self.formatted = kwargs.pop('formatted', False) self.session = _init_session(kwargs.pop('session', None), **kwargs) self.crumb = kwargs.pop('crumb', None) if kwargs.get('username') and kwargs.get('password'): self.login(kwargs.get('username'), kwargs.get('password'))
def __init__(self, **kwargs): self.country = kwargs.get("country", "united states").lower() self.formatted = kwargs.pop("formatted", False) self.session = _init_session(kwargs.pop("session", None), **kwargs) self.crumb = kwargs.pop("crumb", None) self.progress = kwargs.pop("progress", False) username = os.getenv("YF_USERNAME") or kwargs.get("username") password = os.getenv("YF_PASSWORD") or kwargs.get("password") if username and password: self.login(username, password)