📜  爬虫获取文本,不获取 html 代码示例

📅  最后修改于: 2022-03-11 14:53:00.859000             🧑  作者: Mango

代码示例1
$node->filter('span[class="final-price"]')->each(function ($n) {
  $html = $n->html();

  $html = explode(" 
    //        11 USD
    //          -37% 
    // 
    pr (trim($html[0]));    // just get 11 USD only
  });