A light pornhub downloading interface
Project description
PH Fetch
A light python interface for fetching and downloading videos from Pornhub.
Usage
Initialisation:
import phfetch
# Initialise with a video url
video = phfetch.video( url = 'https://...' )
# Or a viewkey token
video = phfetch.video( key = 'xxxxxxxxxx' )
Available video infos:
>>> video.title # The Pornhub title of the video
>>> video.available # Whether the video is available to view (because deleted or not disponible in country)
>>> video.duration # The video duration (in seconds)
>>> video.hotspots # The list of hotspots of the video
To download a video:
# Using an absolute or relative file path
video.download( path = 'my-video.mp4' )
# Using a directory path (the file name will be the video title)
video.download( path = 'my-dir/' )
# Using a specific quality
video.download( path = './', quality = 'best')
# Possible quality values:
# best, middle, worst or an int
# Can also be a constant from pyhub.Quality, e.g:
video.download( path = './', quality = pyhub.Quality.BEST )
An example UI implementation can be found in the ui.py
file:
Installation
Minimum python version: 3.11
Dependencies: requests
Install using pip:
pip install git+https://github.com/Egsagon/pornhub-fetch.git
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
phfetch-1.1.tar.gz
(8.3 kB
view hashes)
Built Distribution
phfetch-1.1-py3-none-any.whl
(8.6 kB
view hashes)