Answers for "crawler get text, not get html"

0

crawler get text, not get html

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

  $html = explode("<span", $html);  
    // <span> 
    //		11 USD
    // 		<span> -37% </span>
    // </span>
    pr (trim($html[0]));	// just get 11 USD only
  });
Posted by: Guest on September-29-2020

Browse Popular Code Answers by Language