fix(rumble): add timestamp to items (#3485)

This commit is contained in:
Dag 2023-07-05 05:41:33 +02:00 committed by GitHub
parent 84501cfc00
commit 354317d010
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -40,9 +40,12 @@ class RumbleBridge extends BridgeAbstract
$dom = getSimpleHTMLDOM($url);
foreach ($dom->find('li.video-listing-entry') as $video) {
$datetime = $video->find('time', 0)->getAttribute('datetime');
$this->items[] = [
'title' => $video->find('h3', 0)->plaintext,
'uri' => self::URI . $video->find('a', 0)->href,
'timestamp' => (new \DateTimeImmutable($datetime))->getTimestamp(),
'author' => $account . '@rumble.com',
'content' => defaultLinkTo($video, self::URI)->innertext,
];