Why do inner text is not activeInnerText dans simple_html_dom
[Voici le code HTML]
<ul class="product">
<li class="product col-md-4 col-sm-4 col-xs-6 "><div class="product-header">
<a href="/so-mi-octopus-xanh-soc-trang-p5163098.html">
<img src="//cdn.nhanh.vn/cdn/store/17863/ps/20170925/0ctopus_thumb_450x600.jpg" class="attachment-shop_catalog size-shop_catalog wp-post-image">
</a><div class="buttons">
<a href="/so-mi-octopus-xanh-soc-trang-p5163098.html" rel="nofollow" class="button add_to_cart_button">
<i class="fa fa-shopping-bag" aria-hidden="true"></i>
<span class="screen-reader-text">Thêm vào giỏ</span></a>
<a data-product_id="5163098" class="button btnFav" rel="nofollow">
<i class="fa fa-heart-o" aria-hidden="true"></i>
<span class="screen-reader-text">Yêu thích</span>
</a></div></div><h3><a href="/so-mi-octopus-xanh-soc-trang-p5163098.html">Sơ mi Octopus xanh sọc trắng</a></h3><span class="price">
<span class="woocommerce-Price-amount amount">
400,000 ₫ </span>
</span></li>
</ul>
[Voici mon code]
<?php
require "simple_html_dom.php";
$html=file_get_html("http://zuhaus.vn/zu-design-pc150502.html?page=1");
$ds=$html->find("ul.products li");
foreach ($ds as $sp) {
# code...
$price=$sp->find("span.price span",0);
echo $price;
$name=$sp->find("h3 a",1)->innertext;
echo $name;
}
?>
J'ai essayé beaucoup de cas de test mais ça ne marchera pas: "< T écheveaux vous P/s je bibliothèque simple_html_dom
Veuillez mettre le code dans la question, pas sur les sites externes. Les utilisateurs de StackOverflow vous aideront, ** après vous être utile **. Faites le tour: http://stackoverflow.com/tour. Faites des recherches: https://meta.stackoverflow.com/q/261592/1011527. Apprenez à poser de bonnes questions: http://stackoverflow.com/help/how-to-ask. Et http://stackoverflow.com/help/mcve. – Nic3500