rss-bridge/bridges/SafebooruBridge.php
2022-05-13 09:35:25 +02:00

15 lines
420 B
PHP

<?php
class SafebooruBridge extends GelbooruBridge {
const MAINTAINER = 'mitsukarenai';
const NAME = 'Safebooru';
const URI = 'https://safebooru.org/';
const DESCRIPTION = 'Returns images from given page';
protected function buildThumbnailURI($element){
$regex = '/\.\w+$/';
return $this->getURI() . 'thumbnails/' . $element->directory
. '/thumbnail_' . preg_replace($regex, '.jpg', $element->image);
}
}