WEBVTT

00:01.310 --> 00:08.480
Now let's try and get the date time that the job was posted onto Craigslist, which is inside of this

00:08.480 --> 00:09.770
time element.

00:09.800 --> 00:13.480
The HTML time with the date time attribute.

00:13.490 --> 00:19.760
And I think we can use this date time attribute to create a new JavaScript date object.

00:20.840 --> 00:28.880
Now notice that the time is inside of result info so we can use the same each loop that we used before

00:29.180 --> 00:34.520
and just select the time element instead of our result.

00:34.520 --> 00:36.680
Info A result title class.

00:38.660 --> 00:44.630
So let me just right time and then we get the date time attribute instead of text.

00:49.590 --> 00:50.190
So.

00:50.190 --> 00:53.520
And now we have the time that every job was posted.

00:55.790 --> 01:02.240
And again, we can just paste this code inside of our NodeJS project and it's going to run exactly the

01:02.240 --> 01:04.400
same as the Chrome console.

01:15.230 --> 01:22.250
So now I just added the element children with the selector inside of the NodeJS project.

01:22.520 --> 01:29.870
And then I can just add the object into my scrape result and we will have the date.

01:30.710 --> 01:35.330
I think I will also want to create this into a JavaScript object.

01:35.330 --> 01:38.000
Actually, let me just add it first.

01:40.110 --> 01:40.620
All right.

01:40.650 --> 01:43.590
New date to make it into our JavaScript object.

01:43.590 --> 01:49.740
And then we should have a JavaScript object with the date that the job was posted.

01:50.250 --> 02:02.160
Let's try and run the code with NodeJS and we can see the date posted is the date the job was posted.

02:03.360 --> 02:05.970
Okay, so that was it.
