I am struggling to put a script together to handle the scraping of a javascript rendered web page through Apps Script. Found this How to scrape Javascript rendered websites using Javascript? here, but I don't know how to put this together. Such as load puppeteer. Any help would be appreciated.
Asked
Active
Viewed 2,022 times
1
-
3The question is too broad. Please add a brief description of your search/research efforts regarding how to use the concepts describen on that thread on the Google Apps Script platform. – Rubén May 01 '18 at 23:38
-
I have same though as u, unfortunately no hope at all Thus I use chromium-driver as a middleware and host in cloud. So my google app script will call that entry point to get data – Question-er XDD Feb 07 '22 at 14:07
1 Answers
1
You can try to scrape the initial HTML, since actually scraping the rendered HTML is extremely hard to do, you'd have to use a headless browser.
There is this library: https://github.com/tautologistics/node-htmlparser which you can use to parse HTML from JavaScript, it is in node, but because it doesn't use any dependencies, you can just copy and paste the functions you need.
Parsing it's not a very easy task I'm afraid.

Rainb
- 1,965
- 11
- 32