Coder Social home page Coder Social logo

royalflyby / pornhubdownloader Goto Github PK

View Code? Open in Web Editor NEW
95.0 95.0 37.0 675.46 MB

A pornhub.com downloader that allows you to login so you can download everything you have access to. including but not limited to private videos, 1080p or higher resolutions, premium videos and even paid videos that you own.

License: GNU General Public License v3.0

Go 100.00%

pornhubdownloader's Introduction

PornHubDownloader

A pornhub.com downloader that allows you to login, so you can download everything you have access to, including but not limited to private videos, 1080p or higher resolutions, premium videos and even paid videos that you own.

Supports the following things:

  • Premium videos (untested, no access - yet - ETA: February)
  • 1080p and higher resolution
  • Private videos (untested - no access)
  • Paid videos (untested - no access)

How does it work?

Download the program for your OS here.

The program logs in on the account you supplied, then visits the link you supplied and downloads the video in the highest resolution available.

Logging in is optional however in order to enjoy the features that other downloaders seem to lack it is necessary.

Downloading too many videos too quickly will result in the failure of the script, you need to visit the url in such case and do the captcha before you can resume to download again.

Examples

Regular URL: https://www.pornhub.com/view_video.php?viewkey=ph6378a03c46eb5

Premium url: https://www.pornhubpremium.com/view_video.php?viewkey=ph5cc5d3bdc5b02

Downloading a single video

./pornhubdownloader -video "https://www.pornhub.com/view_video.php?viewkey=ph6378a03c46eb5"

This would result in a file called: OMG!! 😳 My STEP-SIS professional Onlyfans whore 🥵.mp4.mp4 to be downloaded, the 720P version in this case.

You can also add a -namefmt flag to control the file name like this:

./pornhubdownloader -video "https://www.pornhub.com/view_video.php?viewkey=ph6378a03c46eb5" -namefmt "[:VIDEO_VIEW_KEY :DATE_UPLOADED-:TIME_UPLOADED] :UPLOADER_NAME - :VIDEO_NAME"

This would affect the filename, now the file will be called [ph6378a03c46eb5 2022-11-19-10-28-40] Angel - OMG!! 😳 My STEP-SIS professional Onlyfans whore 🥵.mp4

To speed things up you can also add -threads flag like this:

./pornhubdownloader -video "https://www.pornhub.com/view_video.php?viewkey=ph6378a03c46eb5" -threads 3

Alternatively you can save the links into a file in this fashion:

https://www.pornhub.com/view_video.php?viewkey=ph5ca48baebd5d7
https://www.pornhubpremium.com/view_video.php?viewkey=ph5cc5d3bdc5b02
https://www.pornhub.com/view_video.php?viewkey=ph5ca48baebd5d7
https://www.pornhubpremium.com/view_video.php?viewkey=ph5cc5d3bdc5b02
https://www.pornhub.com/view_video.php?viewkey=ph5ca48baebd5d7
https://www.pornhubpremium.com/view_video.php?viewkey=ph5cc5d3bdc5b02
https://www.pornhub.com/view_video.php?viewkey=ph5ca48baebd5d7
https://www.pornhubpremium.com/view_video.php?viewkey=ph5cc5d3bdc5b02

Save the file in the folder with the executable (or know the path to the file u just saved)

For this example let's say I saved it next to the executable with the name listofvids.txt

Then now I can download all the videos using this command:

./pornhubdownloader -videos=listofvids.txt

As mentioned above you can add the other flags with this example to enjoy the other features.

You can log in by adding a -username and -password flag like this:

./pornhubdownloader -videos=listofvids.txt -username "someusername" -password "somepassword"

Alternatively, if you don't want to type in your username and or password each time u can set the PHDL_USERNAME PHDL_PASSWORD environment variables. Keep in mind the program will not always actually login since it actually keeps an active session after logging in.

Finally, the program is able to self-check for updates. Run this command: ./pornhubdownloader -version, it will print it's current version and if there's a new version it will state it as well.

For developers

You can access program-friendly downloader updates by adding a -daemon flag, this will cause the program to print JSON which you could parse and build a UI with.

Disclaimer

Use at own risk.

My experience (outdated)

The downloader seems to be able to do 60+ videos of decent size without getting captchas but this was with a temporary premium account.

The program automatically crosses off the videos it managed to download from your list in case some fail you don't have to URL hunt

This is by far the most complete downloader around.

Future

I don't plan on actively working on this project, I will update when I have time in case bugs occur caused by pornhub updating their services.

Feel free to try to crack the .session file, if you succeed and can tell me how you did it it would be appreciated because I could always use tips on how to improve security.

If a feature is missing let me know.

If you think this program automatically does cool things, and you get mad it can only download the files that your account has access to, please gkys.

pornhubdownloader's People

Contributors

royalflyby avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pornhubdownloader's Issues

invalid memory address or nil pointer dereference

I tried to download a list of vids (not Premium) exactly following Your instructions @RoyalFlyBy; with the 1st yesterday all right, but with the 2nd list nowday, the result is this.
screen
The same problem happens with single videos of the list, HDs and/or not. Where am I wrong😭???

Platforms

I don't know where else to put this so I'm gonna ask here
Do you have any plans to make this downloader for Mac or Linux

exit status 1

I used to get the occasional "exit status 1" message, but now it happens every time. It was all working beautifully until around April 2023. Does anyone know how to run in verbose or how to show debugging info.

I'm not sure if I'm the only one with this issue, so I figured I would check in here first.

Major update coming soon

I have started working on another project that forced me to rewrite some download code to make it much more efficient.

This resulted in a separate yet more superior codebase so I will probably have to rethink the entire way I do these downloader kind of programs all together.

I am currently looking into making this more efficient, easier to use and easier to program.

I therefore am planning an update that will deprecate this entire repository.

Peak for the current features I have planned:

  1. Multi threaded downloads
  2. A graphical user interface
  3. A browser backed scraping client
  4. A monolithic design, one downloader program that can have multiple plugins for multiple sites (but the plugins will also be standalone downloaders if you only want one plugin)
  5. Server design, I had a few people contact me to help them set this up on servers so they download in the cloud without having their home computer or connection getting used. Next update will make that much easier too since this ties in very neatly with the GUI (feature 2)
  6. More sites supported, as I'm moving into the plugins ecosystem I will be able to add more sites since making a plugin is less time-consuming

If you have any suggestions be sure to comment them in this thread, they will be considered

Error when trying to download videos from a list

When downloading videos from a list, the program gives the following error. I've tried various ways to get this working but it refuses to work. Any help is appreciated :)

C:\Users\Admin\Desktop\D Downloader>PHDownloader.exe -list=listofvids.txt
Not logging in
Getting video for: https://www.pornhub.com/view_video.php?viewkey=xxxxxxxxxxxxx
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x8 pc=0x68dcfd]

goroutine 1 [running]:
github.com/anaskhan96/soup.findOnce(0x0, 0xc000447560, 0x1, 0x1, 0x0, 0x746414, 0x13)
        C:/Users/BUNNY/go/src/github.com/anaskhan96/soup/soup.go:338 +0x31d
github.com/anaskhan96/soup.Root.Find(0x0, 0x0, 0x0, 0x7b0020, 0xc000460240, 0xc000447560, 0x1, 0x1, 0x0, 0x0, ...)
        C:/Users/BUNNY/go/src/github.com/anaskhan96/soup/soup.go:121 +0x89
PHDownloader/scraper.(*PHWebClient).GetVideo(0xc000447d70, 0xc00010c000, 0x2e, 0x1, 0x0, 0x2)
        C:/Users/BUNNY/go/src/PHDownloader/scraper/scraper.go:216 +0x30b
main.main()
        C:/Users/BUNNY/go/src/PHDownloader/main.go:140 +0x129c

android

could you develop for android ?
need use your source in android app

Please delete this issue!

EDIT: I'm sorry for the inconvenience, but putting up this issue was a mistake.
I hereby politely ask you, the creator of the repository to delete it.
Thank you!

runtime error: slice bounds out of range [:-2](when trying to download a private video)

I successfully download a public video at first.
But this happened when I try to download a private video.
C:\Users\80760>D:\githubDownload\PornHubDownloader-master\PHDownloader.exe -URL=https://www.pornhub.com/view_video.php?viewkey=ph5597feee1d81f

`By (|/)RoyalFlyBy(|) on GitHub https://github.com/RoyalFlyBy/PornHubDownloader
Status: Resolving video URL's
panic: runtime error: slice bounds out of range [:-2]

goroutine 1 [running]:
PHDownloader/scraper.(*PHWebClient).GetVideo(0xc0001dfb08, 0xc0000202b4, 0xf, 0x1, 0xf, 0xc00034eab0)
C:/Users/BUNNY/go/src/PHDownloader/scraper/scraper.go:128 +0x1003
main.GetDownloadTasks(0xd47b20, 0x0, 0x0, 0xc0000298c0, 0x1, 0x948122, 0x17, 0xc0001860a0, 0x0, 0x0, ...)
C:/Users/BUNNY/go/src/PHDownloader/main.go:329 +0x2c5
main.main()
C:/Users/BUNNY/go/src/PHDownloader/main.go:157 +0xa15`

Any help is appreciated.

No longer functioning

I'm really sorry to inform You that PHDownloader no longer works, with or without account, Free or Premium. It doesn't download anything anymore. I believe PH has changed its parameters.

Unexpected error: 'runtime error: slice bounds out of range' (Fan Only Videos)

I tried to download an «Only for Fans» video chosen at random: this one. The screen that comes out is the following:
Screen
The file PHDownloader.logreport this:

[DEBUG]:	2019/12/14 11:41:22 Going to log in
[INFO]:	2019/12/14 11:41:25 Logged in successfully
[DEBUG]:	2019/12/14 11:41:25 &{1  https://www.pornhubpremium.com/user/login_auto?response=VHyaSl0OV-5FdibsC8Z31gvHVyC9mL6pEdjYMA_2zKIav9LAjbN_LbExNaqHe9vGbDirG09Q7mIjGa75Ex5CCAI_MUbE9u-B2u2HUqDgqGVwzbknIIipEIE2yRFYv7yutcbYayJo_k8Hq5NGuCY9jMZOKSt4Rgn6gVbzgKbsYHZ0EAxUdBy0PBfh4VGfxngme7wdQ4iK2hnmOk5sey6b7ku0cdHp9Z0bdKqtdOUolG8w5Q-GAXCwT99k83nEYRkmQU2e7vqswGibYkBXQAtrX76vdn_nG5mtilXyvdARi3vOPX9ydT3CSVPYqYiP6FwYXGmQZ62FHZlJaOWbcqupM5xUktzp50ZxT_yyGL-PslS8my4OevMImEUwTNyVf8ze3UOjTleXE0uNpSZRC8BII98VAGJ_Ll-qV0DhE5DkRlfWOnlcR0gYbsk_cJV_OnIpIkM972BxaortWPajG2o9WOrjhagRfG9XsE6lJZ-u5B0Jy4W65VBg0kI0dGQIczLdbQS4GgmtI1KqLjRc-BgIL-i4XK1HdGXw23eK2xvYpQ2ZImJR77tRQ0YxZf_k 1 false false VHyaSl0OV-5FdibsC8Z31gvHVyC9mL6pEdjYMA_2zKIav9LAjbN_LbExNaqHe9vGbDirG09Q7mIjGa75Ex5CCAI_MUbE9u-B2u2HUqDgqGVwzbknIIipEIE2yRFYv7yutcbYayJo_k8Hq5NGuCY9jMZOKSt4Rgn6gVbzgKbsYHZ0EAxUdBy0PBfh4VGfxngme7wdQ4iK2hnmOk5sey6b7ku0cdHp9Z0bdKqtdOUolG8w5Q-GAXCwT99k83nEYRkmQU2e7vqswGibYkBXQAtrX76vdn_nG5mtilXyvdARi3vOPX9ydT3CSVPYqYiP6FwYXGmQZ62FHZlJaOWbcqupM5xUktzp50ZxT_yyGL-PslS8my4OevMImEUwTNyVf8ze3UOjTleXE0uNpSZRC8BII98VAGJ_Ll-qV0DhE5DkRlfWOnlcR0gYbsk_cJV_OnIpIkM972BxaortWPajG2o9WOrjhagRfG9XsE6lJZ-u5B0Jy4W65VBg0kI0dGQIczLdbQS4GgmtI1KqLjRc-BgIL-i4XK1HdGXw23eK2xvYpQ2ZImJR77tRQ0YxZf_k}
[DEBUG]:	2019/12/14 11:41:25 Going to visit: https://www.pornhubpremium.com/view_video.php?viewkey=ph5beefe058813a
[DEBUG]:	2019/12/14 11:41:25 Extracted view key: ph5beefe058813a
[FATAL]:	2019/12/14 11:41:26 Unexpected error: 'runtime error: slice bounds out of range'

Please @RoyalFlyBy, I wonder if it can be possible bypass the "block", if I've to insert more instructions in the propt or if it's absolute necessary to be fans, in order to download that kind of videos🤔.

problem with Premium account(s)

After creating a (more or less temporary) PornHub Premium account, I tried to download a Premium video, but the result that I get is the following (I also tried to change the string: the image shows both attempts).
screen
Where am I wrong???
I want to point out that if I download a non-Premium video, Your software works excellently (at least for the couple of videos I tried). If You want, @RoyalFlyBy, also use my Premium credentials in the image to do tests, 'cause I won't use them longer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.