Learn how to use express.
Serve the page to a browser, by reading the file and serving it with an express endpoint, or to curl or something. ie curl localhost:8080/your-endpoint
Using the browser manipulate the page inside of the browsers dev tools.
Figure out how to get the current DOM as an html string.
Figure out how to use the fetch API inside of a browser such as fetch(url, {method: 'POST'}).then(...)
After manipulating the DOM with the browsers dev tools.
POST the results back to express on the nodejs server.
Save the req.body or req.data or req.params to a file.
Side notes:
- figure out what a callback is, figure out how promises work
- do some research on express middleware
- look into setInterval, setTimeout
Related:
Other options, use a text editor, use sed, grep, awk, bash, or something else that doesn't require serving files to a browser?