Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Login #2254

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

Conversation

dhruvan2006
Copy link
Contributor

New Auth class that allows for login functionality by settings cookies.

import yfinance as yf

auth = yf.Auth()
auth.set_login_cookies(os.getenv("COOKIE_T"), os.getenv("COOKIE_Y"))
auth.check_login()
auth.user

Inspired by #2220

Copy link
Contributor

@R5dan R5dan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any way to let the user just put in there username and password and send a request to yahoo to verify?

return False
except Exception as e:
print(f"Error confirming login: {e}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want to change this to logging

@ValueRaider
Copy link
Collaborator

Wait for me to review and merge #2216, might make more sense to combine with config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants