Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP 404 error #59

Open
Richard238 opened this issue Feb 5, 2022 · 0 comments
Open

HTTP 404 error #59

Richard238 opened this issue Feb 5, 2022 · 0 comments

Comments

@Richard238
Copy link

Getting HTTP 404 error from this module
Running on Pi Zero 2W OS = Bullseye


Traceback (most recent call last):
  File "/home/pi/stockq2.py", line 3, in <module>
    print(ystockquote.get_price_book('GOOGL'))
  File "/usr/local/lib/python3.9/dist-packages/ystockquote.py", line 438, in get_price_book
    return _request(symbol, 'p6')
  File "/usr/local/lib/python3.9/dist-packages/ystockquote.py", line 32, in _request
    resp = urlopen(req)
  File "/usr/lib/python3.9/urllib/request.py", line 214, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.9/urllib/request.py", line 523, in open
    response = meth(req, response)
  File "/usr/lib/python3.9/urllib/request.py", line 632, in http_response
    response = self.parent.error(
  File "/usr/lib/python3.9/urllib/request.py", line 555, in error
    result = self._call_chain(*args)
  File "/usr/lib/python3.9/urllib/request.py", line 494, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.9/urllib/request.py", line 747, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/usr/lib/python3.9/urllib/request.py", line 523, in open
    response = meth(req, response)
  File "/usr/lib/python3.9/urllib/request.py", line 632, in http_response
    response = self.parent.error(
  File "/usr/lib/python3.9/urllib/request.py", line 561, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.9/urllib/request.py", line 494, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.9/urllib/request.py", line 641, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found

I wonder if perhaps, the URLs are outdated?

 url = 'http://finance.yahoo.com/d/quotes.csv?s=%s&f=%s'
 url = 'http://real-chart.finance.yahoo.com/table.csv?%s'

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant