From 4b6f47e571f41cce02dcf1709a1efdf86b4a9d46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Fri, 22 Mar 2024 18:00:20 +0100 Subject: [PATCH] [pornhub:gif] extract 'viewkey' and 'timestamp' metadata (#4463) https://github.com/mikf/gallery-dl/issues/4463#issuecomment-2014550302 --- gallery_dl/extractor/pornhub.py | 3 +++ test/results/pornhub.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/gallery_dl/extractor/pornhub.py b/gallery_dl/extractor/pornhub.py index 7ff40a37..c7283fcd 100644 --- a/gallery_dl/extractor/pornhub.py +++ b/gallery_dl/extractor/pornhub.py @@ -143,6 +143,9 @@ class PornhubGifExtractor(PornhubExtractor): "url" : extr('"contentUrl": "', '"'), "date" : text.parse_datetime( extr('"uploadDate": "', '"'), "%Y-%m-%d"), + "viewkey" : extr('From this video: ' + '', '<'), "user" : text.remove_html(extr("Created by:", "")), } diff --git a/test/results/pornhub.py b/test/results/pornhub.py index e2aa9818..53e7df88 100644 --- a/test/results/pornhub.py +++ b/test/results/pornhub.py @@ -62,9 +62,11 @@ __tests__ = ( "hardcore sex", "babes 18 year", ], + "timestamp": "5:07", "title" : "Intense sloppy blowjob of Danika Mori", "url" : "https://el.phncdn.com/pics/gifs/043/726/891/43726891a.webm", "user" : "Danika Mori", + "viewkey" : "64367c8c78a4a", }, {