Splash 笔记

javascript rendering service
a lightweight web browser
can execute custom JavaScript in page context
get detailed rendering info in HAR format( http://www.softwareishard.com/blog/har-12-spec/ )


endpoints 末端 that provide all Splash features are  execute  and  run ; they allow to execute arbitrary Lua rendering scripts.


render.html
Return the HTML of the javascript-rendered page.


curl 'http://localhost:8050/render.html?url=http://domain.com/page-with-javascript.html&timeout=10&wait=0.5'


render.json
Return a json-encoded dictionary with information about javascript-rendered webpage. It can include HTML, PNG and other information, based on arguments passed.

html: Whether to include HTML in output
iframes : Whether to include information about child frames in output. 


Response Object
contain information about a response.

response.info
A Lua table with response data in  HAR response  format.

response.body
Raw response body (a  binary object ).

你可能感兴趣的:(Splash 笔记)