
The ‘getPageHTML’ function is the most interesting for us because that’s where the magic happens.
Returns response of the ‘getPageHTML’ function.Use puppeteer on our server for simulating the browser environment in order to render HTML of a page and use it for scraping or something else 😉.
Proxybot - an API service for web scraping.įor people who prefer watching videos, there is a quick video 🎥 demonstrating how to get an HTML content of a JS-based website. Puppeteer - a Node library developed by Google. It sounds like an easy and fun problem to solve! In the below 👇 section I will show 2 ways how to solve the above-mentioned problem using: 🎓 We need a browser environment for executing Javascript code and rendering content - HTML. What? Why the response contains no HTML? It is happening because there is no browser environment when we sending requests from a server or Postman app. However, if you will try to send HTTP GET request to the same url in the Postman - you will see a different response.Ī response to GET request ‘ ’ in made in the Postman. If you will try open this website ( ) in your browser - you will see a simple page with some content. You need to have a browser environment in order to execute Javascript code that will render HTML. In this article, I would like to tell about how you can scrape HTML content from a website build with the Javascript framework.īut why it is even a problem to scrape a JS-based website? 🤔