mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-09 16:38:50 +00:00
[NordbayernBridge] add author & timestamp of article (#2309)
This commit is contained in:
parent
297a6cf191
commit
3a9e528301
@ -6,7 +6,7 @@ class NordbayernBridge extends BridgeAbstract {
|
|||||||
const NAME = 'Nordbayern';
|
const NAME = 'Nordbayern';
|
||||||
const CACHE_TIMEOUT = 3600;
|
const CACHE_TIMEOUT = 3600;
|
||||||
const URI = 'https://www.nordbayern.de';
|
const URI = 'https://www.nordbayern.de';
|
||||||
const DESCRIPTION = 'Bridge for Bavarian reginoal news site nordbayern.de';
|
const DESCRIPTION = 'Bridge for Bavarian regional news site nordbayern.de';
|
||||||
const PARAMETERS = array( array(
|
const PARAMETERS = array( array(
|
||||||
'region' => array(
|
'region' => array(
|
||||||
'name' => 'region',
|
'name' => 'region',
|
||||||
@ -82,6 +82,8 @@ class NordbayernBridge extends BridgeAbstract {
|
|||||||
defaultLinkTo($article, self::URI);
|
defaultLinkTo($article, self::URI);
|
||||||
|
|
||||||
$item['uri'] = $link;
|
$item['uri'] = $link;
|
||||||
|
$item['author'] = $article->find('[class=article__author extrabold]', 0)->plaintext;
|
||||||
|
$item['timestamp'] = strtotime(str_replace('Uhr','', $article->find('[class=article__release]',0)->plaintext));
|
||||||
if ($article->find('h2', 0) == null) {
|
if ($article->find('h2', 0) == null) {
|
||||||
$item['title'] = $article->find('h3', 0)->innertext;
|
$item['title'] = $article->find('h3', 0)->innertext;
|
||||||
} else {
|
} else {
|
||||||
@ -121,7 +123,7 @@ class NordbayernBridge extends BridgeAbstract {
|
|||||||
$item['content'] .= '<img src="' . $images[$i] . '">';
|
$item['content'] .= '<img src="' . $images[$i] . '">';
|
||||||
}
|
}
|
||||||
|
|
||||||
// exclude police reports if descired
|
// exclude police reports if desired
|
||||||
if($this->getInput('policeReports') ||
|
if($this->getInput('policeReports') ||
|
||||||
!str_contains($item['content'], 'Hier geht es zu allen aktuellen Polizeimeldungen.')) {
|
!str_contains($item['content'], 'Hier geht es zu allen aktuellen Polizeimeldungen.')) {
|
||||||
$this->items[] = $item;
|
$this->items[] = $item;
|
||||||
|
Loading…
Reference in New Issue
Block a user