So now we got the HTML with Axios.
But how do we actually extract some of the data from the site, for example, like these job titles
we have here.
Well, that's what we're going to be looking at in this section.
We're going to find out what is the CSS selectors of these job titles.
To do that, we can right click on the element that we are interested in.
So if you go here and right click and select inspect.
Inside of Google Chrome on the element we want to get and scrape, we are then going to see the developer
tools on the side here, and we see the HTML where the element we right clicked on is.
So we can see the title of the job here.
And what is of interest is of to us is how can we build a CSS selector to select this element.
Well, we can see that the the element, the A element with the title is inside the div class, or a
div element with a class of title plop.
So we could perhaps use this to select all of the titles inside of this website.
If we go inside of the console on the tab over here and we try and type in a dollar sign.
And then put in.
Dot title plot.
Because it's a class, we are going to use the dot in front and then let's put in text content.
And as you can see, it does return the title of the first job.
So that's a really good sign and very promising to us.
Now this is using the native chrome selector.
It's not actually the jQuery selector.
And just to be sure, it would probably be a good idea for us to inject jQuery into this website and
then use the jQuery, uh, selector instead.
So to do that, I'm just going to go up here and select inject into page on my jQuery injector plugin
I have inside of Chrome.
If you don't have this plugin already, just Google, jQuery, injector, Chrome, and pretty much the
first result you get is the right one.
Mine looks like this.
It has 25 ratings, 10,000 users.
This is the one I use.
I'm also going to leave a link for it in the, uh, lecture assets.
Now let's get back to the site here, and let's inject the jQuery with the jQuery injector plugin.
Inject into page.
And now let's try it with jQuery instead.
So we do the same.
Exactly, exactly the same thing basically here or almost except for we just say text and call the function
of text here.
So then we get all of the titles in one big string here.
And so that's very promising.
And that means that we can use this selector to get all of the job titles.
Now obviously we just get like one big string right?
Right here.
We want to print it one by one.
Well how to print the job titles one by one.
That's what we're going to be looking at in the next section.
And we're also going to be starting to look at how to put this into NodeJS.