} } } } $bddpage->setDls($dls[0]); //nb like foreach ($page->getElementsByTagName('div') as $divs) { if ($divs->getAttribute('class') == 'thing-info thing-interact thing-interaction-parent not-for-tiny') { foreach ($divs->getElementsByTagName('span') as $span) { if ($span->getAttribute('class') == 'interaction-count') { $nblikes[] = $span->textContent; } } } } $bddpage->setNblike($nblikes[0]); //summary foreach ($page->getElementsByTagName('div') as $divs) { if ($divs->getAttribute('class') == 'thing-info-content') { foreach ($divs->getElementsByTagName('p') as $p) { $summary[] = $p->textContent; } } } if (!empty($summary)) { $bddpage->setSummary($summary[0]); } //license foreach ($page->getElementsByTagName('a') as $divs) { if ($divs->getAttribute('rel') == 'license') { $license = $divs->textContent;