Jump to content

Ripping Videos from Pornhub Premium


Guest swapsingh200

Recommended Posts

Guest swapsingh200

So, since Pornhub is running their free premium promotion, here's a way to get the download links from Pornhub Premium.

 

Step 1:

Install violentmonkey extension for your browser 

https://chrome.google.com/webstore/detail/violentmonkey/jinjaccalgkegednnccohejagnlnfdag?hl=en

https://addons.mozilla.org/en-US/firefox/addon/violentmonkey/

 

Step 2:

Add the following script to violentmonkey and save it.

// ==UserScript==
// @name        PH Downloader - pornhubpremium.com
// @namespace   Violentmonkey Scripts
// @match       https://www.pornhubpremium.com/view_video.php
// @grant       none
// @version     1.0
// @author      -
// @description 3/12/2020, 10:56:35 PM
// ==/UserScript==

// First find the name of the flashvar variable in one of the scripts on the page:
var start = document.documentElement.innerHTML.indexOf('var flashvars_') + 'var '.length;
var tempDoc = document.documentElement.innerHTML.substr(start);
var end = tempDoc.indexOf(' =');
var flashVarsName = tempDoc.substr(0, end);
var flashVars = unsafeWindow[flashVarsName];


// Create a new tab element on the page:
var tabs = document.getElementsByClassName('video-actions-tabs')[0];
var tab = document.createElement('div');
tab.className = 'video-action-tab my-custom-tab';
tabs.appendChild(tab);

var title = document.createElement('div');
title.className = 'title';
title.innerText = 'Use right click and "Save as..." to download.';
tab.appendChild(title);

for(var i = 0; i < flashVars.mediaDefinitions.length; i++) {
  var definition = flashVars.mediaDefinitions[i];
  if (definition.format === 'hls') {
    continue;
  }
  
  console.log(definition);
  var container = document.createElement('div');
  var a = document.createElement('a');
  a.innerText = 'Download (' + definition.quality + 'p, .' + definition.format + ')';
  a.dataset.videoUrl = definition.videoUrl;
  a.href = definition.videoUrl;
  a.download = 'test-' + definition.quality + '.' + definition.format;
  a.target = '_blank';
  
  a.style.fontSize = '140%';
  container.style.marginBottom = '6px';
  
  container.appendChild(a);
  tab.appendChild(container);
}


// Create a new menu item, which opens the new tab:
var menu = document.getElementsByClassName('tab-menu-wrapper-row')[0];
var newItem = document.createElement('div');
var sub = document.createElement('div');
var icon = document.createElement('i');
var text = document.createElement('span');
text.innerText = 'Download (GM)';
icon.className = 'main-sprite-dark-2';
sub.className = 'tab-menu-item tooltipTrig';
sub.dataset.title = 'Download (GM)';
sub.dataset.tab = 'my-custom-tab';
sub.appendChild(icon);
sub.appendChild(text);
newItem.className = 'tab-menu-wrapper-cell';
newItem.appendChild(sub);
menu.appendChild(newItem);
// ==UserScript==
// @name        New script 
// @namespace   Violentmonkey Scripts
// @match       *://*/*
// @grant       none
// @version     1.0
// @author      -
// @description 4/2/2020, 7:10:33 PM
// ==/UserScript==

 

Step 3:

Voila! You're done. Open your favourite video, and beside the share button, you'll see a Download (GM) button. Click on it, choose your quality and enjoy the download!

 

Note: You can use Jdownloader2 as well, but it doesn't give you the https links, and so I prefer it this way.

Link to comment
Guest huckingfoes

I appreciate the groundwork you've done OP, but after dealing in this business since you could capture RTC streams from Netflix et al., this is the best thing out there  and has never failed me. Designed to record camgirls -- obviously more difficult to archive than DRM'd video.

 

https://chrome.google.com/webstore/detail/stream-recorder-download/iogidnfllpdhagebkblkgbfijkbkjdmm

 

It never seems to miss streams of any kind. Let me know what you think but I've been amazed.

Link to comment

Nice script. This will work well especially for members who don't already have addons/extentions/programs to catch the stream. This is the first one i have seen that directly gets the (.mp4) file without having to rename file extension or convert it. IDM(Internet Download Manager catches the (stream link) as a (.ts) file, and all the (stream links) from [HLS addons] tend to download slower for me. Great Job. 

Edited by DarkWingDuck
  • Confused 1
Link to comment
  • 2 weeks later...
Guest vodoranger

On Firefox, Ant downloader for video will get the ones that others don't.  It sniffs out each of the possibly hundreds of separate segments in streams so even when that script doesn't work (When even paid premium users can't download), this will get still download them. 

Link to comment
7 hours ago, imevilx said:

how to do it elaborate

 

First you need to export the cookies of pornhub using

https://chrome.google.com/webstore/detail/cookiestxt/njabckikapfpffapmjgojcnbfjonfjfg?utm_source=chrome-ntp-icon

spacer.png

for firefox i didn't find a extension that download especific cookies only.

about the installation of youtube-dl on windows i can't explain it because i use linux.

in linux is just executing pip install youtube-dl , i don't recommend install it with package manager because sometimes is outdated.


the command is this

youtube-dl --cookies /path/to/cookies.txt -i -f "[height<=720]"  'link of pornhub video'

--cookies  is for use a cookies.txt file

-i is for ignore the errors that might occur

-f "[height<=720]" only downloads 720p or less, you can change it to something like "height<=480" only download 480p or less

you can ommit the link and add -a /path/to/file_with_links.txt to download multiple videos.

ex: youtube-dl --cookies /path/to/cookies.txt -i -f "[height<=720]" -a /path/to/file_with_links.txt

well sorry if this don't help you or is to hard of understand, i'm bad for explain and english isn't my language, thanks.

 

Google Translate™ 😅

Link to comment

Well i understood your messy explanation now how can i get tons of links for example from this link 'https://www.pornhubpremium.com/pornstar/dillion-harper/videos/premium' ?.

 

thats the easy part i think just open browser console CTRL+SHIFT+F (firefox) CTRL+SHIFT+J (chrome)

 

spacer.png

and run this

Quote

str = ""; Array.from(document.querySelectorAll('.videoUList li a.linkVideoThumb') ).forEach(el => {
  str+= el.href + "\n";
}); console.log(str);

that is gonna throw all the links in that page

spacer.png

you need to repeat the same for every page

spacer.png

but obviously that script only works for some pages here are others

 

Search Results:

Quote

str = ""; Array.from(document.querySelectorAll('#videoSearchResult li a.linkVideoThumb') ).forEach(el => {
  str+= el.href + "\n";
}); console.log(str);

Pornstars Videos (Sometimes the first one doesn't work):

Quote

str = ""; Array.from(document.querySelectorAll('#pornstarsVideoSection li a.linkVideoThumb') ).forEach(el => {
  str+= el.href + "\n";
}); console.log(str);

Channel Videos:

Quote

str = ""; Array.from(document.querySelectorAll('#showAllChanelVideos li a.linkVideoThumb') ).forEach(el => {
  str+= el.href + "\n"
}); console.log(str)

 

thats all, again sorry if you didn't understand

Edited by arufu
Channel Videos Script Added
Link to comment
  • 4 weeks later...
  • 4 weeks later...
On 4/7/2020 at 12:00 AM, huckingfoes said:

I appreciate the groundwork you've done OP, but after dealing in this business since you could capture RTC streams from Netflix et al., this is the best thing out there  and has never failed me. Designed to record camgirls -- obviously more difficult to archive than DRM'd video.

 

https://chrome.google.com/webstore/detail/stream-recorder-download/iogidnfllpdhagebkblkgbfijkbkjdmm

 

It never seems to miss streams of any kind. Let me know what you think but I've been amazed.

Good suggestion but just beware in most of the piracy community people really dislike recording for the following reasons:

1) It's slow, you have to watch the whole thing and leave your computer recording, won't work if you're trying to download 500 hours of porn.

2) It's low quality, because it will always be worse than the original, a copy is never perfect no matter what.

So if you can try download it normally, but I understand if you're doing that for camgirls whose shows are never recorded. I do understand this tool has downloading capabilities as well.

Link to comment
On 4/6/2020 at 4:11 PM, swapsingh200 said:

So, since Pornhub is running their free premium promotion, here's a way to get the download links from Pornhub Premium.

Very nice, only thing I'd say is bulk downloading with JDownloader 2 is still probably better than a download button, but an innovative solution nonethless! Only thing is what free promotion? Do you mean the free promotions that they always seem to have with 30 day free trials of Pornhub Premium for every seasonal event or is this something else that is easier? I may try carding Pornhub Premium, but I was just wondering what you meant by it and can I get access to it?

Link to comment
On 4/6/2020 at 4:11 PM, swapsingh200 said:

 

Okay nevermind I think I understand what you're saying, the pornhub premium stayhome kind of thing, but the promotion is now closed, just for anyone who was wondering.

Link to comment
  • 7 months later...

frealz. just jdownloader..

Automatically does base 64 decrypting.

I'm also pretty sure it is somehow working around the limits.  I just delete and retry and they somehow start working.

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...