diff options
author | 2023-09-24 00:03:21 +0200 | |
---|---|---|
committer | 2023-09-24 00:03:21 +0200 | |
commit | 0dc6c66840a0dfd13b4ccb7408196c810b02ce46 (patch) | |
tree | b6eb886d95857d16ad424f235f723d9c8f814894 | |
parent | d33808ea9eddfb5fd7371e2ad0ba5c8d232a9b1f (diff) | |
download | rss-bridge-0dc6c66840a0dfd13b4ccb7408196c810b02ce46.tar.gz rss-bridge-0dc6c66840a0dfd13b4ccb7408196c810b02ce46.tar.zst rss-bridge-0dc6c66840a0dfd13b4ccb7408196c810b02ce46.zip |
fix: add duration (#3699)
-rw-r--r-- | bridges/PornhubBridge.php | 6 |
1 files changed, 5 insertions, 1 deletions
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'] = '<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); |