0
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2024-11-23 07:37:35 +00:00
RSS-Bridge_rss-bridge/bridges/JohannesBlickBridge.php
Patrick d11b7f7754
Change URI for St. Johannes Blick (#4099)
Co-authored-by: Patrick <jummo@mailbox.org>
2024-05-05 23:30:38 +02:00

30 lines
970 B
PHP

<?php
class JohannesBlickBridge extends BridgeAbstract
{
const NAME = 'Johannes Blick';
const URI = 'https://www.st-johannes-baptist.de/index.php/medien-und-downloads/archiv-johannesblick';
const DESCRIPTION = 'RSS feed for Johannes Blick';
const MAINTAINER = 'jummo4@yahoo.de';
public function collectData()
{
$html = getSimpleHTMLDOM(self::URI)
or returnServerError('Could not request: ' . self::URI);
$html = defaultLinkTo($html, self::URI);
foreach ($html->find('ul[class=easyfolderlisting] > li > a') as $index => $a) {
$item = []; // Create an empty item
$articlePath = $a->href;
$item['title'] = $a->innertext;
$item['uri'] = $articlePath;
$item['content'] = '';
$this->items[] = $item; // Add item to the list
if (count($this->items) >= 10) {
break;
}
}
}
}