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/TheWhiteboardBridge.php
Dag 4f75591060
Reformat codebase v4 (#2872)
Reformat code base to PSR12

Co-authored-by: rssbridge <noreply@github.com>
2022-07-01 15:10:30 +02:00

26 lines
714 B
PHP

<?php
class TheWhiteboardBridge extends BridgeAbstract
{
const NAME = 'The Whiteboard';
const URI = 'https://www.the-whiteboard.com/';
const DESCRIPTION = 'Get the latest comic from The Whiteboard';
const MAINTAINER = 'CyberJacob';
public function collectData()
{
$item = [];
$html = getSimpleHTMLDOM(self::URI);
$image = $html->find('center', 1)->find('img', 0);
$image->src = self::URI . '/' . $image->src;
$item['title'] = explode("\r\n", $html->find('center', 1)->plaintext)[0];
$item['content'] = $image;
$item['timestamp'] = explode("\r\n", $html->find('center', 1)->plaintext)[0];
$this->items[] = $item;
}
}