Skip to main content

This is a simple library that scrapes PornHub for content, and provides a simple, elegant API for interacting with the website.

Only Python 3 is supported.

Example Usage

>>> from phlib import PornHub
>>> ph = PornHub()

>>> ph.categories
...

>>> ph['example category']
<Category title='example category'>

>>> cat = _
>>> cat.videos(max=25)
...

>>> ph.search('some search term')
...

Videos have a download() method, which will download the video to your current directory.

A CLI utility is provided, ph:

Ph — empowering porn users everywhere.

Usage:
  ph <search>... [--max=<n>] [--meta] [--download]
  ph (-h | --help)
  ph --version

Options:
  -h --help     Show this screen.
  --version     Show version.
  --max=<n>     Maximum number of videos to list [default: 25].
  --meta        Display video meta-data.
  --list        List categories.
  --download    Downloads videos.

Enjoy!

Release files for phlib 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for phlib 0.1.1
File Size Uploaded
phlib-0.1.1.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for phlib 0.1.1
File Interpreter ABI Platform
phlib-0.1.1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 9.4 kB

Release files / phlib-0.1.1.tar.gz

Download URL phlib-0.1.1.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
fb4ef60c788e5141c5f258e52253e4797d563634d282d41df82f06641ede0093
BLAKE2b-256 checksum
How to use checksums
eb70f2e3b884b3726ba5b8abe0172fda442ea48b997a4e1f885f4d77ffae288a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / phlib-0.1.1-py2.py3-none-any.whl

Download URL phlib-0.1.1-py2.py3-none-any.whl
Size 5.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
f61cb1fd82902c31ab279fba6707d4415f7b333ea3d393df907261f7713dcfbf
BLAKE2b-256 checksum
How to use checksums
488fee8515e96adf397c8f9d85cc666b4f3ec0ab6786334753f7655942715a1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page