Errors¶
PHUB can raise the following expressions.
- exception phub.errors.ClientAlreadyLogged¶
The Client is already logged in.
- exception phub.errors.LoginFailed¶
The Client failed to connect. Input credentials might be wrong.
- exception phub.errors.RegexError¶
A regex failed to execute.
- exception phub.errors.URLError¶
The provided URL is invalid.
- exception phub.errors.ParsingError¶
The parser failed to properly fetch data.
- exception phub.errors.MaxRetriesExceeded¶
A process failed after too many retries.
Note: You can use: attr:Client.delay to slow down requests.
- exception phub.errors.UserNotFound¶
User could not be found either because it does not exists, or its name/URL is wrong.
- exception phub.errors.NoResult¶
A query failed to retrieve an item at a specific index. Most of the time, this is the equivalent of a StopIteration signal.
- exception phub.errors.InvalidCategory¶
The category is invalid.
- exception phub.errors.VideoError¶
Pornhub refused to serve video data because of some internal error (mostly because the video is not available).
- exception phub.errors.RegionBlocked¶
Sometimes videos can be blocked in your region. In this case PHUB can’t fetch data.
Note: This could also be a private video. You only see this Information if you are logged in. This is a problem of PornHub itself and not related to PHUb!
- exception phub.errors.PremiumVideo¶
Raises when a video is a PornHub premium video.