Code Monkey home page Code Monkey logo

Comments (10)

atreadw1492 avatar atreadw1492 commented on July 28, 2024 3

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.

Caesurus avatar Caesurus commented on July 28, 2024 2

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.

Vorotori avatar Vorotori commented on July 28, 2024

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.

hanseopark avatar hanseopark commented on July 28, 2024

same issue
urllib.error.HTTPError: HTTP Error 404: Not Found

from yahoo_fin.

atreadw1492 avatar atreadw1492 commented on July 28, 2024

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.

atreadw1492 avatar atreadw1492 commented on July 28, 2024

@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.

Caesurus avatar Caesurus commented on July 28, 2024

Absolutely a pleasure. Thanks for maintaining the module, It's been great using it. So i appreciate it.

from yahoo_fin.

Caesurus avatar Caesurus commented on July 28, 2024

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.

ywluohao avatar ywluohao commented on July 28, 2024

@Caesurus @atreadw1492 thank you guys. Can you please also update the function si.get_quote_table?

from yahoo_fin.

atreadw1492 avatar atreadw1492 commented on July 28, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.