c# parse javascript content -
so have web scraping project 1 of pages has necessary content in json format inside set of <script>
tags.
here's example of said <script>
tags:
<script> window.postdata = {} window.postdata["content"] = [json content] </script>
i've used htmlagilitypack particular <script>
tags, not sure how grab json content this. can parse json json.net or other library/framework, i'm not worried part. i'm stuck on getting json. there javascript parsing library or can use this, or there way accomplish this.
any appreciated!
check out jint
var postdatajson = new engine() .execute("window.postdata = {}; window.postdata['content'] = [json content]") .getvalue("window.postdata");
Comments
Post a Comment