@@ -598,16 +598,11 @@ <h3>Inherited members</h3>
598598 pass
599599
600600 try:
601- from compression import zstd as _zstd # noqa: F401 - Python 3.14+ native zstd
602- if 'zstd' not in self.SUPPORTED_COMPRESSION:
601+ from urllib3.response import HAS_ZSTD
602+ if HAS_ZSTD and 'zstd' not in self.SUPPORTED_COMPRESSION:
603603 self.SUPPORTED_COMPRESSION.append('zstd')
604604 except ImportError:
605- try:
606- import zstandard # noqa: F401 - aligned with urllib3 for transparent decompression
607- if 'zstd' not in self.SUPPORTED_COMPRESSION:
608- self.SUPPORTED_COMPRESSION.append('zstd')
609- except ImportError:
610- pass
605+ pass
611606
612607 self.content_encoding: str = ', '.join(self.SUPPORTED_COMPRESSION)
613608 self._signing_secret: Optional[Tuple[str]] = None
@@ -856,7 +851,7 @@ <h3>Methods</h3>
856851 'result': {
857852 'request_headers': {},
858853 'status': 'DONE',
859- 'success': 200 > ;= self.response.status_code < 300,
854+ 'success': 200 < ;= self.response.status_code < 300,
860855 'response_headers': self.response.headers,
861856 'status_code': self.response.status_code,
862857 'reason': self.response.reason,
@@ -924,7 +919,7 @@ <h3>Methods</h3>
924919 """
925920 Success means Scrapfly api reply correctly to the call, but the scrape can be unsuccessful if the upstream reply with error status code
926921 """
927- return 200 > ;= self.response.status_code <= 299
922+ return 200 < ;= self.response.status_code <= 299
928923
929924 @property
930925 def scrape_success(self) -> bool:
@@ -941,7 +936,7 @@ <h3>Methods</h3>
941936 return None
942937
943938 if self.scrape_success is False:
944- return self.scrape_result[ 'error']
939+ return self.scrape_result.get( 'error')
945940
946941 @property
947942 def upstream_status_code(self) -> Optional[int]:
@@ -1236,7 +1231,7 @@ <h3>Instance variables</h3>
12361231 return None
12371232
12381233 if self.scrape_success is False:
1239- return self.scrape_result[ 'error'] </ code > </ pre >
1234+ return self.scrape_result.get( 'error') </ code > </ pre >
12401235</ details >
12411236< div class ="desc "> </ div >
12421237</ dd >
@@ -1320,7 +1315,7 @@ <h3>Instance variables</h3>
13201315 """
13211316 Success means Scrapfly api reply correctly to the call, but the scrape can be unsuccessful if the upstream reply with error status code
13221317 """
1323- return 200 > ;= self.response.status_code <= 299</ code > </ pre >
1318+ return 200 < ;= self.response.status_code <= 299</ code > </ pre >
13241319</ details >
13251320< div class ="desc "> < p > Success means Scrapfly api reply correctly to the call, but the scrape can be unsuccessful if the upstream reply with error status code</ p > </ div >
13261321</ dd >
0 commit comments