Closed KenziTrader closed 1 year ago
Carnets and Pandas can open URLs, so I think your problem is specific to Yahoo Finance.
Looking at open issues in pandas_datareader, I see this one, which is very similar: https://github.com/pydata/pandas-datareader/issues/923 There is even a suggested fix:
FB = web.YahooOptions('FB')
FB.headers = {'User-Agent': 'Firefox'}
print(FB.expiry_dates)
Yes, thanks, setting the user agent works.
I try to read an options chain from yahoo finance with
pandas_datareader
. Reading the URL fails withb'Forbidden'
. I can open the URL in Safari.Do I need to do something special to give Carnets permission to open an URL?
Thanks, Rene