ystock icon indicating copy to clipboard operation
ystock copied to clipboard

SocketError: Failed to open TCP connection to download.finance.yahoo.com:80

Open Victorcorcos opened this issue 3 years ago • 2 comments

Steps to reproduce 🦮

  1. Add gem "ystock", "~> 0.4.14" to Gemfile
  2. bundle install
  3. rails c
  4. execute this...
Ystock.quote("aapl")

The result 🪲

SocketError: Failed to open TCP connection to download.finance.yahoo.com:80 (getaddrinfo: nodename nor servname provided, or not known)
from /Users/victorcosta/.rvm/rubies/ruby-2.5.5/lib/ruby/2.5.0/net/http.rb:939:in `rescue in block in connect'
Caused by SocketError: getaddrinfo: nodename nor servname provided, or not known
from /Users/victorcosta/.rvm/rubies/ruby-2.5.5/lib/ruby/2.5.0/net/http.rb:937:in `initialize'

Victorcorcos avatar Jun 20 '21 07:06 Victorcorcos

Yahoo deprecated the API - this gem just no longer works because the API can no longer be publicly queried. You might be able to do it by starting a session on the web page, but this gem is set up for the old way the API worked.

wakproductions avatar Jun 20 '21 07:06 wakproductions

@wakproductions Yeah! I noticed this

Too bad 😢 At least 30 gems are deprecated now!

I'm investigating here to see if there is at least one gem alive that can fetch stocks data on the Stock Market... 😆

  • Deprecated gems
  1. https://github.com/tyrauber/stock_quote ❗ (Need to pay)
  2. https://github.com/ankit8898/highstocks-rails ❓(email sent)
  3. https://github.com/timknight/stock_grabber ❌
  4. https://rubygems.org/gems/bovespa-prices ❌
  5. https://github.com/hamorim/bovesparb ❌
  6. https://github.com/KlotzAndrew/yafa ❌
  7. https://github.com/cpankaj/yquotes ❌
  8. https://github.com/whitethunder/ticker_fetcher ❌
  9. https://www.rubydoc.info/gems/yahoofinance-symbolsuggest/0.1.0 ❌
  10. https://github.com/tmb41/tylor-cli-gem ❌
  11. https://github.com/pjlegato/yahoofinance-typhoeus ❌
  12. https://www.rubydoc.info/gems/yahoo_finance_2/1.0.0 ❌
  13. https://rubygems.org/gems/gstock ❌
  14. https://github.com/dansimpson/ticker ❌
  15. https://github.com/Swimminschrage/edgar-stocks ❌
  16. https://github.com/nizardhamani/quotes ❌
  17. https://rubygems.org/gems/stocks ❌
  18. https://github.com/gregwinn/ystock ❌
  19. https://rubygems.org/gems/equities ❌
  20. https://github.com/tbloncar/stock_quote_cli ❌
  21. https://github.com/craft-machine/stock_markets ❌
  22. https://github.com/unieagle/stock_history ❌
  23. https://github.com/brujeo/stock_recommendation ❌
  24. https://github.com/nas/yahoo_stock ❌
  25. https://github.com/seixasfelipe/bovespa-ingestion ❌
  26. https://github.com/alegomes/bovespa ❌
  27. https://github.com/pirelenito/bovespa_historical ❌
  28. http://www.transparentech.com/projects/yahoofinance ❌
  29. https://github.com/ShallmentMo/ruby_backtest ❌

Victorcorcos avatar Jun 20 '21 08:06 Victorcorcos