ITADN

It does not upvote a specified post, upvotes appear in the account but the number does not increase

#2059OpenMucahitakin 创建于 2025-03-27
M
Mucahitakincommented
### Describe the Bug It does not upvote a specified post, upvotes appear in the account but the number does not increase code : import praw reddit = praw.Reddit( client_id="*", client_secret="*", username="*", password="*", user_agent="MyRedditBot/0.1" ) post_id = '{post_id_here}' post = reddit.submission(id=post_id) post.comments.replace_more(limit=0) for comment in post.comments.list(): try: previous_vote = 'Upvoted' if comment.upvoted else 'Not Upvoted' comment.upvote() current_vote = 'Upvoted' if comment.upvoted else 'Not Upvoted' print(f"Comment ID: {comment.id} - Previous Vote: {previous_vote} - Current Vote: {current_vote}") except Exception as e: print(f"Error upvoting comment {comment.id}: {str(e)}") ### Desired Result It was working until last week and now it's not working. ### Code to reproduce the bug ```Python It does not upvote a specified post, upvotes appear in the account but the number does not increase code : import praw reddit = praw.Reddit( client_id="*", client_secret="*", username="*", password="*", user_agent="MyRedditBot/0.1" ) post_id = '{post_id_here}' post = reddit.submission(id=post_id) post.comments.replace_more(limit=0) for comment in post.comments.list(): try: previous_vote = 'Upvoted' if comment.upvoted else 'Not Upvoted' comment.upvote() current_vote = 'Upvoted' if comment.upvoted else 'Not Upvoted' print(f"Comment ID: {comment.id} - Previous Vote: {previous_vote} - Current Vote: {current_vote}") except Exception as e: print(f"Error upvoting comment {comment.id}: {str(e)}") ``` ### My code does not include sensitive credentials - [x] Yes, I have removed sensitive credentials from my code. ### Relevant Logs ```Shell xx ``` ### This code has previously worked as intended I'm not sure, I haven't used this code before. ### Operating System/Environment xx ### Python Version 3.12 ### PRAW Version last ### Links, references, and/or additional comments? _No response_
1 条评论