1
00:00:00,120 --> 00:00:04,920
In this video, we will create a new post via Python.

2
00:00:05,730 --> 00:00:07,620
So for that, I have read it.

3
00:00:07,920 --> 00:00:12,480
Object instance and a subreddits object instance as well.

4
00:00:12,900 --> 00:00:18,570
This time, I'm going to use this subreddit to create a new post here.

5
00:00:18,720 --> 00:00:20,600
It's called pythons and lots.

6
00:00:20,610 --> 00:00:25,470
It's a subreddit where people can post through their bots.

7
00:00:26,010 --> 00:00:31,400
So you can also do this with other subreddits, such as with glassblowing subreddit.

8
00:00:31,410 --> 00:00:40,950
But let's be a good citizen and post in these subreddits here, which is designed to post these kinds

9
00:00:40,950 --> 00:00:42,570
of test submissions.

10
00:00:42,570 --> 00:00:43,230
So to see.

11
00:00:44,190 --> 00:00:49,740
So pythons and a lot, that is what you have to answer in here.

12
00:00:51,360 --> 00:00:55,320
And lots, pythons and lots, that is the subreddits.

13
00:00:55,560 --> 00:01:07,380
Now let's prepare a title for the new post, such as This is my new Python bot submission.

14
00:01:09,420 --> 00:01:19,290
And the contents will be something like, hey, I'm just throwing out Python actually oats just to make

15
00:01:19,290 --> 00:01:22,050
this a multi line string.

16
00:01:22,330 --> 00:01:24,490
So three double codes there.

17
00:01:25,370 --> 00:01:26,220
Delete that.

18
00:01:26,580 --> 00:01:28,470
Three double quotes in here.

19
00:01:28,740 --> 00:01:30,330
Hey, I'm just throwing out Python.

20
00:01:31,380 --> 00:01:33,990
This is my first post.

21
00:01:35,130 --> 00:01:42,630
Then the way to do a submission is by referring to the subreddits where you want to submit and then

22
00:01:42,630 --> 00:01:45,810
use the submit method with title.

23
00:01:47,590 --> 00:01:49,090
And content.

24
00:01:50,890 --> 00:01:57,700
Or you could also say title equals a title and self text equals two content.

25
00:01:58,390 --> 00:02:05,230
So the first argument is title of the second is self text that is content, and that's the title of

26
00:02:05,230 --> 00:02:05,500
the year.

27
00:02:05,500 --> 00:02:06,580
Is this title here?

28
00:02:07,090 --> 00:02:07,720
And that's it.

29
00:02:07,810 --> 00:02:08,650
So just run.

30
00:02:13,110 --> 00:02:17,190
Now, let's ignore this error at the moment and just check for our submission.

31
00:02:17,400 --> 00:02:18,900
So all the reload this.

32
00:02:20,030 --> 00:02:25,580
Page and go to new to filter by new posts.

33
00:02:26,900 --> 00:02:31,870
And if you still don't see your posts, you should go to your profile.

34
00:02:34,670 --> 00:02:42,920
And see the new posts in there, so yeah, this is my post in Python and Lots, so it could take a while

35
00:02:42,920 --> 00:02:45,800
until your post is shown on the subreddit.

36
00:02:47,340 --> 00:02:53,040
Now, if you want to get rid of this error message, you should do what this is suggesting.

37
00:02:53,190 --> 00:02:56,700
So set ready to validate and submit to True.

38
00:02:57,950 --> 00:03:11,840
So under the declaration of war, the subreddits, then you see subreddits that validate or submit through

39
00:03:12,590 --> 00:03:17,210
or run again, this will post the same posts.

40
00:03:17,780 --> 00:03:23,840
But it didn't happen because you see what we get looks like you've been doing events a lot.

41
00:03:24,020 --> 00:03:26,660
Take a break for 12 minutes before trying again.

42
00:03:27,680 --> 00:03:32,560
So, all right, it does have a limit on how often you can post.

43
00:03:32,720 --> 00:03:40,790
You can create new submissions on subreddits, so they do this to avoid abuse with their websites.

44
00:03:41,210 --> 00:03:46,190
So that is a limitation that you need to consider when working with Redis.

45
00:03:46,610 --> 00:03:49,520
As you see, in this case, we have to wait 12 minutes.

46
00:03:50,030 --> 00:03:56,870
So anyway, that is the code to create new submissions on Reddit's next, I'll show you how to create

47
00:03:56,870 --> 00:04:02,390
new comments, how to reply in existing submissions and existing posts.

48
00:04:02,600 --> 00:04:03,840
So see you in the next videos.

