Spaces:
Running
Running
Delete pytrends/exceptions.py
Browse files- pytrends/exceptions.py +0 -17
pytrends/exceptions.py
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
class ResponseError(Exception):
|
2 |
-
""" Something was wrong with the response from Google. """
|
3 |
-
|
4 |
-
def __init__(self, message, response):
|
5 |
-
super().__init__(message)
|
6 |
-
# pass response so it can be handled upstream
|
7 |
-
self.response = response
|
8 |
-
|
9 |
-
@classmethod
|
10 |
-
def from_response(cls, response):
|
11 |
-
message = f'The request failed: Google returned a response with code {response.status_code}'
|
12 |
-
return cls(message, response)
|
13 |
-
|
14 |
-
|
15 |
-
class TooManyRequestsError(ResponseError):
|
16 |
-
""" Exception raised when the backend returns a 429 error code. """
|
17 |
-
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|