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

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.4.tar.gz (25.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

phub-2.4-py3-none-any.whl (27.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for phub-2.4.tar.gz
Algorithm Hash digest
SHA256 334d6befbf9d71f6d6d3bfd160faa7dc837011387cf44f06e9f8bf3f78ee34b1
MD5 b52b3452af9578e74e89645027c802db
BLAKE2b-256 fccbde2d2be37d1055051e644b2ed943a059da30addbb3436342f4414299a26c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: phub-2.4-py3-none-any.whl
  • Upload date:
  • Size: 27.2 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6eb32f956678ac19e140fa824ff1b019c07f325892600c87afb127483f1c9aad
MD5 a56938d7eda8ae3b87193704c2749906
BLAKE2b-256 cf9a17ef05a28005b7751e11ee6760b7e580b71176453d647168cdc677620de4

See more details on using hashes here.

Supported by

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