Skip to content

Commit

Permalink
[Rule34pahealBridge] Fix thumbnail uri (RSS-Bridge#1278)
Browse files Browse the repository at this point in the history
  • Loading branch information
dawidsowa authored and teromene committed Sep 7, 2019
1 parent 059417d commit 999457c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions bridges/Rule34pahealBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,21 @@ class Rule34pahealBridge extends Shimmie2Bridge {
const NAME = 'Rule34paheal';
const URI = 'http://rule34.paheal.net/';
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;
}
}

0 comments on commit 999457c

Please sign in to comment.