diff --git a/docs/source/api/errors.rst b/docs/source/api/errors.rst index e025fc9..fadb048 100644 --- a/docs/source/api/errors.rst +++ b/docs/source/api/errors.rst @@ -25,4 +25,6 @@ PHUB can raise the following expressions. .. autoexception:: phub.errors.VideoError -.. autoexception:: phub.errors.RegionBlocked \ No newline at end of file +.. autoexception:: phub.errors.RegionBlocked + +.. autoexception:: phub.errors.PremiumVideo \ No newline at end of file diff --git a/docs/source/guides/gui-usage.rst b/docs/source/guides/gui-usage.rst index 453d4da..92407ee 100644 --- a/docs/source/guides/gui-usage.rst +++ b/docs/source/guides/gui-usage.rst @@ -4,7 +4,7 @@ GUI Usage If you want a simpler usage of PHUB, you can check out EchterAlsFake's `Porn Fetch`_ project. -.. image:: https://github.com/EchterAlsFake/Porn_Fetch/raw/9c634446b097f35d17fcf06e735e184ccd358c60/screenshot.png?raw=true +.. image:: https://github.com/EchterAlsFake/Porn_Fetch/blob/master/src/frontend/screenshots/1.png?raw=true :width: 600 .. _Porn Fetch: https://github.com/EchterAlsFake/Porn_Fetch \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 8d294c4..0cd4dc8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "phub" -version = "4.7.3" +version = "4.7.4" description = "An API for Pornhub" authors = [ {name = 'Egsagon', email = "egsagon.git@gmail.com"}, diff --git a/src/phub/consts.py b/src/phub/consts.py index ea1b0a7..f7c62be 100644 --- a/src/phub/consts.py +++ b/src/phub/consts.py @@ -261,8 +261,10 @@ class re: is_video_url = comp( p.fullmatch, _raw_root + r'view_video\.php\?viewkey=(?:ph)?[a-z\d]{3,}(&pkey=\d+)?' ) # Check if a video URL is valid is_quality = comp( p.fullmatch, r'\d+p?' ) # Check if is a video quality is_playlist = comp( p.fullmatch, r'^https?:\/\/(?:www\.)?(?:[a-z]{2}\.)?pornhub\.[a-z]{2,3}\/playlist\/\d+$' ) # Checks if it's a playlist + is_premium = comp(p.fullmatch, r'