Skip to content

Commit

Permalink
[YahtzeeDevDiary] Add new bridge (#1297)
Browse files Browse the repository at this point in the history
  • Loading branch information
somini authored and logmanoriginal committed Oct 31, 2019
1 parent 1022b5f commit d1e4bd7
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions bridges/YahtzeeDevDiaryBridge.php
Original file line number Diff line number Diff line change
@@ -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;
}
}
}

0 comments on commit d1e4bd7

Please sign in to comment.