From 0dc6c66840a0dfd13b4ccb7408196c810b02ce46 Mon Sep 17 00:00:00 2001 From: Dag Date: Sun, 24 Sep 2023 00:03:21 +0200 Subject: [PATCH] fix: add duration (#3699) --- bridges/PornhubBridge.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bridges/PornhubBridge.php b/bridges/PornhubBridge.php index b8f1dec8..788ef58a 100644 --- a/bridges/PornhubBridge.php +++ b/bridges/PornhubBridge.php @@ -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'] = ''; + $item['content'] = sprintf('
%s', $item['uri'], $image, $duration); } $uploaded = explode('/', $image);