简体   繁体   中英

Parse JavaScript from html string in C#/Java

I am trying to do some WebScraping of a site and the data is in dynamically loaded containers. It appears that the loading is done via JavaScript. Therefore I would need to execute it, in order to get it. I have written 2 versions of the program, one in Java and one in C#, so helping me with one would be nice enough.

I am currently using WebResponse/WebRequest in C# and HttpURLConnection in Java. I have to login into the site first, which already works like a charm. Now I need to parse the content, so the data gets filled in and the containers loaded. Is there an easy way to run the html through a browser control or an already included library?

In C# you could just use a hidden WebControl. With that you could execute everything you need.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM