I'm using NodeJS to do web scraping.
I have a complex HTML string. It contains a number of html tags and a few jave script blocks. Each javascript block contains js functions with a few parameters, and each parameter is a Json string. I'm only interested in those Json strings. What's the best way to extract them?
Sample code:
<html>
<header>...</header>
<script>function1(param1:[{a:"V1"},{b:"v2"}],param2:[{c:"v3"},{d:"v4"}])</script>
<script>...</script>
<body>...</body>
</html>
Appreciate your advice.