1
00:00:02,290 --> 00:00:10,390
In this video, I'll show you how to create a program which detects the change in the price of an Amazon

2
00:00:10,390 --> 00:00:17,290
product, and it sends out an email to your email address when the price changes.

3
00:00:19,310 --> 00:00:22,760
If you followed the previous video, you should be.

4
00:00:23,910 --> 00:00:25,650
Almost good to go.

5
00:00:25,920 --> 00:00:33,720
All you need to change is done here in the account as I.D. authentication token and client.

6
00:00:34,050 --> 00:00:40,350
So these lines were specific to the Smiths Notifier program.

7
00:00:40,530 --> 00:00:41,520
So you need to

8
00:00:43,860 --> 00:00:53,130
replace them with email parameters, which is a sensor and the receiver.

9
00:00:54,000 --> 00:01:00,060
So the email address from which the email will be sent out.

10
00:01:01,370 --> 00:01:08,800
And the receiver, which probably is your email address, so both should be your email address, actually.

11
00:01:09,080 --> 00:01:11,840
And this will work only for Gmail accounts.

12
00:01:12,050 --> 00:01:20,210
The sender and then you should go down here and change on the, if conditional, you want to change

13
00:01:20,690 --> 00:01:22,820
that block to.

14
00:01:24,290 --> 00:01:25,460
This block.

15
00:01:25,700 --> 00:01:27,140
So where did I get this block?

16
00:01:27,170 --> 00:01:38,240
Well, we already covered the sending of emails via Python in the email sending section above in the

17
00:01:38,240 --> 00:01:38,510
course.

18
00:01:38,930 --> 00:01:42,620
So you should take that section if you don't know what this code means.

19
00:01:43,340 --> 00:01:46,410
So, Clint price, that's a surprise.

20
00:01:46,460 --> 00:01:50,700
This variable, this one in here, price again.

21
00:01:50,720 --> 00:01:57,890
So that's the body of the mass of the email and your Gmail is the library we're using.

22
00:01:58,220 --> 00:01:59,470
So you don't need Twilio.

23
00:01:59,480 --> 00:02:08,930
In this case, you need junk mail or your Gmail, which works only for Gmail accounts as the sender.

24
00:02:09,320 --> 00:02:09,860
Of course.

25
00:02:10,759 --> 00:02:17,090
Then down here we establish the email and we need OS.

26
00:02:17,090 --> 00:02:19,370
We need to import OS in here as well.

27
00:02:20,690 --> 00:02:28,250
With OS, we are able to access environment variables from April, in my case.

28
00:02:28,760 --> 00:02:31,400
This was also covered in the email section.

29
00:02:32,450 --> 00:02:40,010
So if the idea is that your passwords should be stored in some secrets in here, so which is passwords,

30
00:02:40,310 --> 00:02:42,080
and then goes the passwords.

31
00:02:43,420 --> 00:02:51,280
And here goes the actual password of your Gmail account to the sender, and then you should press that

32
00:02:51,280 --> 00:02:57,640
secret there, and then this will get that passwords from that box.

33
00:02:59,550 --> 00:03:03,720
And then you send out of email finally with this method, send.

34
00:03:04,830 --> 00:03:07,230
And just print out something here, and that's it.

35
00:03:08,250 --> 00:03:12,960
Whenever the price will change of this product.

36
00:03:19,100 --> 00:03:28,160
This receiver here will receive an email with the data, so I didn't go and explain everything here

37
00:03:28,280 --> 00:03:36,290
because I covered that in the previous video with the eSIMs case, so I didn't want to repeat everything

38
00:03:36,290 --> 00:03:36,650
again.

39
00:03:37,400 --> 00:03:42,920
You should see that previous video if you didn't seeds already, and that's it.

40
00:03:43,220 --> 00:03:45,140
Thank you for following, and I'll talk to you later.

