2021-05-13 21:35:42 +03:00
|
|
|
<?php
|
|
|
|
class ExplosmBridge extends FeedExpander {
|
|
|
|
|
|
|
|
const MAINTAINER = 'bockiii';
|
|
|
|
const NAME = 'Explosm Bridge';
|
2021-06-01 08:18:14 +03:00
|
|
|
const URI = 'https://www.explosm.net/';
|
2021-05-13 21:35:42 +03:00
|
|
|
const CACHE_TIMEOUT = 4800; //2hours
|
|
|
|
const DESCRIPTION = 'Returns the last 5 comics';
|
|
|
|
|
|
|
|
public function collectData(){
|
|
|
|
$this->collectExpandableDatas('https://feeds.feedburner.com/Explosm');
|
|
|
|
}
|
|
|
|
|
|
|
|
protected function parseItem($feedItem){
|
|
|
|
$item = parent::parseItem($feedItem);
|
|
|
|
$comicpage = getSimpleHTMLDOM($item['uri']);
|
|
|
|
$image = $comicpage->find('div[id=comic-wrap]', 0)->find('img', 0)->getAttribute('src');
|
|
|
|
$item['content'] = '<img src="https:' . $image . '" />';
|
|
|
|
|
|
|
|
return $item;
|
|
|
|
}
|
|
|
|
}
|