Now let's try and get the the rank of each of the movies and the IMDb rating.
So if we go inside Chrome Developer Tools again and we select an element, we select the IMDb rating
and we look inside here.
We can see there is this rating column.
I'm the B rating and it contains the rating if you pull a text on it.
We can also get some extra information here based on number of user ratings.
But let's just get the rating itself for now.
So we say copy copy selector.
And you can see there's a really long selector here, but I think we can just use this.
Instead.
Now, if we say text, we get a long list of ratings for each of the movies.
So we copy that selector because we can use that.
However, you can't just paste it inside here.
We can't just do we can't just let me just do this.
We can't.
Just select.
I mean, we we can't.
We can't just do this.
Um, well, why can't we just do this, Bill?
Because we are inside of the title column.
The title column.
And, well, the title column does not contain any title.
You can see it is the TR that contains all of these information we want.
But right now we are iterating over the title column inside here.
So we need to go sort of a step back and iterate over TR instead.
And inside here we can get the title by using element dot find and putting in our selector here instead.
I hope that is clear to you.
So we have the title and the IMDb rating we also need to use.
Um, let's see.
We also need to use element here and dot find.
Let's see.
So we iterate over the CR.
Instead we go and find the child element instead of title, column and reading column and get those
values instead.
And we are going to return an object here.
Tune title and IMDb rating.
Yeah.
Let's try and do that.
Let's see how it works.
Okay, so it looks like we get all of the titles.
The ratings look kind of weird, but I think if we just do a trim, we are getting all the white space
from it.
So NodeJS engine and.
Oh, it's because I used trim on the title column instead of the rating.
Just do that on the rating column.
Yeah.
And we get the.
Titles and ratings in a much more nice format this time.
Actually, it looks like the ratings is coming as a string instead.
But that's okay.
We're not really going to use it as a number for now.
Notice also that some of the titles doesn't have a rating.
It's not because there's something wrong with the script.
It's because some of the movies just don't have a rating yet because there are new or there haven't
been, they haven't been released yet and so on.
So everything looks to be working really great.
Now let's get the rank in the next section and maybe also the description URL.