fix(rumble): fix guid bug (#4232)

Remove tracking parameter in query to avoid feed readers to interpret these as new items
This commit is contained in:
Dag 2024-08-23 17:09:17 +02:00 committed by GitHub
parent b0674d7b19
commit c849576c93
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -60,12 +60,19 @@ class RumbleBridge extends BridgeAbstract
$dom = getSimpleHTMLDOM($url);
foreach ($dom->find('ol.thumbnail__grid div.thumbnail__grid--item') as $video) {
$itemUrlString = self::URI . $video->find('a', 0)->href;
$itemUrl = Url::fromString($itemUrlString);
$item = [
'title' => $video->find('h3', 0)->plaintext,
'uri' => self::URI . $video->find('a', 0)->href,
// Remove tracking parameter in query string
'uri' => $itemUrl->withQueryString(null)->__toString(),
'author' => $account . '@rumble.com',
'content' => defaultLinkTo($video, self::URI)->innertext,
];
$time = $video->find('time', 0);
if ($time) {
$publishedAt = new \DateTimeImmutable($time->getAttribute('datetime'));