How to use Xpath in PHP Simple HTML DOM Parser

后端 未结 2 828
南旧
南旧 2021-01-07 09:32

I am learning scraping using the PHP Simple HTML DOM Parser and Xpath. Accroding to the changelog given here http://sourceforge.net/news/?group_id=218559. The PHP SImple HTM

2条回答
  •  借酒劲吻你
    2021-01-07 10:31

    The find function. http://simplehtmldom.sourceforge.net/manual.htm#section_find

    $content = file_get_html($link);
    
    $elems = $content->find("/html/body/div/div");
    

提交回复
热议问题