dpguthrie / yahooquery

Python wrapper for an unofficial Yahoo Finance API
https://yahooquery.dpguthrie.com
MIT License
790 stars 139 forks source link

Unable to process primary functions like p_balance_sheet #303

Open srujantaticherla opened 5 days ago

srujantaticherla commented 5 days ago

Describe the bug A clear and concise description of what the bug is. I am trying to use premium credentials to call the procedures like p_balance_sheet. This does not work and returns errors like User is not logged in', 'aapl'

May be this is because the yahoo changed its credential check or something which we are not aware.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

It must provide the data from the procedure p_balance_sheet

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

Code below

from yahooquery import Ticker

symbols = ['fb', 'aapl', 'amzn', 'nflx', 'goog']

faang = Ticker(symbols, username='xxxxx@yahoo.com', password='xxxxx#')

income_statement = faang.p_income_statement('q') cash_flow = faang.p_cash_flow('q') balance_sheet = faang.p_balance_sheet('q')

company_360 = faang.p_company_360

vma = faang.p_valuation_measures('a') vmq = faang.p_valuation_measures('q') vmm = faang.p_valuation_measures('m')

print(vma)

We had tried both with VPN and without VPN. The machine is located physically in US. We had such a issue in the past with the same api call and when we logged off VPN it was working.

Now it does not work anymore and broke our code. Can you please help us here..?

srujantaticherla commented 5 days ago

Previous thread for the same issue is https://github.com/dpguthrie/yahooquery/issues/183

srujantaticherla commented 4 days ago

full error message now

Unable to login and/or retrieve the appropriate cookies. This is most likely due to Yahoo Finance instituting recaptcha, which this package does not support. {'fb': 'User is not logged in', 'aapl': 'User is not logged in', 'amzn': 'User is not logged in', 'nflx': 'User is not logged in', 'goog': 'User is not logged in'}

Process finished with exit code 0