mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-12 01:48:48 +00:00
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:
parent
b0674d7b19
commit
c849576c93
@ -60,12 +60,19 @@ class RumbleBridge extends BridgeAbstract
|
|||||||
|
|
||||||
$dom = getSimpleHTMLDOM($url);
|
$dom = getSimpleHTMLDOM($url);
|
||||||
foreach ($dom->find('ol.thumbnail__grid div.thumbnail__grid--item') as $video) {
|
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 = [
|
$item = [
|
||||||
'title' => $video->find('h3', 0)->plaintext,
|
'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',
|
'author' => $account . '@rumble.com',
|
||||||
'content' => defaultLinkTo($video, self::URI)->innertext,
|
'content' => defaultLinkTo($video, self::URI)->innertext,
|
||||||
];
|
];
|
||||||
|
|
||||||
$time = $video->find('time', 0);
|
$time = $video->find('time', 0);
|
||||||
if ($time) {
|
if ($time) {
|
||||||
$publishedAt = new \DateTimeImmutable($time->getAttribute('datetime'));
|
$publishedAt = new \DateTimeImmutable($time->getAttribute('datetime'));
|
||||||
|
Loading…
Reference in New Issue
Block a user