URLError:<urlopen error[Errno 8]提供了节点名或服务名,或未知>

2024-04-28 03:34:47 发布

您现在位置:Python中文网/ 问答频道 /正文

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

image

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

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

Tags: 代码inimporturlsharegetas错误