mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-04 18:14:44 +02:00
fix: various small notice fixes (#3474)
* fix(patreon): php notice * fix(pepperbridge): php notice * fix(ebay): php notice * fix(tiktok): php notice * fix(yandex): fix notice * fix(justwatch): notice * lint
This commit is contained in:
parent
372880b5ef
commit
748fc9fd65
9 changed files with 50 additions and 25 deletions
|
@ -169,10 +169,17 @@ class JustWatchBridge extends BridgeAbstract
|
|||
foreach ($titles as $title) {
|
||||
$item = [];
|
||||
$item['uri'] = $title->find('a', 0)->href;
|
||||
$item['title'] = $provider->find('picture > img', 0)->alt . ' - ' . $title->find('.title-poster__image > img', 0)->alt;
|
||||
$image = $title->find('.title-poster__image > img', 0)->attr['src'];
|
||||
if (str_starts_with($image, 'data')) {
|
||||
$image = $title->find('.title-poster__image > img', 0)->attr['data-src'];
|
||||
|
||||
$itemTitle = sprintf(
|
||||
'%s - %s',
|
||||
$provider->find('picture > img', 0)->alt ?? '',
|
||||
$title->find('.title-poster__image > img', 0)->alt ?? ''
|
||||
);
|
||||
$item['title'] = $itemTitle;
|
||||
|
||||
$imageUrl = $title->find('.title-poster__image > img', 0)->attr['src'] ?? '';
|
||||
if (str_starts_with($imageUrl, 'data')) {
|
||||
$imageUrl = $title->find('.title-poster__image > img', 0)->attr['data-src'];
|
||||
}
|
||||
|
||||
$content = '<b>Provider:</b> '
|
||||
|
@ -190,7 +197,7 @@ class JustWatchBridge extends BridgeAbstract
|
|||
$content .= '<b>Poster:</b><br><a href="'
|
||||
. $title->find('a', 0)->href
|
||||
. '"><img src="'
|
||||
. $image
|
||||
. $imageUrl
|
||||
. '"></a>';
|
||||
|
||||
$item['content'] = $content;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue