1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-01-29 03:47:42 +01:00

fix(pinterest): set enclosure so it emits mrss media:content prop (#3980)

This commit is contained in:
Dag 2024-02-14 16:02:54 +01:00 committed by GitHub
parent 257799be8e
commit 598ee5b51e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -39,6 +39,9 @@ class PinterestBridge extends FeedExpander
$pattern = '/https\:\/\/i\.pinimg\.com\/[a-zA-Z0-9]*x\//';
foreach ($this->items as $item) {
$item['content'] = preg_replace($pattern, 'https://i.pinimg.com/originals/', $item['content']);
$item['enclosures'] = [
$item['uri'],
];
$newitems[] = $item;
}
$this->items = $newitems;