1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-25 17:31:25 +02:00

fix: a bunch of small changes in multiple bridges (#2644)

Mostly refactors.
This commit is contained in:
Dag
2022-04-12 23:37:30 +02:00
committed by GitHub
parent 5b7dd45b20
commit b6e8350596
12 changed files with 81 additions and 46 deletions

View File

@@ -67,7 +67,13 @@ class TorrentGalaxyBridge extends BridgeAbstract {
$item = array();
$item['uri'] = self::URI . $identity->href;
$item['title'] = $identity->plaintext;
$item['timestamp'] = DateTime::createFromFormat('d/m/y H:i', $creadate)->format('U');
// todo: parse date strings such as '1Hr ago' etc.
$createdAt = DateTime::createFromFormat('d/m/y H:i', $creadate);
if ($createdAt) {
$item['timestamp'] = $createdAt->format('U');
}
$item['author'] = $authorid->plaintext;
$item['content'] = <<<HTML
<h1>{$identity->plaintext}</h1>