开发者

How can you access the completely rendered DOM source of a URL with PHP?

开发者 https://www.devze.com 2023-04-11 22:12 出处:网络
I\'d like to access the rendered DOM of a page, after JavaScript has run and modified the page source, with PHP. I can ac开发者_C百科cess the raw code with CURL, but what I;d like is to access the cod

I'd like to access the rendered DOM of a page, after JavaScript has run and modified the page source, with PHP. I can ac开发者_C百科cess the raw code with CURL, but what I;d like is to access the code similar to the way Firefox's Examine Element feature works, so I can process the actual HTML output by Javascript functions and not just the Javascript code itself. Are there any PHP libraries that can do this?


Check out the "headless browser" section.

It's a good place to start.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号