Skip to content

aswlinke/PHUB

 
 

Repository files navigation

Note

With the end of vacations for me, this project will probably remain unmaintained for a lot of time. That said, i will still view issues/PRs/discussions and try to answer to them or apply quick fixes, so don't hesitate to post there.


PHUB

PHUB - An API for PornHub.

PHUB is an API wrapper for PornHub. It is able to fetch, search and download videos and supports account connections, achieved with efficient web scrapping using requests and regexes.

⚠️ This project is probably against Pornhub TOS.

Installation

  • Install using pip (python 3.11 or higher required):
pip install --upgrade phub
  • Or using this repository to get the latest features:
pip install --upgrade git+https://github.com/Egsagon/PHUB.git

CLI usage

You can use phub like so from the terminal as as CLI script:

python3 -m phub

Example for downloading a video knowing its url, in the best available quality:

python3 -m phub download --url https://www.pornhub.com/view_video.php?viewkey=xxx -q 'best'

UI Usage

You can use this masterpiece made by EchterAlsFake: EchterAlsFake/Porn_Fetch

Package usage

Exemple for downloading a video:

import phub

client = phub.Client()
video = client.get('enter video URL here')
print('Downloading:', video.title)

# Download on working dir with best quality
video.download('.', quality = phub.Quality.BEST)

Contributing

I don't plan to really maintain this after i start school, so feel free to support this project by submiting issues or requests and share the bugs you encountered in Known issues

Documentation

You can find out more on the API in the docs.

License

GPLv3 - See the LICENSE file.

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%