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.

Files for phlib, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size phlib-0.1.1-py2.py3-none-any.whl (5.3 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size phlib-0.1.1.tar.gz (4.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page