mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-21 17:15:25 +03:00
fix: add duration (#3699)
This commit is contained in:
parent
d33808ea9e
commit
0dc6c66840
1 changed files with 5 additions and 1 deletions
|
@ -87,11 +87,15 @@ class PornhubBridge extends BridgeAbstract
|
|||
$url = $element->find('a', 0)->href;
|
||||
$item['uri'] = 'https://www.pornhub.com' . $url;
|
||||
|
||||
// Duration
|
||||
$marker = $element->find('div.marker-overlays var', 0);
|
||||
$duration = $marker->innertext ?? '';
|
||||
|
||||
// Content
|
||||
$videoImage = $element->find('img', 0);
|
||||
$image = $videoImage->getAttribute('data-src') ?: $videoImage->getAttribute('src');
|
||||
if ($show_images === true) {
|
||||
$item['content'] = '<a href="' . $item['uri'] . '"><img src="' . $image . '"></a>';
|
||||
$item['content'] = sprintf('<a href="%s"><img src="%s"></a><br>%s', $item['uri'], $image, $duration);
|
||||
}
|
||||
|
||||
$uploaded = explode('/', $image);
|
||||
|
|
Loading…
Reference in a new issue