WEBVTT

0
00:00.030 --> 00:00.660
Hey guys,

1
00:00.660 --> 00:05.190
welcome to Day 48 of 100 Days of Code. Today

2
00:05.190 --> 00:10.190
we're going to be introducing a new technology for advanced web scraping,

3
00:10.890 --> 00:13.200
and that is Selenium WebDriver.

4
00:13.680 --> 00:16.170
Now you might have heard of Selenium WebDriver before

5
00:16.200 --> 00:21.030
because it's probably one of the most well-known automation and testing tools

6
00:21.300 --> 00:25.200
for web developers out there. But you might be wondering, well,

7
00:25.230 --> 00:29.550
we already have Beautiful Soup. So why do we need to learn a new technology?

8
00:30.180 --> 00:30.450
Well,

9
00:30.450 --> 00:35.450
one of the things that we've really been limited by is we can't actually use all

10
00:35.970 --> 00:38.370
the capabilities that browsers can do.

11
00:38.580 --> 00:42.930
So when we load up a website with beautiful soup, we can't, for example,

12
00:42.990 --> 00:47.990
type something into the website and then click on something. And to create these

13
00:48.120 --> 00:49.920
chains of continuous actions

14
00:50.280 --> 00:55.280
where we basically automate the entire flow of a particular job or a particular

15
00:55.950 --> 00:58.320
task. To do that,

16
00:58.380 --> 01:01.230
we're going to need to use Selenium WebDriver.

17
01:02.070 --> 01:07.070
Now, this is a free tool and it basically allows us to automate the browser,

18
01:08.250 --> 01:11.520
get the browser to do things automatically

19
01:11.760 --> 01:16.760
depending on a script or a piece of code that we write. Now,

20
01:17.580 --> 01:22.580
this is going to enable us to type as well as click as well as scroll.

21
01:25.560 --> 01:30.560
Basically anything that a human pretty much can do on a website, you can do using

22
01:30.930 --> 01:33.030
a Selenium driven browser.

23
01:33.600 --> 01:37.860
It's kind of like we're building a robot and telling it what to do on a browser.

24
01:38.310 --> 01:43.290
And selenium is the tool that allows the robot to interact and communicate with

25
01:43.290 --> 01:46.080
the browser. And once we've leveled up,

26
01:46.140 --> 01:49.290
we'll be able to do all sorts of things like, for example,

27
01:49.590 --> 01:54.590
play web-based games like cookie clicker automatically to click on this cookie

28
01:56.820 --> 02:01.820
all by itself using the code instead of us having to manually do it and then to

29
02:02.820 --> 02:07.820
select upgrades and to purchase them, again, completely automatically.

30
02:09.090 --> 02:13.530
If you ever wanted to be the best at cookie-clicker or any other web-based

31
02:13.530 --> 02:18.150
game and you don't want to invest the time in scaling up and getting good at it

32
02:18.420 --> 02:23.220
yourself, well then this is where automation might help you.

33
02:23.940 --> 02:25.560
But on a more serious note,

34
02:25.590 --> 02:29.100
you might use something like selenium to automate

35
02:29.100 --> 02:34.100
filling in forms or transferring information from an Excel spreadsheet to a

36
02:35.190 --> 02:36.600
online Google form,

37
02:36.630 --> 02:40.470
or basically doing anything that is repetitive and tedious,

38
02:40.770 --> 02:42.390
and you don't want to do it yourself.

39
02:43.050 --> 02:45.690
So once you are ready, head over to the next lesson

40
02:45.900 --> 02:49.440
and let's start learning about this new superpower.