Skip to content

Commit c9f38a5

Browse files
committed
created first reddit bot
1 parent ef7a942 commit c9f38a5

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

reddit-bot.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import praw
2+
3+
reddit = praw.Reddit(
4+
client_id="S48YmERmER0pz0oKgfzn3Q",
5+
client_secret="GqRKs-RccRn5ckPzsjthtKoi3--paw",
6+
user_agent="myBot/0.0.1",
7+
)
8+
9+
reddit.user.me()
10+
11+
subreddit = reddit.subreddit("learnpython")
12+
for submission in subreddit.hot(limit=5):
13+
print(submission.title)
14+
15+
# for submission in subreddit.stream.submissions():
16+
# print(submission.title)

0 commit comments

Comments
 (0)