phub 4.8.7__tar.gz → 4.8.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- phub-4.8.8/PKG-INFO +23 -0
- {phub-4.8.7 → phub-4.8.8}/pyproject.toml +17 -9
- {phub-4.8.7 → phub-4.8.8}/src/phub/consts.py +3 -1
- {phub-4.8.7 → phub-4.8.8}/src/phub/objects/video.py +3 -1
- {phub-4.8.7 → phub-4.8.8}/src/phub/utils.py +4 -0
- phub-4.8.7/PKG-INFO +0 -705
- phub-4.8.7/README.md +0 -89
- phub-4.8.7/pypi.md +0 -11
- phub-4.8.7/setup.cfg +0 -4
- phub-4.8.7/setup.py +0 -4
- phub-4.8.7/src/phub.egg-info/PKG-INFO +0 -705
- phub-4.8.7/src/phub.egg-info/SOURCES.txt +0 -37
- phub-4.8.7/src/phub.egg-info/dependency_links.txt +0 -1
- phub-4.8.7/src/phub.egg-info/entry_points.txt +0 -2
- phub-4.8.7/src/phub.egg-info/requires.txt +0 -3
- phub-4.8.7/src/phub.egg-info/top_level.txt +0 -1
- {phub-4.8.7 → phub-4.8.8}/LICENSE +0 -0
- {phub-4.8.7 → phub-4.8.8}/src/phub/__init__.py +0 -0
- {phub-4.8.7 → phub-4.8.8}/src/phub/__main__.py +0 -0
- {phub-4.8.7 → phub-4.8.8}/src/phub/core.py +0 -0
- {phub-4.8.7 → phub-4.8.8}/src/phub/errors.py +0 -0
- {phub-4.8.7 → phub-4.8.8}/src/phub/literals.py +0 -0
- {phub-4.8.7 → phub-4.8.8}/src/phub/modules/__init__.py +0 -0
- {phub-4.8.7 → phub-4.8.8}/src/phub/modules/display.py +0 -0
- {phub-4.8.7 → phub-4.8.8}/src/phub/modules/parser.py +0 -0
- {phub-4.8.7 → phub-4.8.8}/src/phub/modules/rss.py +0 -0
- {phub-4.8.7 → phub-4.8.8}/src/phub/objects/__init__.py +0 -0
- {phub-4.8.7 → phub-4.8.8}/src/phub/objects/account.py +0 -0
- {phub-4.8.7 → phub-4.8.8}/src/phub/objects/data.py +0 -0
- {phub-4.8.7 → phub-4.8.8}/src/phub/objects/feed.py +0 -0
- {phub-4.8.7 → phub-4.8.8}/src/phub/objects/image.py +0 -0
- {phub-4.8.7 → phub-4.8.8}/src/phub/objects/playlist.py +0 -0
- {phub-4.8.7 → phub-4.8.8}/src/phub/objects/query.py +0 -0
- {phub-4.8.7 → phub-4.8.8}/src/phub/objects/user.py +0 -0
- {phub-4.8.7 → phub-4.8.8}/src/phub/tests/__init__.py +0 -0
- {phub-4.8.7 → phub-4.8.8}/src/phub/tests/test_auth.py +0 -0
- {phub-4.8.7 → phub-4.8.8}/src/phub/tests/test_model.py +0 -0
- {phub-4.8.7 → phub-4.8.8}/src/phub/tests/test_playlist.py +0 -0
- {phub-4.8.7 → phub-4.8.8}/src/phub/tests/test_search.py +0 -0
- {phub-4.8.7 → phub-4.8.8}/src/phub/tests/test_video.py +0 -0
phub-4.8.8/PKG-INFO
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: phub
|
|
3
|
+
Version: 4.8.8
|
|
4
|
+
Summary: An API for Pornhub
|
|
5
|
+
Keywords: pornhub,phub,porn,api,web scrapper,api wrapper
|
|
6
|
+
Author: Egsagon, EchterAlsFake
|
|
7
|
+
Author-email: Egsagon <egsagon.git@gmail.com>, EchterAlsFake <EchterAlsFake@proton.me>
|
|
8
|
+
License-Expression: LGPL-3.0-only
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Programming Language :: Python
|
|
12
|
+
Requires-Dist: eaf-base-api
|
|
13
|
+
Requires-Dist: m3u8
|
|
14
|
+
Requires-Dist: lxml
|
|
15
|
+
Requires-Dist: av ; python_full_version >= '3.10' and extra == 'av'
|
|
16
|
+
Requires-Dist: httpx[http2] ; extra == 'full'
|
|
17
|
+
Requires-Dist: httpx[socks] ; extra == 'full'
|
|
18
|
+
Requires-Python: >=3.9
|
|
19
|
+
Project-URL: Documentation, https://phub.readthedocs.io
|
|
20
|
+
Project-URL: Documentation_Updated, https://github.com/EchterAlsFake/API_Docs/blob/master/Porn_APIs/PHUB.md
|
|
21
|
+
Project-URL: Repository, https://github.com/EchterAlsFake/PHUB
|
|
22
|
+
Provides-Extra: av
|
|
23
|
+
Provides-Extra: full
|
|
@@ -1,21 +1,33 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["uv_build>=0.9.18,<0.10.0"]
|
|
3
|
+
build-backend = "uv_build"
|
|
4
|
+
|
|
1
5
|
[project]
|
|
2
6
|
name = "phub"
|
|
3
|
-
version = "4.8.
|
|
7
|
+
version = "4.8.8"
|
|
4
8
|
description = "An API for Pornhub"
|
|
5
9
|
authors = [
|
|
6
10
|
{name = 'Egsagon', email = "egsagon.git@gmail.com"},
|
|
7
11
|
{name = "EchterAlsFake", email = "EchterAlsFake@proton.me"}
|
|
8
12
|
]
|
|
9
|
-
|
|
10
|
-
|
|
13
|
+
requires-python = ">=3.9"
|
|
14
|
+
license = "LGPL-3.0-only"
|
|
15
|
+
license-files = ["LICENSE"]
|
|
11
16
|
keywords = ["pornhub", "phub", "porn", "api", "web scrapper", "api wrapper"]
|
|
12
17
|
classifiers = [
|
|
13
18
|
"Development Status :: 4 - Beta",
|
|
14
19
|
"Programming Language :: Python"
|
|
15
20
|
]
|
|
16
|
-
dependencies = [
|
|
17
|
-
|
|
21
|
+
dependencies = [
|
|
22
|
+
"eaf_base_api",
|
|
23
|
+
"m3u8",
|
|
24
|
+
"lxml"
|
|
18
25
|
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
[project.optional-dependencies]
|
|
29
|
+
av = ["av; python_version >= '3.10'"]
|
|
30
|
+
full = ["httpx[http2]", "httpx[socks]"] # H2 for HTTP 2.0 support, LXML for faster parsing speed, though optional :)
|
|
19
31
|
|
|
20
32
|
[project.scripts]
|
|
21
33
|
phub = "phub.__main__:main"
|
|
@@ -25,9 +37,5 @@ Documentation = "https://phub.readthedocs.io"
|
|
|
25
37
|
Documentation_Updated = "https://github.com/EchterAlsFake/API_Docs/blob/master/Porn_APIs/PHUB.md"
|
|
26
38
|
Repository = "https://github.com/EchterAlsFake/PHUB"
|
|
27
39
|
|
|
28
|
-
[build-system]
|
|
29
|
-
requires = ["setuptools", "wheel"]
|
|
30
|
-
build-backend = "setuptools.build_meta"
|
|
31
|
-
|
|
32
40
|
[tool.setuptools.packages.find]
|
|
33
41
|
where = ["src"]
|
|
@@ -19,7 +19,9 @@ HEADERS = {
|
|
|
19
19
|
'Accept': '*/*',
|
|
20
20
|
'Accept-Language': 'en,en-US',
|
|
21
21
|
'Connection': 'keep-alive',
|
|
22
|
-
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/114.0'
|
|
22
|
+
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/114.0',
|
|
23
|
+
'Referer': 'https://www.pornhub.com/',
|
|
24
|
+
'Origin': 'https://www.pornhub.com',
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
COOKIES = {
|
|
@@ -4,6 +4,7 @@ import html
|
|
|
4
4
|
import os
|
|
5
5
|
import random
|
|
6
6
|
import logging
|
|
7
|
+
import traceback
|
|
7
8
|
from functools import cached_property
|
|
8
9
|
|
|
9
10
|
import httpx
|
|
@@ -266,7 +267,8 @@ class Video:
|
|
|
266
267
|
remux=remux, callback_remux=display_remux)
|
|
267
268
|
|
|
268
269
|
except Exception as e:
|
|
269
|
-
|
|
270
|
+
error = traceback.format_exc()
|
|
271
|
+
self.logger.error(f"An error occurred while downloading video {error}")
|
|
270
272
|
|
|
271
273
|
return path
|
|
272
274
|
|
|
@@ -254,4 +254,8 @@ def fix_url(url: str):
|
|
|
254
254
|
url = url.replace(language, "www", 1)
|
|
255
255
|
return url
|
|
256
256
|
|
|
257
|
+
|
|
258
|
+
if "#" in url: # Some URLs have a # at the end and some number, idk why but yeah, fixing that here...
|
|
259
|
+
url = url.split("#")[0]
|
|
260
|
+
|
|
257
261
|
return url # Sometimes URL doesn't need to be changed. In this case, just return it.
|