find('div.blague') as $element) {
$item = array();
$item['uri'] = static::URI . '#' . $element->id;
$item['author'] = $element->find('div[class="blague-footer"] p strong', 0)->plaintext;
// Let the title be everything up to the first
$item['title'] = trim(explode("\n", $element->find('div.text', 0)->plaintext)[0]);
$item['content'] = strip_tags($element->find('div.text', 0));
// timestamp is part of:
//
Par {author} le {date} dans {category}
preg_match( '/.+le(.+)dans.*/', $element->find('div[class="blague-footer"]', 0)->plaintext, $matches ); $item['timestamp'] = strtotime($matches[1]); $this->items[] = $item; } } }