Python Forum
Downloading data from Yahoo finance
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Downloading data from Yahoo finance
#1
Dear Python Users,

I want to download a stock data from yahoo finance (or nasdaq.com) and use the following code. However, once I run it it gives the following message:

"ConnectionError: HTTPConnectionPool(host='ichart.finance.yahoo.com', port=80): Max retries exceeded with url: /table.csv?s=AMZN&a=8&b=1&c=2016&d=3&e=1&f=2017&g=d&ignore=.csv (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x000000ECDE8A4A58>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',))"

Please, help me to identify the issue.

from pandas_datareader import data as dreader
symbols = ['AMZN']
pnls = {i:dreader.DataReader(i,'yahoo','2016-09-01','2017-04-01') for i in symbols}
print(pnls.get('AMZN').head())
Reply


Messages In This Thread
Downloading data from Yahoo finance - by Alberto - Jun-25-2017, 02:26 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Yahoo Premium pogere 1 1,328 Jun-01-2022, 11:42 AM
Last Post: pogere
  Downloading CSV from a website bmiller12 4 4,057 Dec-07-2020, 09:29 PM
Last Post: Larz60+
  Finance projet - Any Volunteers?? Houssam 2 2,827 Apr-13-2020, 07:14 PM
Last Post: Houssam
  IDE for Finance TIME SERIES Data Trader2013 2 91,588 Jan-19-2020, 04:44 PM
Last Post: danielgoldfarb
  Read csv file from Yahoo Finance ian 3 4,786 Sep-22-2019, 06:47 AM
Last Post: ndc85430
  1 I cant read many stocks(list) with pandas-datareader from yahoo Davidii111 1 5,025 Dec-27-2017, 04:47 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020