mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-25 19:06:23 +03:00
37cb4091d4
When fetching website contents, exceptions already raise on fetching error
22 lines
648 B
PHP
22 lines
648 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 = array();
|
|
|
|
$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;
|
|
}
|
|
}
|