Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import praw
- r = praw.Reddit(client_id='<removed>',
- client_secret="<removed>",
- password = "<Removed>",
- user_agent='/u/Omegaxysgaming, Bot for combining /r/showerthoughts and /r/earthporn posts',
- username = "STPlusEarthPornBot")
- def main():
- Quotes = r.subreddit("Showerthoughts")
- for submission in Quotes.get_hot():
- print(submission.title)
- main()
- Result:
- Traceback (most recent call last):
- File "/Users/drubertcaramon/PycharmProjects/untitled/Main", line 8, in <module>
- print(r.user.me())
- File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/praw/models/user.py", line 60, in me
- user_data = self._reddit.get(API_PATH['me'])
- File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/praw/reddit.py", line 320, in get
- data = self.request('GET', path, params=params)
- File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/praw/reddit.py", line 404, in request
- params=params)
- File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/prawcore/sessions.py", line 135, in request
- self._authorizer.refresh()
- File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/prawcore/auth.py", line 328, in refresh
- password=self._password)
- File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/prawcore/auth.py", line 138, in _request_token
- response = self._authenticator._post(url, **data)
- File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/prawcore/auth.py", line 31, in _post
- raise ResponseException(response)
- prawcore.exceptions.ResponseException: received 403 HTTP response
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement