rss-bridge/bridges/NFLRUSBridge.php
Dag 563c099d80
[NFLRUS] fix: broken css selectors (#2640)
This bridge needs more work.
2022-04-12 23:35:04 +02:00

27 lines
673 B
PHP

<?php
class NFLRUSBridge extends BridgeAbstract {
const NAME = 'NFLRUS';
const URI = 'http://nflrus.ru/';
const DESCRIPTION = 'Returns the recent articles published on nflrus.ru';
const MAINTAINER = 'Maxim Shpak';
public function collectData() {
$html = getSimpleHTMLDOM(self::URI);
$html = defaultLinkTo($html, self::URI);
$articles = $html->find('.big-post_content-col');
foreach($articles as $article) {
$item = array();
$url = $article->find('.big-post_title.card-title a', 0);
$item['uri'] = $url->href;
$item['title'] = $url->plaintext;
$item['content'] = $article->find('div', 0)->innertext;
$this->items[] = $item;
}
}
}