Skip to main content

A Python API for the Porn Site HQPorner.com

Project description

HQPorner API

Table of contents

Description

HQPorner API is an API written for the Porn site hqporner.com
It can retrieve data by extracting them from the HTML code
with Beautifulsoup and requests.

Please note that web scarping isn't allowed in most cases!
Consider using a VPN when using this API

Installation

# Installing via PyPi

pip install --upgrade hqporner_api

# Installing from GitHub to get latest version

pip install git+https://github.com/EchterAlsFake/hqporner_api.git

Usage

Import the package:

from hqporner_api.api import API

Arguments

  • URL: Must be URL of hqporner.com ending with .html

  • Quality:

    • 360 : Returns 360p quality video
    • 720 : Returns 720p quality video
    • 1080 : Returns 1080p quality video
    • 2160 : Returns 2160p quality video
    • 'highest': Returns highest quality available (Recommended!)
  • Path: Where the video should be stored in

  • File: Location of the file containing urls. Separated by new lines!

Get the title of the video

title = API().extract_title(url)

Get the actresses of the video

actress = API().extract_actress(url) # Returns a list of actresses (string)

Get direct download URLs

url = API().get_direct_url(url, quality) # Returns URL for given quality

Download the video

API().download(url, quality, path) # Downloads the video with a tqdm progressbar

Note: Download speeds can be slow if the CDN Network is slow.

Download from file

API().download(file, quality, path) # Downloads all urls from file. Separate URLs with new line

Get length of the video

API().get_length(url) # Returns video length (string)

Get publish date of the video

API().get_publish_date(url) # Returns the publish date (string)

Get categories of the video

API().get_categories(url) # Returns a list with categories (string)

Exceptions are in exceptions.py, but they aren't really well implemented yet.

License

Licensed under the LGPLv3 License

Copyright (C) 2023 EchterAlsFake

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

hqporner_api-0.3.post2.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hqporner_api-0.3.post2-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file hqporner_api-0.3.post2.tar.gz.

File metadata

  • Download URL: hqporner_api-0.3.post2.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for hqporner_api-0.3.post2.tar.gz
Algorithm Hash digest
SHA256 39c3ccbef7a0533125db8540edaacd22467be04e1e2b68b35700c8daff647542
MD5 cf87b83ce844232f2d9d6f7361edbced
BLAKE2b-256 445e4e289ae7a8c17124d809bcf0db2e843ec83ba9fbdec6eaface0e0660d7b9

See more details on using hashes here.

File details

Details for the file hqporner_api-0.3.post2-py3-none-any.whl.

File metadata

File hashes

Hashes for hqporner_api-0.3.post2-py3-none-any.whl
Algorithm Hash digest
SHA256 08977e71d0ffbd6a2f06dd54442747002d61b8d3dcb76b4d13bebcb12f5b0e1c
MD5 d654cc701fbe2cfe0e90705999dd5d15
BLAKE2b-256 d500f8297fe5f5763d983b9dedacb5c1e0255e9f5852c75c5b07f29cb5bc88e2

See more details on using hashes here.

Supported by

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