hongtaocai / googlefinance

Python module to get real-time stock data from Google Finance API
MIT License
709 stars 172 forks source link

Not Found #40

Open Fulvioo opened 6 years ago

Fulvioo commented 6 years ago

Hello, I have just installed Google Finance (I was previously using the Yahoo's equivalent, that is not working anymore), but all my tries (just merely following your ##Usage example ) are giving the same kind of error:

runfile('Shares_Downloader_MIB40_dev.py', wdir='/ftmib40')
Traceback (most recent call last):

  File "<ipython-input-18-ec8e138cfcad>", line 1, in <module>
    runfile('Shares_Downloader_MIB40_dev.py', wdir='/ftmib40')

  File "sitecustomize.py", line 710, in runfile
    execfile(filename, namespace)

  File "sitecustomize.py", line 101, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)

  File "Shares_Downloader_MIB40_dev.py", line 11, in <module>
    quotes = getQuotes('AAPL')

  File "\googlefinance\__init__.py", line 70, in getQuotes
    content = json.loads(request(symbols))

  File "\googlefinance\__init__.py", line 33, in request
    resp = urlopen(req)

  File "request.py", line 223, in urlopen
    return opener.open(url, data, timeout)

  File "request.py", line 532, in open
    response = meth(req, response)

  File "\request.py", line 642, in http_response
    'http', request, response, code, msg, hdrs)

  File "request.py", line 570, in error
    return self._call_chain(*args)

  File "request.py", line 504, in _call_chain
    result = func(*args)

  File "request.py", line 650, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)

HTTPError: Not Found

Any idea?

p.s. I have also tried with 'https' , but that's not changing

scotthernandez commented 6 years ago

This looks like a dup of #39; the api endpoint has changed/gone.

addisonlynch commented 6 years ago

Would recommend IEX as an alternative. Here's a similar Python wrapper for it.