rss-bridge/bridges/YahtzeeDevDiaryBridge.php
Eugene Molotov 37cb4091d4
bridges: remove redundant "or returnServerError" after getContents/getSimpleHTMLDom/getSimpleHTMLDomCached (#2398)
When fetching website contents, exceptions already raise on fetching error
2022-01-02 14:36:09 +05:00

20 lines
557 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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 = 'Yahtzees Dev Diary Series';
public function collectData(){
$html = getSimpleHTMLDOM($this->getURI());
foreach($html->find('blockquote.wp-embedded-content a') as $element) {
$item = array();
$item['title'] = $element->innertext;
$item['uri'] = $element->href;
$this->items[] = $item;
}
}
}