Okay, so let's get started writing some code.
First, let's create our index.js file where we'll be having all our code inside.
And then let's start actually importing the cheerio in an access library.
So let's say const Axios require Axios to import the Axios library and cheerio.
In here.
Then let's create a main function.
Let's call it a async function, because we might do a little async calls in here.
Let's say main.
Let's just have this empty function in here.
And let's make sure to call it outside of the function scope down here below.
Then let's call.
Let's call the site I have and let's see if we get some HTML.
So let's call it job index page and we can say await Axios dot get.
And then we want to put in the URL we want to fetch in this case.
We have the URL here from Craigslist, which is Praxis dot vercel dot app slash jobs slash one.
So that's just the page.
One of the jobs.
We're going to make this more dynamic so we can get all the pages.
But for now let's just see if we can get this HTML from the first page.
And then let's try and do a console log of the job index page dot data.
When you use excuse, the dot data is the actual data from the request and everything else.
When you just have the object itself, you get all this metadata about the response.
So now with that written, let's try and see what happens if we type in node index.js and run the code.
So if you run node index.js, you should be getting some output in the console.
Very similar to this code we have here.
So this is just the pure HTML we have from the side that Axios has fetched for us.
And don't worry if it looks like a mess, because in the next section we are going to be using cheerio
to actually extract these job titles from the page.
So I'll see you in the next section where we get the job titles from this side.