Python URL错误:<;urlopen错误[Errno 8]未提供节点名或服务名,或未知>;

Python URL错误:<;urlopen错误[Errno 8]未提供节点名或服务名,或未知>;,python,python-2.7,yahoo-finance,Python,Python 2.7,Yahoo Finance,运行此代码时,我收到一个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:",y

运行此代码时,我收到一个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()

错误-请帮我解决这个问题

URLError: <urlopen error [Errno 8] nodename nor servname provided, or not known>
URLError:

雅虎长期提供EOD金融数据服务,但早在2017年就被终止了。您可能希望通过其他方式检索此信息,例如使用。

雅虎长期提供EOD金融数据服务,但该服务在2017年终止。您可能需要检查其他方法来检索此信息,例如使用。

此代码不直接调用
urlopen()
,因此错误一定发生在您未向我们展示的代码中的其他地方。这是我正在运行的唯一代码,其他什么都没有。您确定这不是internet连接错误吗?也许你配置的水蟒设置错误。你也可以试试。可以从Yahoo Finance前端获取历史数据以及您可以想象到的任何其他内容。此代码不直接调用
urlopen()
,因此错误一定发生在您未向我们展示的代码中的其他地方。这是我正在运行的唯一代码,没有其他内容。您确定这不是internet连接错误吗?也许你配置的水蟒设置错误。你也可以试试。可以从Yahoo Finance前端获取历史数据以及您可以想象的任何其他数据。