(~) % python prologic.py Wed 2 12:38PM lake
Traceback (most recent call last):
File "/home/hecanjog/prologic.py", line 3, in <module>
with urllib.request.urlopen('https://twtxt.net/user/prologic/twtxt.txt') as conn:
File "/home/hecanjog/.pyenv/versions/3.9.9/lib/python3.9/urllib/request.py", line 214, in urlopen
return opener.open(url, data, timeout)
File "/home/hecanjog/.pyenv/versions/3.9.9/lib/python3.9/urllib/request.py", line 523, in open
response = meth(req, response)
File "/home/hecanjog/.pyenv/versions/3.9.9/lib/python3.9/urllib/request.py", line 632, in http_response
response = self.parent.error(
File "/home/hecanjog/.pyenv/versions/3.9.9/lib/python3.9/urllib/request.py", line 561, in error
return self._call_chain(*args)
File "/home/hecanjog/.pyenv/versions/3.9.9/lib/python3.9/urllib/request.py", line 494, in _call_chain
result = func(*args)
File "/home/hecanjog/.pyenv/versions/3.9.9/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 403: Forbidden
zsh: exit 1 python prologic.py
403 example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib.request | |
with urllib.request.urlopen('https://twtxt.net/user/prologic/twtxt.txt') as conn: | |
feed = conn.read().decode('utf-8') | |
print(feed) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment