迁移目录
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
"""
|
||||
异常定义
|
||||
"""
|
||||
|
||||
|
||||
class CrawlerError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class RateLimitError(CrawlerError):
|
||||
def __init__(self, message="频率限制", retry_after: int = 60):
|
||||
self.retry_after = retry_after
|
||||
super().__init__(message)
|
||||
|
||||
|
||||
class BlockedError(CrawlerError):
|
||||
pass
|
||||
|
||||
|
||||
class CaptchaError(CrawlerError):
|
||||
pass
|
||||
|
||||
|
||||
class NetworkError(CrawlerError):
|
||||
pass
|
||||
|
||||
|
||||
class ParsingError(CrawlerError):
|
||||
pass
|
||||
|
||||
|
||||
class FingerprintError(CrawlerError):
|
||||
pass
|
||||
|
||||
|
||||
class ProxyError(CrawlerError):
|
||||
pass
|
||||
|
||||
|
||||
class AntiDetectError(CrawlerError):
|
||||
pass
|
||||
|
||||
|
||||
class SessionExpiredError(CrawlerError):
|
||||
pass
|
||||
Reference in New Issue
Block a user