Use PhantomJS to extract html and text

前端 未结 4 737
眼角桃花
眼角桃花 2020-12-21 23:11

I try to extract all the text content of a page (because it doesn\'t work with Simpledomparser)

I try to modify this simple example from the manual

         


        
4条回答
  •  一个人的身影
    2020-12-21 23:39

    To extract the text content of the page, you can try thisreturn document.body.textContent; but I'm not sure the result will be usable.

提交回复
热议问题