save html output of page after execution of the page's javascript

后端 未结 7 972
情话喂你
情话喂你 2020-11-29 21:12

There is a site I am trying to scrape, that first loads an html/js modifies the form input fields using js and then POSTs. How can I get the final html output of the POSTed

7条回答
  •  甜味超标
    2020-11-29 21:38

    This can easily be done with some php code and javascript use fopen() and fwrite() and this function to save it: var generatedSource = new XMLSerializer().serializeToString(document);

提交回复
热议问题