mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-05 17:19:37 +00:00
[YahtzeeDevDiary] Add new bridge (#1297)
This commit is contained in:
parent
1022b5fdf9
commit
d1e4bd7285
21
bridges/YahtzeeDevDiaryBridge.php
Normal file
21
bridges/YahtzeeDevDiaryBridge.php
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
class YahtzeeDevDiaryBridge extends BridgeAbstract {
|
||||||
|
const MAINTAINER = 'somini';
|
||||||
|
const NAME = "Yahtzee's Dev Diary";
|
||||||
|
const URI = 'https://www.escapistmagazine.com/v2/yahtzees-dev-diary-completed-games-list/';
|
||||||
|
const DESCRIPTION = 'Yahtzee’s Dev Diary Series';
|
||||||
|
|
||||||
|
public function collectData(){
|
||||||
|
$html = getSimpleHTMLDOM($this->getURI())
|
||||||
|
or returnServerError('Could not load content');
|
||||||
|
|
||||||
|
foreach($html->find('blockquote.wp-embedded-content a') as $element) {
|
||||||
|
$item = array();
|
||||||
|
|
||||||
|
$item['title'] = $element->innertext;
|
||||||
|
$item['uri'] = $element->href;
|
||||||
|
|
||||||
|
$this->items[] = $item;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user