I have looked all over the web for information on web scraping but have not found anything that involves classes that look like this.
<div class="backgroundGradientGrey boxShadow">...</div>
As you can see there are two classes within this div seperated by a div.
I attempted to scrape some data within that class using this script.
$html = file_get_html(www.website.com);
foreach($html->find('div.backgroundGradientGrey boxShadow') as $e)
echo $gameDetails->class . '<br>';
This just returns the class name of search element, which as expected should be, backgroundGradientGrey boxShadow
I know after some debugging that the issue is specifically with the class implementation with find(), everytime I run the script it returns null. In contrast by removing the class and just having find(div), the script returns all div classnames within the webpage.
Any help would be greatly appreciated.
Aucun commentaire:
Enregistrer un commentaire