mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-10-16 00:56:08 +02:00
[TheOatmealBridge] new bridge (#4732)
This commit is contained in:
25
bridges/TheOatmealBridge.php
Normal file
25
bridges/TheOatmealBridge.php
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class TheOatmealBridge extends FeedExpander
|
||||||
|
{
|
||||||
|
const NAME = 'The Oatmeal';
|
||||||
|
const URI = 'https://theoatmeal.com/';
|
||||||
|
const DESCRIPTION = 'Fetch the entire comic image';
|
||||||
|
const MAINTAINER = 't0stiman';
|
||||||
|
const DONATION_URI = 'https://ko-fi.com/tostiman';
|
||||||
|
|
||||||
|
public function collectData()
|
||||||
|
{
|
||||||
|
$url = self::URI . 'feed/rss';
|
||||||
|
$this->collectExpandableDatas($url, 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function parseItem(array $item)
|
||||||
|
{
|
||||||
|
$page = getSimpleHTMLDOMCached($item['uri']);
|
||||||
|
$comicImage = $page->find('#comic > p > img', 0);
|
||||||
|
$item['content'] = $comicImage;
|
||||||
|
|
||||||
|
return $item;
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user