mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-26 03:16:33 +03:00
[PicnobBridge] Update description & uid (#3267)
- Description now allows HTML and relative URLs are rewritten - Post ID in the post URL is used as UID in the feed
This commit is contained in:
parent
4cfe69abb4
commit
7783e4133d
1 changed files with 5 additions and 2 deletions
|
@ -54,7 +54,7 @@ class PicnobBridge extends BridgeAbstract
|
|||
$relativeDate = str_replace(' ago', '', $element->find('.time', 0)->plaintext);
|
||||
date_sub($date, date_interval_create_from_date_string($relativeDate));
|
||||
|
||||
$description = trim($element->find('.sum', 0)->plaintext);
|
||||
$description = defaultLinkTo(trim($element->find('.sum', 0)->innertext), self::URI);
|
||||
|
||||
$isVideo = (bool) $element->find('.icon_video', 0);
|
||||
$videoNote = $isVideo ? '<p><i>(video)</i></p>' : '';
|
||||
|
@ -69,6 +69,8 @@ class PicnobBridge extends BridgeAbstract
|
|||
parse_str(parse_url($imageUrl, PHP_URL_QUERY), $imageVars);
|
||||
$imageUrl = $imageVars['u'];
|
||||
|
||||
$uid = explode('/', parse_url($url, PHP_URL_PATH))[2];
|
||||
|
||||
$this->items[] = [
|
||||
'uri' => $url,
|
||||
'timestamp' => date_format($date, 'r'),
|
||||
|
@ -83,7 +85,8 @@ class PicnobBridge extends BridgeAbstract
|
|||
{$tvNote}
|
||||
{$moreContentNote}
|
||||
<p>{$description}<p>
|
||||
HTML
|
||||
HTML,
|
||||
'uid' => $uid
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue