From 999457c546f307624cb704a3254922c1204dfb7a Mon Sep 17 00:00:00 2001
From: dawidsowa <49904992+dawidsowa@users.noreply.github.com>
Date: Sat, 7 Sep 2019 18:26:08 +0200
Subject: [PATCH] [Rule34pahealBridge] Fix thumbnail uri (#1278)
---
bridges/Rule34pahealBridge.php | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/bridges/Rule34pahealBridge.php b/bridges/Rule34pahealBridge.php
index 1a746162162..d130d365ddd 100644
--- a/bridges/Rule34pahealBridge.php
+++ b/bridges/Rule34pahealBridge.php
@@ -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'] = '
Tags: '
+ . $item['tags'];
+ return $item;
+ }
}