Skip to content

Commit

Permalink
[pornhub:gif] extract 'viewkey' and 'timestamp' metadata (#4463)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Mar 22, 2024
1 parent 7a7dc44 commit 4b6f47e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gallery_dl/extractor/pornhub.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ def items(self):
"url" : extr('"contentUrl": "', '"'),
"date" : text.parse_datetime(
extr('"uploadDate": "', '"'), "%Y-%m-%d"),
"viewkey" : extr('From this video: '
'<a href="/view_video.php?viewkey=', '"'),
"timestamp": extr('lass="directLink tstamp" rel="nofollow">', '<'),
"user" : text.remove_html(extr("Created by:", "</div>")),
}

Expand Down
2 changes: 2 additions & 0 deletions test/results/pornhub.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,11 @@
"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",
},

{
Expand Down

0 comments on commit 4b6f47e

Please sign in to comment.