Okay, guys.
So I'm really sorry that we haven't been getting into coding yet, but I promise in this section we're
actually going to go and write our scraper itself.
So as you can see, we have the homepage URL here.
If you didn't get it, look in the resources.
There's a link for this URL so you don't have to type it all by hand.
It's pretty long.
So and that's the URL we get to which I showed you in the previous sections.
Okay guys, so let's write a function as usual.
We write a let's call it scrape homes in index page.
It takes in a URL.
And then we create a browser using puppeteer.
So puppeteer await puppeteer dot launch, and then we pass in an option to make the browser not headless
so we can see the actual Chrome browser running while we are programming this and debugging it and so
on so we can see what's going on.
Okay, so then we create a page.
So we say await parser new page.
And then we can go and look at the URL.
So we can go and say page dot go to pass in the URL.
Again, use await and that should open the page that we pass in to it like this.
So let's go and see if it works so we can call scrape Holmes pass in the URL and then we should see
the browser window open up and open this page.
So let's go and write Node Index.js.
And we see the page is opening up and you notice the window has a smaller size.
That's okay.
We don't mind that because it makes us get the bar down here below.
So yeah, that's how you open the page.
And now we just need to execute some JavaScript inside so we can select all the different elements in
here and get the URLs of the homes.