hey friends i am trying to scrap flipkart image using goutte but the problem is that the image url is inside style tag of div. i tried several way to scrap image but i failed. hope you guys will help me ....
Here is the code that i had tried..
$output = $crawler->filter('img[class="_3togXc _3wp706"]')->each(function ($node) {
print_r($node);
echo '<img src="' . $node->attr('src') . '" alt="' . $node->attr('alt') . '">';
});
var_dump($output);
and the image is inside this div tag ...
<div class="_2_AcLJ _3_yGjX" style="background-image:url(https://rukminim1.flixcart.com/image/128/128/jwnusnk0/shoe/g/g/4/combo-3-1206-1077-1197-6-shoefly-multicolor-original-imaf9zgwfbgeb6vw.jpeg?q=70)"></div>