blob: d257520b529088e0c8333a30f6b27aee9c1c7e6d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# coding=utf-8
from __future__ import absolute_import
from subliminal import ProviderError
class TooManyRequests(ProviderError):
"""Exception raised by providers when too many requests are made."""
pass
class APIThrottled(ProviderError):
pass
class ParseResponseError(ProviderError):
"""Exception raised by providers when they are not able to parse the response."""
pass
class IPAddressBlocked(ProviderError):
"""Exception raised when providers block requests from IP Address."""
pass
class SearchLimitReached(ProviderError):
"""Exception raised when maximum searches for a provider have been reached."""
pass
class MustGetBlacklisted(ProviderError):
def __init__(self, id: str, media_type: str):
super().__init__()
self.id = id
self.media_type = media_type
|