mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-04 18:14:44 +02:00
fix(duckduckgo): order by date (#3689)
This commit is contained in:
parent
07f49225d9
commit
cb6c931b1f
6 changed files with 55 additions and 37 deletions
|
@ -170,22 +170,21 @@ class JustWatchBridge extends BridgeAbstract
|
|||
$item = [];
|
||||
$item['uri'] = $title->find('a', 0)->href;
|
||||
|
||||
$posterImage = $title->find('.title-poster__image > img', 0);
|
||||
$itemTitle = sprintf(
|
||||
'%s - %s',
|
||||
$provider->find('picture > img', 0)->alt ?? '',
|
||||
$title->find('.title-poster__image > img', 0)->alt ?? ''
|
||||
$posterImage->alt ?? ''
|
||||
);
|
||||
$item['title'] = $itemTitle;
|
||||
|
||||
$imageUrl = $title->find('.title-poster__image > img', 0)->attr['src'] ?? '';
|
||||
$imageUrl = $posterImage->attr['src'] ?? '';
|
||||
if (str_starts_with($imageUrl, 'data')) {
|
||||
$imageUrl = $title->find('.title-poster__image > img', 0)->attr['data-src'];
|
||||
$imageUrl = $posterImage->attr['data-src'];
|
||||
}
|
||||
|
||||
$content = '<b>Provider:</b> '
|
||||
. $provider->find('picture > img', 0)->alt . '<br>';
|
||||
$content .= '<b>Media:</b> '
|
||||
. $title->find('.title-poster__image > img', 0)->alt . '<br>';
|
||||
$content = '<b>Provider:</b> ' . $provider->find('picture > img', 0)->alt . '<br>';
|
||||
$content .= '<b>Media:</b> ' . ($posterImage->alt ?? '') . '<br>';
|
||||
|
||||
if (isset($title->find('.title-poster__badge', 0)->plaintext)) {
|
||||
$content .= '<b>Type:</b> Series<br>';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue