WEBVTT

00:00.710 --> 00:07.340
Now, when you download or start to install these to request and request promise packages that we use

00:07.340 --> 00:11.120
a lot inside of this course, you might see a warning about that.

00:11.120 --> 00:16.100
These two packages have been deprecated, so that sounds like a really scary thing, especially when

00:16.100 --> 00:17.450
we're developers.

00:17.480 --> 00:23.960
We try to stay away from packages that are deprecated because it means that no one is going to update

00:23.960 --> 00:25.280
the package anymore.

00:25.280 --> 00:29.840
And it's basically like a dead thing now and we should be looking for other things.

00:29.840 --> 00:36.800
Now that's more up to date, but in this case, it's actually a pretty good thing that they have gone

00:36.800 --> 00:39.050
into maintenance mode in this module.

00:39.050 --> 00:44.690
And let's take a look at the reasoning behind this deprecation of the package.

00:46.450 --> 00:48.820
So this is a rather long post.

00:48.820 --> 00:53.980
I'm not going to go into too much detail about it, but basically they write that the most valuable

00:53.980 --> 01:01.600
thing they can do is to go into maintenance mode and stop considering new features, major or breaking

01:01.600 --> 01:03.400
changes in the package.

01:03.730 --> 01:09.190
Basically, it is because the package is being depended on by 41,000 modules.

01:09.190 --> 01:14.260
At the time of this writing, it's been downloaded 14 million times a week.

01:14.290 --> 01:20.620
It's probably one of the oldest and most popular packages for NodeJS, and they don't want to start

01:20.620 --> 01:22.750
introducing new things in this package.

01:22.750 --> 01:29.050
That's going to break a lot of things for the existing modules that's depending on it.

01:30.150 --> 01:33.630
Now, he does go on to write about that.

01:35.620 --> 01:39.340
The patterns at the core of requests are out of date.

01:39.640 --> 01:44.470
Personally, I don't really see where that is, but he probably knows it better than I do.

01:44.470 --> 01:53.170
But as just a simple web scraper for me, I don't really see anything wrong with the patterns of requests,

01:53.170 --> 02:00.340
and especially not requests promise, because I can use request or I can use promises and async await.

02:00.370 --> 02:07.540
And it basically seems like the same as with alternative libraries that you could use the APIs more

02:07.540 --> 02:08.620
or less the same.

02:09.100 --> 02:17.710
So for me as a web scraper, I don't really see any bad patterns or old things in this package that

02:17.710 --> 02:19.960
makes me want to go somewhere else.

02:20.590 --> 02:25.660
But I mean, it's up to you guys if you want to use another library.

02:25.690 --> 02:27.190
You're always free to do that.

02:27.190 --> 02:31.090
But they are very similar for me personally.

02:31.090 --> 02:38.240
When I make a new package or a new web scraping project, I still use request and request promise because

02:38.240 --> 02:39.740
I know it, I'm used to it.

02:39.740 --> 02:47.150
And also this maintenance mode means that, well, it just means that it's not going to have any new

02:47.150 --> 02:49.220
features or breaking changes.

02:49.700 --> 02:50.920
Now, new features.

02:50.930 --> 02:58.460
Well, as Http protocol is not really going to change tomorrow or the day after tomorrow or this year,

02:58.460 --> 02:59.990
I think, or next year.

03:00.260 --> 03:01.400
And.

03:02.100 --> 03:07.230
Breaking changes is a good thing for me because they're not going to change up things a lot.

03:07.230 --> 03:14.190
And for you as a student, it means that the content is in this course, is still going to match what

03:14.190 --> 03:14.940
you download.

03:14.940 --> 03:21.360
When you download request package that will still have to they will still try to merge fixes in a timely

03:21.360 --> 03:22.120
fashion.

03:22.140 --> 03:28.800
No promises though, but since the request is really a well tested, well used package, I don't think

03:28.800 --> 03:36.750
they have any other deep box hidden somewhere, to be honest with you.

03:37.380 --> 03:42.960
That being said, if you want to look at alternative libraries, I'm going to put a link for that also.

03:42.960 --> 03:46.020
But you can also find it in the request GitHub.

03:47.100 --> 03:49.590
I've taken a look at some of these libraries.

03:49.590 --> 03:57.300
We all some of you might already know Axios if you're in the React environment, sort of it's quite

03:57.300 --> 04:04.480
popular Http client, but all we're doing in the end is just doing some Http getting and some Http post

04:04.480 --> 04:07.000
most of the time when we are web scraping.

04:08.110 --> 04:12.280
And sometimes we also use cookies to do some of its education.

04:12.280 --> 04:14.830
If it's a site where you have to be logged in.

04:14.950 --> 04:21.850
I personally kind of like the needle package also because it had seemed to have some cookie support.

04:21.880 --> 04:30.700
There's also URL lib and I tended to go to the needle package myself, but maybe Axios can also be used,

04:30.700 --> 04:37.240
especially if you're used to it already from React, although they you have to kind of set your cookies

04:37.240 --> 04:38.680
manually in the header.

04:38.680 --> 04:43.930
But personally, again, for me I just use request and request promise.

04:43.930 --> 04:47.830
As always, it doesn't really mean anything bad that it's deprecated.

04:47.830 --> 04:54.580
It simply means there's not going to be any new major changes or features inside this package anymore

04:54.580 --> 04:57.970
because too many people are depending on us.

04:57.970 --> 05:04.780
We don't want to ruin the lives for 41,000 module maintainers, basically.

05:05.200 --> 05:12.920
So but what you can expect is that the API request in the course is basically the same as what you download

05:12.920 --> 05:13.550
today.

05:14.130 --> 05:16.650
So I hope that cleared things up a little for you.

05:16.650 --> 05:21.330
And you're not too scared when you see this deprecation message now.
