mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-20 07:11:43 +02:00
Reformat codebase v4 (#2872)
Reformat code base to PSR12 Co-authored-by: rssbridge <noreply@github.com>
This commit is contained in:
@@ -1,28 +1,29 @@
|
||||
<?php
|
||||
|
||||
class Rule34pahealBridge extends Shimmie2Bridge {
|
||||
class Rule34pahealBridge extends Shimmie2Bridge
|
||||
{
|
||||
const MAINTAINER = 'mitsukarenai';
|
||||
const NAME = 'Rule34paheal';
|
||||
const URI = 'https://rule34.paheal.net/';
|
||||
const DESCRIPTION = 'Returns images from given page';
|
||||
|
||||
const MAINTAINER = 'mitsukarenai';
|
||||
const NAME = 'Rule34paheal';
|
||||
const URI = 'https://rule34.paheal.net/';
|
||||
const DESCRIPTION = 'Returns images from given page';
|
||||
const PATHTODATA = '.shm-thumb';
|
||||
|
||||
const PATHTODATA = '.shm-thumb';
|
||||
|
||||
protected function getItemFromElement($element){
|
||||
$item = array();
|
||||
$item['uri'] = rtrim($this->getURI(), '/') . $element->find('.shm-thumb-link', 0)->href;
|
||||
$item['id'] = (int)preg_replace('/[^0-9]/', '', $element->getAttribute(static::IDATTRIBUTE));
|
||||
$item['timestamp'] = time();
|
||||
$thumbnailUri = $element->find('a', 1)->href;
|
||||
$item['categories'] = explode(' ', $element->getAttribute('data-tags'));
|
||||
$item['title'] = $this->getName() . ' | ' . $item['id'];
|
||||
$item['content'] = '<a href="'
|
||||
. $item['uri']
|
||||
. '"><img src="'
|
||||
. $thumbnailUri
|
||||
. '" /></a><br>Tags: '
|
||||
. $element->getAttribute('data-tags');
|
||||
return $item;
|
||||
}
|
||||
protected function getItemFromElement($element)
|
||||
{
|
||||
$item = [];
|
||||
$item['uri'] = rtrim($this->getURI(), '/') . $element->find('.shm-thumb-link', 0)->href;
|
||||
$item['id'] = (int)preg_replace('/[^0-9]/', '', $element->getAttribute(static::IDATTRIBUTE));
|
||||
$item['timestamp'] = time();
|
||||
$thumbnailUri = $element->find('a', 1)->href;
|
||||
$item['categories'] = explode(' ', $element->getAttribute('data-tags'));
|
||||
$item['title'] = $this->getName() . ' | ' . $item['id'];
|
||||
$item['content'] = '<a href="'
|
||||
. $item['uri']
|
||||
. '"><img src="'
|
||||
. $thumbnailUri
|
||||
. '" /></a><br>Tags: '
|
||||
. $element->getAttribute('data-tags');
|
||||
return $item;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user