[英]URLError: <urlopen error [Errno 8] nodename nor servname provided, or not known>
I'm getting an URL Error when running this code -运行此代码时出现 URL 错误 -
import yahoo_finance as yf
yahoo = yf.Share('YHOO')
d=yahoo.get_historical('2014-05-19', '2014-05-20')
print "A week of stock daily quotations:"
for e in d:
print e
print "Info about the company:",yahoo.get_info()
print "Market capitalization in dollars:",yahoo.get_market_cap()
ERROR - Please Help me with this错误 - 请帮我解决这个问题
URLError: <urlopen error [Errno 8] nodename nor servname provided, or not known>
Yahoo provided the EOD financial data service for a long time but it was terminated back in 2017. You might want to check other ways to retrieve this information such as using https://pypi.org/project/yahoo-finance-api2/ .雅虎长期提供 EOD 财务数据服务,但早在 2017 年就终止了。您可能需要检查其他方法来检索此信息,例如使用https://pypi.org/project/yahoo-finance-api2/ 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.