Skip to main content

An API for PornHub

Project description

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.

:warning: Early development: bugs may occur (also i'm a terrible programer)

Installation

  • Install using pip:
pip install --upgrade phub
  • Or using this repository to get latest features:
pip install --upgrade git+https://github.com/Egsagon/PHUB.git

CLI usage

You can use phub like so form the terminal to start a small downloading script: (Assuming py represents your python executable, on linux use python3)

py -m phub --help

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

py -m phub --url https://... -q 'best'

Package usage

Example video download usage:

import phub

client = phub.Client()
video = client.get('enter video URL here')

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

Example searching for videos:

record = client.search('enter query here')

# Display all videos (careful if there is a lot of results)
for video in record:
  print(video.title)

Documentation

See the wiki.

Why?

This project was made as an enhancement for pfetch, which aimed at downloading videos from PornHub.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

phub-2.7.tar.gz (27.2 kB view details)

Uploaded Source

Built Distribution

phub-2.7-py3-none-any.whl (28.5 kB view details)

Uploaded Python 3

File details

Details for the file phub-2.7.tar.gz.

File metadata

  • Download URL: phub-2.7.tar.gz
  • Upload date:
  • Size: 27.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for phub-2.7.tar.gz
Algorithm Hash digest
SHA256 c5637a364201af7f5131f2be73736f9e1d1e32017570ea1156db92734fc3f913
MD5 219eaabbf6b8648848956767cec04351
BLAKE2b-256 804b77da6ecc8763c5a7e4205ccac436f83b607feb2f0ae1f6551818c25bac40

See more details on using hashes here.

File details

Details for the file phub-2.7-py3-none-any.whl.

File metadata

  • Download URL: phub-2.7-py3-none-any.whl
  • Upload date:
  • Size: 28.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for phub-2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 7023fb5498b5810f494396c12772bfad43d8ac58b1f6206be2a9af5cf4d76061
MD5 3c6e34f084b129b89dcb3a414e2865be
BLAKE2b-256 d945e8da6f6ea2953c65f83bbf860f93cc5be6bda0e282211012f0dc8bc4d832

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page