Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- reddit.subreddit(sub_reddit).flair.set('bboe', 'bahissiteleri flair')
- import praw
- sub_reddit = 'bahissiteleri' #this is the subreddit you are posting to.
- post_title = 'Check' # this is the post title
- post_body = "check" # this is the post text/body
- reddit = praw.Reddit(
- client_id='id',
- client_secret='secret',
- username='username',
- password='password',
- user_agent="Agent to post")
- def authenticate(reddit):
- print(reddit.user.me())
- def self_post():
- # try:
- # post = reddit.subreddit(sub_reddit).submit(title=post_title, selftext=post_body)
- # reddit.subreddit(sub_reddit).flair.set('bboe', '')
- sub=reddit.subreddit(sub_reddit)
- post = sub.submit(title=post_title, selftext=post_body)
- reddit.subreddit(sub_reddit).flair.set('bboe', 'bahissiteleri flair')
- print("DONE")
- if __name__ == '__main__':
- authenticate(reddit)
- self_post()
Add Comment
Please, Sign In to add comment