Okay, everyone.
I hope you gave it a little.
Try to try and get the job description text in here.
And now I'm going to show you how simple this to get the job description text.
We just I'm just going to go and select, inspect the element and click on the text here.
And here we can see that it is a HTML section element with an ID of posting body.
Now, until now we have mostly been using CSS classes to select elements which is have which has a dot
in front of the class name.
But now since we're using a CSS ID, we need to have the hashtag sign in front to select it.
So by that I mean you just need to write out the dollar sign and then posting body.
Dot text.
And then we get all of the text of this element.
So remember to use the hashtag sign when you are selecting an element by the ID, And now we can use
this then to select all of the job description text and put it on to the element or the object as a
job description Property.
So let's go ahead here.
And then inside the loop, we will say we first need to load the HTML into Cheerio.
So we say const dollar sign equals cheerio load HTML.
And that's the same process as we did up here for scraping the listings.
Now we're just doing it for each of the pages with the job descriptions and then we can say const posting
body.
Or we can just say const job description.
Equals dollar sign.
And then we select the posting body and take the text from it, and then we can say and attach this
property onto the listings object so we can say listings.
On the I index, we can say the job description equals job description.
So there we go.
Now we should have all of the job descriptions onto these different listings.
And let's let's also do let's also do a console log here of the listings job description, just to check
if we are getting the right values in.
So now let's try and run it inside Node.
And you can see that it's going through each of these job descriptions.
And if we look inside of the console, I can see there's a printout of all the job descriptions.
So it all looks to be good up and running now.
And we are still waiting one second between each request so we don't get blocked from using Craigslist.
Now the next section, we are going to scrape the compensation from each of these job descriptions,
the one we have right here.
Again, I recommend you try and give it a go as a little exercise to try and scrape this compensation
yourself.
And then in the next section I'm going to show you how I would do it.
So I'll see you in the next section.