[Rule34pahealBridge] Fix thumbnail uri (#1278)

This commit is contained in:
dawidsowa 2019-09-07 18:26:08 +02:00 committed by Lyra
parent cfe433e9e2
commit 25548b6757

View file

@ -7,4 +7,21 @@ class Rule34pahealBridge extends Shimmie2Bridge {
const NAME = 'Rule34paheal'; const NAME = 'Rule34paheal';
const URI = 'http://rule34.paheal.net/'; const URI = 'http://rule34.paheal.net/';
const DESCRIPTION = 'Returns images from given page'; const DESCRIPTION = 'Returns images from given page';
protected function getItemFromElement($element){
$item = array();
$item['uri'] = $this->getURI() . $element->href;
$item['id'] = (int)preg_replace('/[^0-9]/', '', $element->getAttribute(static::IDATTRIBUTE));
$item['timestamp'] = time();
$thumbnailUri = $element->find('img', 0)->src;
$item['tags'] = $element->getAttribute('data-tags');
$item['title'] = $this->getName() . ' | ' . $item['id'];
$item['content'] = '<a href="'
. $item['uri']
. '"><img src="'
. $thumbnailUri
. '" /></a><br>Tags: '
. $item['tags'];
return $item;
}
} }