Comments (10)
Updates have now been pushed to PyPI - the latest version is 0.8.9. Thank you to everyone for alerting and helping with the issue!
from yahoo_fin.
Ran into the same problem. Looks like yahoo is blocking based on useragent.
You can change the code to:
tables = pd.read_html(requests.get(site, headers={'User-agent': 'Mozilla/5.0'}).text)
Just remember to include import requests
at the top of the file.
I looked at the latest version in master
, and that is not the same code that i have installed via pip, otherwise i would have created a pull request.
It would be great to be able to specify the useragent in the get_options_chain()
call itself. If you'd like me to do a PR to the existing code i'd be happy to when i find time.
from yahoo_fin.
Same here. Seems like it fails at this step:
tables = pd.read_html(site)
Not sure if Yahoo changed the page layout or is it an update of some involved modules?
from yahoo_fin.
same issue
urllib.error.HTTPError: HTTP Error 404: Not Found
from yahoo_fin.
I'm looking into it. It seems to be a change in Yahoo Finance. In the meantime, you should be able to pull most of the data from si.get_quote_table using si.get_quote_data, instead.
from yahoo_fin.
@Caesurus Thanks a lot! I merged the request. I'll push an update to the PyPI version in the next few days.
from yahoo_fin.
Absolutely a pleasure. Thanks for maintaining the module, It's been great using it. So i appreciate it.
from yahoo_fin.
Was just looking through the code and you may need something similar in get_expiration_dates()
since that looks like it's doing a .get()
as well.
from yahoo_fin.
@Caesurus @atreadw1492 thank you guys. Can you please also update the function si.get_quote_table
?
from yahoo_fin.
@ywluohao Yes, just pushed changes to the other functions (including si.get_quote_table) affected to the master branch. I will push the updated version to PyPI after doing additional testing.
from yahoo_fin.
Related Issues (20)
- Problem in get_earnings_history HOT 2
- How to export data into csv file ? HOT 1
- problem with get_income_data HOT 2
- How to add yahoo_fin to a project in pycharm
- Exceptions since last Yahoo updates HOT 4
- stock_info.tickers_sp500() returning strings of underscores HOT 4
- tickers_sp500() ERROR: ssl.SSLCertVerificationError HOT 1
- get_quote_data() - Invalid response from server HOT 1
- Issue with get_day_gainers() HOT 1
- get_quote_table -> error 'DataFrame' object has no attribute 'append' HOT 2
- OperationalError: unable to open database file
- 'get_financials' is not fetching the latest data for some companies
- Undocument raw parameter in get_options_chain trigger exception
- Deprecated use of frame.append method
- How get balance sheet currency
- Include multi-year data in Income Statement method
- get_balance_sheet() return empty dataframe
- get_income_statement: string indices must be integers HOT 9
- get_earnings_for_date() Always Fails Now HOT 6
- get_balance_sheet doesn't return any data HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yahoo_fin.