You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
839 B
40 lines
839 B
6 years ago
|
# coding=utf-8
|
||
5 years ago
|
from __future__ import absolute_import
|
||
6 years ago
|
from subliminal import ProviderError
|
||
|
|
||
|
|
||
|
class TooManyRequests(ProviderError):
|
||
|
"""Exception raised by providers when too many requests are made."""
|
||
3 years ago
|
|
||
6 years ago
|
pass
|
||
|
|
||
3 years ago
|
|
||
6 years ago
|
class APIThrottled(ProviderError):
|
||
|
pass
|
||
5 years ago
|
|
||
3 years ago
|
|
||
5 years ago
|
class ParseResponseError(ProviderError):
|
||
|
"""Exception raised by providers when they are not able to parse the response."""
|
||
3 years ago
|
|
||
5 years ago
|
pass
|
||
5 years ago
|
|
||
3 years ago
|
|
||
5 years ago
|
class IPAddressBlocked(ProviderError):
|
||
3 years ago
|
"""Exception raised when providers block requests from IP Address."""
|
||
|
|
||
|
pass
|
||
|
|
||
|
|
||
3 years ago
|
class SearchLimitReached(ProviderError):
|
||
|
"""Exception raised when maximum searches for a provider have been reached."""
|
||
|
|
||
|
pass
|
||
|
|
||
|
|
||
3 years ago
|
class MustGetBlacklisted(ProviderError):
|
||
|
def __init__(self, id: str, media_type: str):
|
||
|
super().__init__()
|
||
|
|
||
|
self.id = id
|
||
|
self.media_type = media_type
|