Skip to main content

A PornHub client.

Project description

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!

Download files

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

Source Distribution

phlib-0.1.1.tar.gz (4.1 kB view hashes)

Uploaded source

Built Distribution

phlib-0.1.1-py2.py3-none-any.whl (5.3 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page