1
00:00:01,270 --> 00:00:06,460
Here is my solution, which will log into this website.

2
00:00:06,880 --> 00:00:11,530
It will click on home and it will scrape this dynamic value here.

3
00:00:13,540 --> 00:00:14,320
This is the code.

4
00:00:14,680 --> 00:00:19,720
So let me explain it quickly since we are dealing with a chain of functions here.

5
00:00:20,200 --> 00:00:27,280
So get driver, clean text and main. It makes sense to explain the script from top to bottom.

6
00:00:27,460 --> 00:00:31,180
So we are calling main, which gets the driver.

7
00:00:31,750 --> 00:00:36,910
this one in here, you know, that's for of this web page URL.

8
00:00:37,060 --> 00:00:46,150
So the log in page where we enter the username here and the password in here and we press enter and

9
00:00:46,150 --> 00:00:53,980
then we click on the home link on that loged in page. Afterward,

10
00:00:54,250 --> 00:00:55,180
this is what I'm doing.

11
00:00:55,660 --> 00:00:59,380
So text equals to driver.find_element by xpath.

12
00:00:59,560 --> 00:01:05,140
And this is my X path, which I found from Google Chrome. The inspect tool on Google Chrome.

13
00:01:05,650 --> 00:01:08,260
So then we return that clean text.

14
00:01:08,620 --> 00:01:16,910
So we just extract the temperature value, the number and return the clean outputs, which is a float.

15
00:01:16,930 --> 00:01:19,300
You can see here, output is a float.

16
00:01:19,510 --> 00:01:20,650
And we returned that here.

17
00:01:21,070 --> 00:01:30,160
So let me run the scripts just to demonstrate to you that this solution is working. The username

18
00:01:30,160 --> 00:01:31,000
and the password.

19
00:01:31,210 --> 00:01:32,140
Press log in.

20
00:01:32,830 --> 00:01:36,730
Then go to home and get that number and print it out.

21
00:01:37,000 --> 00:01:40,950
So 29 is the output. Thank you for following.

22
00:01:40,960 --> 00:01:41,950
I'll talk to you later.

