An API for PornHub
Project description
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
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
Built Distribution
File details
Details for the file phub-2.8.tar.gz
.
File metadata
- Download URL: phub-2.8.tar.gz
- Upload date:
- Size: 28.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c269ea0d35ec270fa9eb83b861c2d828892db03854b3806f32c3744cdf7337a |
|
MD5 | 318402033a3d3bfc6c9ef39602640007 |
|
BLAKE2b-256 | cc1ad7eb0ab23852bf3a05c01ab5ede524c2f60c93bd4f3a85d990cdf872963b |
File details
Details for the file phub-2.8-py3-none-any.whl
.
File metadata
- Download URL: phub-2.8-py3-none-any.whl
- Upload date:
- Size: 30.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 489b1613abf3957b502b17d9cec1cc8be5e14365b739e29470665ff7b9b26fa6 |
|
MD5 | b4a07353474956e473801f8ae47cae73 |
|
BLAKE2b-256 | 3a1a18c6ca485ed9e50df8ec1864157e86d828c5a724fe966abfa65a8e933acf |