Я новичок в кодировании и отстой.Я надеюсь найти помощь здесь.
Я играл с модулем praw для reddit и не смог заставить работать простую функцию upvote ().
Вот мой код:
import praw
r = praw.Reddit(client_id='**************',
client_secret='**************',
user_agent='**************',
username='**************',
password='***********')
r.submission('https://www.reddit.com/r/aww/comments/9znyf2/today_is_my_18th_birthday_everyone/').upvote()
И вот полная ошибка:
Traceback (most recent call last):
File "C:\Users\*****\Desktop\*****\*****\*****\*****\*****\A.py", line 11, in <module>
r.submission('https://www.reddit.com/r/aww/comments/9znyf2/today_is_my_18th_birthday_everyone/').upvote()
File "C:\Users\*****\AppData\Local\Programs\Python\Python37\lib\site-packages\praw\models\reddit\mixins\votable.py", line 80, in upvote
self._vote(direction=1)
File "C:\Users\*****\AppData\Local\Programs\Python\Python37\lib\site-packages\praw\models\reddit\mixins\votable.py", line 10, in _vote
'id': self.fullname})
File "C:\Users*****\AppData\Local\Programs\Python\Python37\lib\site-packages\praw\reddit.py", line 465, in post
params=params)
File "C:\Users\*****\AppData\Local\Programs\Python\Python37\lib\site-packages\praw\reddit.py", line 506, in request
params=params)
File "C:\Users\*****\AppData\Local\Programs\Python\Python37\lib\site-packages\prawcore\sessions.py", line 185, in request
params=params, url=url)
File "C:\Users\*****\AppData\Local\Programs\Python\Python37\lib\site-packages\prawcore\sessions.py", line 130, in _request_with_retries
raise self.STATUS_EXCEPTIONS[response.status_code](response)
prawcore.exceptions.NotFound: received 404 HTTP response