returnError('Could not request Dollbooru.', 404);
foreach($html->find('div[class=shm-image-list] a') as $element) {
$item = new \Item();
$item->uri = 'http://dollbooru.org'.$element->href;
$item->postid = (int)preg_replace("/[^0-9]/",'', $element->getAttribute('data-post-id'));
$item->timestamp = time();
$item->thumbnailUri = 'http://dollbooru.org'.$element->find('img', 0)->src;
$item->tags = $element->getAttribute('data-tags');
$item->title = 'Dollbooru | '.$item->postid;
$item->content = '
Tags: '.$item->tags;
$this->items[] = $item;
}
}
public function getName(){
return 'Dollbooru';
}
public function getURI(){
return 'http://dollbooru.org/';
}
public function getCacheDuration(){
return 1800; // 30 minutes
}
}