Hello,
I am learning PHP and have a PHP web scraper (although this question is more about the page elements than php, I think).
The web scraper scrapes all book information from an Amazon book page. But I can’t get it to scrape the book description, can anyone help me figure out what is wrong with it.
For example, for the Amazon book page here:
My php scraper script uses:
// find description
$description = $dom->find('#bookDescription_feature_div noscript div', 0);
$myfile = fopen("debug.txt", "w");
fwrite($myfile, $content);
$text = trim(strip_tags(str_replace('<br />', "\n", $description->innertext)));
$amazonItem->setDescription($text);