mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-26 11:26:31 +03:00
[ExplosmBridge] Add bridge (#2092)
This commit is contained in:
parent
3585575d68
commit
e48617530d
1 changed files with 22 additions and 0 deletions
22
bridges/ExplosmBridge.php
Normal file
22
bridges/ExplosmBridge.php
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
class ExplosmBridge extends FeedExpander {
|
||||
|
||||
const MAINTAINER = 'bockiii';
|
||||
const NAME = 'Explosm Bridge';
|
||||
const URI = 'https://www.explosm.com/';
|
||||
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;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue