How to scrape specific data from scrape with simple html dom parser

前端 未结 6 1033
北恋
北恋 2020-12-18 01:21

I am trying to scrape the datas from a webpage, but I get need to get all the data in this link.

include \'simple_html_dom.php\';
$html1 = file_get_html(\'ht         


        
6条回答
  •  醉话见心
    2020-12-18 02:08

    XPath makes scraping ridiculously easy, and allows for some changes in the HTML document to not affect you. For example, to pull out the names, you'd use a query that looks like:

    //div[id='content']/d1/dt
    

    A simple Google search will give you plenty of tutorials

提交回复
热议问题