mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-01-09 13:07:27 +03:00
[MixologyBridge] add null checks for author and timestamp elements (#4383)
* [MixologyBridge] add null checks for author and timestamp elements * [MixologyBridge] fix formatting
This commit is contained in:
parent
e825272987
commit
45ee018a6e
1 changed files with 9 additions and 2 deletions
|
@ -55,8 +55,15 @@ class MixologyBridge extends BridgeAbstract
|
||||||
{
|
{
|
||||||
$article = getSimpleHTMLDOMCached($item['uri']);
|
$article = getSimpleHTMLDOMCached($item['uri']);
|
||||||
|
|
||||||
$item['author'] = $article->find('.beitrag-author a', 0)->plaintext;
|
$authorLink = $article->find('.beitrag-author a', 0);
|
||||||
$item['timestamp'] = strtotime($article->find('.beitrag-date time', 0)->datetime);
|
if (!empty($authorLink)) {
|
||||||
|
$item['author'] = $authorLink->plaintext;
|
||||||
|
}
|
||||||
|
|
||||||
|
$timeElement = $article->find('.beitrag-date time', 0);
|
||||||
|
if (!empty($timeElement)) {
|
||||||
|
$item['timestamp'] = strtotime($timeElement->datetime);
|
||||||
|
}
|
||||||
|
|
||||||
$content = '';
|
$content = '';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue