Advertisement
Guest User

Untitled

a guest
Mar 14th, 2017
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. import praw
  2. r = praw.Reddit(client_id='<removed>',
  3. client_secret="<removed>",
  4. password = "<Removed>",
  5. user_agent='/u/Omegaxysgaming, Bot for combining /r/showerthoughts and /r/earthporn posts',
  6. username = "STPlusEarthPornBot")
  7.  
  8. def main():
  9. Quotes = r.subreddit("Showerthoughts")
  10. for submission in Quotes.get_hot():
  11. print(submission.title)
  12.  
  13. main()
  14.  
  15. Result:
  16. Traceback (most recent call last):
  17. File "/Users/drubertcaramon/PycharmProjects/untitled/Main", line 8, in <module>
  18. print(r.user.me())
  19. File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/praw/models/user.py", line 60, in me
  20. user_data = self._reddit.get(API_PATH['me'])
  21. File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/praw/reddit.py", line 320, in get
  22. data = self.request('GET', path, params=params)
  23. File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/praw/reddit.py", line 404, in request
  24. params=params)
  25. File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/prawcore/sessions.py", line 135, in request
  26. self._authorizer.refresh()
  27. File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/prawcore/auth.py", line 328, in refresh
  28. password=self._password)
  29. File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/prawcore/auth.py", line 138, in _request_token
  30. response = self._authenticator._post(url, **data)
  31. File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/prawcore/auth.py", line 31, in _post
  32. raise ResponseException(response)
  33. prawcore.exceptions.ResponseException: received 403 HTTP response
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement