hongtaocai / googlefinance

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

EndPoint in your example GetQuotes not working. #48

Closed hgarcia101685 closed 3 years ago

hgarcia101685 commented 4 years ago

I get a 403 error when trying to run your example:

print(json.dumps(getQuotes('F'), indent=2)) Traceback (most recent call last): File "<input>", line 1, in <module> File "C:\Users\meraz\AppData\Local\Programs\Python\Python36\lib\site-packages\googlefinance\__init__.py", line 70, in getQuotes content = json.loads(request(symbols)) File "C:\Users\meraz\AppData\Local\Programs\Python\Python36\lib\site-packages\googlefinance\__init__.py", line 33, in request resp = urlopen(req) File "C:\Users\meraz\AppData\Local\Programs\Python\Python36\lib\urllib\request.py", line 223, in urlopen return opener.open(url, data, timeout) File "C:\Users\meraz\AppData\Local\Programs\Python\Python36\lib\urllib\request.py", line 532, in open response = meth(req, response) File "C:\Users\meraz\AppData\Local\Programs\Python\Python36\lib\urllib\request.py", line 642, in http_response 'http', request, response, code, msg, hdrs) File "C:\Users\meraz\AppData\Local\Programs\Python\Python36\lib\urllib\request.py", line 570, in error return self._call_chain(*args) File "C:\Users\meraz\AppData\Local\Programs\Python\Python36\lib\urllib\request.py", line 504, in _call_chain result = func(*args) File "C:\Users\meraz\AppData\Local\Programs\Python\Python36\lib\urllib\request.py", line 650, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 403: Forbidden

hongtaocai commented 4 years ago

See readme

roshanreji92 commented 3 years ago

I am not certain as to what in the readme I am missing. I am facing the same error.

addisonlynch commented 3 years ago

@roshanreji92 from the readme:

Please note that Google has closed this endpoint -- so the module may not work properly

hgarcia101685 commented 3 years ago

Yes. Apologies for not following up with this sooner. The endpoint will not work anymore. Closing issue.