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)

>>>'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.

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

  -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.


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

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 Python 2 Python 3

Supported by

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