scrapely-python 0.1.25__py3-none-any.whl → 0.1.26__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
scrapely/__init__.py CHANGED
@@ -227,7 +227,7 @@ if TYPE_CHECKING: # Static analysers and IDEs see the lazy names as plain impor
227
227
  set_api_storage,
228
228
  )
229
229
 
230
- __version__ = '0.1.25'
230
+ __version__ = '0.1.26'
231
231
  __all__ = [
232
232
  # Core
233
233
  'Actor',
scrapely/solver.py CHANGED
@@ -1,6 +1,6 @@
1
1
  """Anti-bot solver helpers for Scrapely Actors.
2
2
 
3
- The platform runs the challenge solver (xhr.dev today) behind
3
+ The platform runs the challenge solver behind
4
4
  ``/v2/solver``. Actors never hold a solver key: the platform injects
5
5
  ``SCRAPELY_SOLVER_URL`` and ``SCRAPELY_SOLVER_API_KEY`` (the run's own token)
6
6
  into runs of Actors that may use it.
@@ -88,7 +88,7 @@ DEGRADED_STATUS_MESSAGE = "Site protection temporarily unavailable, results may
88
88
  # Codes the platform answers with when a vendor cannot be solved right now.
89
89
  UNAVAILABLE_CODES = ("vendor_degraded", "vendor_down", "provider_unavailable", "vendor_unsupported", "solver_not_enabled")
90
90
 
91
- _COMPAT_SUFFIX = "/compat/xhrdev"
91
+ _COMPAT_SUFFIXES = ("/compat/v1", "/compat/xhrdev")
92
92
  _STATUS_TTL_SECS = 15.0
93
93
  _MAX_BODY = 4 * 1024 * 1024
94
94
 
@@ -118,9 +118,10 @@ def _gateway() -> tuple[str, str] | None:
118
118
  if env is None:
119
119
  return None
120
120
  url, key = env
121
- if not url.endswith(_COMPAT_SUFFIX):
122
- return None
123
- return url[: -len(_COMPAT_SUFFIX)], key
121
+ for suffix in _COMPAT_SUFFIXES:
122
+ if url.endswith(suffix):
123
+ return url[: -len(suffix)], key
124
+ return None
124
125
 
125
126
 
126
127
  # ─── errors ──────────────────────────────────────────────────────────────────
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scrapely-python
3
- Version: 0.1.25
3
+ Version: 0.1.26
4
4
  Summary: Scrapely Python SDK - A toolkit for building Actors on the Scrapely platform
5
5
  Author-email: Scrapely <support@scrape.ly>
6
6
  License-Expression: MIT AND Apache-2.0
@@ -1,4 +1,4 @@
1
- scrapely/__init__.py,sha256=2-L8VbKFypsPs_hl-GqCOKYwQvVcifUL4iXm0fOqhP4,9661
1
+ scrapely/__init__.py,sha256=z-CyEPAlCd07V32Wnv8bNeSubMhXAuoejvSW7-XG4co,9661
2
2
  scrapely/_browser_locations.py,sha256=8QVVnkms2bDn3_LDYgYDR59MvFx8757l_JYnZ7xb3oI,145269
3
3
  scrapely/actor.py,sha256=1SBHZYBRLmU4k_erjKL7yRfP0EgR7ZKXefAK8wWKRz0,88004
4
4
  scrapely/browser_configuration.py,sha256=jAZapNSHLFW05B96df4wNBtcyiiU9DA3ml0yTL1FwfA,5770
@@ -12,7 +12,7 @@ scrapely/patch_browser_pool.py,sha256=R-1QDKa-ZvfdQ9wgyA8JCtmQqD9v7dOsaCZnSUoyf7
12
12
  scrapely/pricing_types.py,sha256=J6wCddZd-U1MYeOtaaEdeHSsp1HBgiQLfvSInBOvhIo,5305
13
13
  scrapely/proxy_configuration.py,sha256=mQhUjXnqM1PcUrnRmXxVWdLnlaRlb8Je4K2j54lC6YQ,38129
14
14
  scrapely/py.typed,sha256=XtWlywqUjc6x_M2gAXlDtYXbAsYkCjKZEjFyJvaHvm4,105
15
- scrapely/solver.py,sha256=ahuORJwZu9aJzCKWF14qTjQSnwT6dEbhMophQQ03JHw,35854
15
+ scrapely/solver.py,sha256=QO7sl_M5AbXRqmCzUowNWG2kBHoXoH7CgtYwAdp36VM,35880
16
16
  scrapely/types.py,sha256=ceVuHvhYbPai2CL3vFmXLTMoGaMR27IefJFgWhzd7ws,8900
17
17
  scrapely/webhook.py,sha256=4WOM42ypOSOs4lKtP5ofxAh6lX-7c8p5U9lOfuFzx-g,2830
18
18
  scrapely/crypto/__init__.py,sha256=MbMPs7Eq_fGSVjOZxNts_JckDCUtxCVqdkHU0VCfN4M,481
@@ -39,10 +39,10 @@ scrapely/storage/_file_system/_key_value_store_client.py,sha256=4Ipgbh4qEqAkwQJ9
39
39
  scrapely/storage/_file_system/_storage_client.py,sha256=aaGJ4P0QAtIgEMl6yHpuobeWFD5M4rMC5HwhOOvuGuo,1794
40
40
  scrapely/storage_clients/__init__.py,sha256=cs1YX7JV2_GKBXeiiJgkQFali08b5_y_jH6Yw7iROAA,656
41
41
  scrapely/storages/__init__.py,sha256=4PAELhJNZ3exJ7Uouicn-bCQ58NafKjhLBixQ8ATQc4,173
42
- scrapely_python-0.1.25.dist-info/licenses/LICENSE,sha256=pQGY0XwjIYh-a2HfawxHq1en53bXkFkDj2Q70jKWHr4,1088
43
- scrapely_python-0.1.25.dist-info/licenses/LICENSE-APACHE,sha256=N8m0FzMq8i4UbTgXZvKEZJSD-27OF8pWZYS_atz4kTU,11355
44
- scrapely_python-0.1.25.dist-info/licenses/NOTICE,sha256=DEsNrw6UdSIqdYYqMWVFgJnyt6jUivTD7iFU6YM_e1A,1122
45
- scrapely_python-0.1.25.dist-info/METADATA,sha256=9aB0qUPYZPSoRBuYQUIWWFQRnLrxpG66yP_ES6q_ZG8,3487
46
- scrapely_python-0.1.25.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
47
- scrapely_python-0.1.25.dist-info/top_level.txt,sha256=T4B9UMrs4q99QSAFyD1zdXhl40KnLhBKqrDkPhOTsmY,9
48
- scrapely_python-0.1.25.dist-info/RECORD,,
42
+ scrapely_python-0.1.26.dist-info/licenses/LICENSE,sha256=pQGY0XwjIYh-a2HfawxHq1en53bXkFkDj2Q70jKWHr4,1088
43
+ scrapely_python-0.1.26.dist-info/licenses/LICENSE-APACHE,sha256=N8m0FzMq8i4UbTgXZvKEZJSD-27OF8pWZYS_atz4kTU,11355
44
+ scrapely_python-0.1.26.dist-info/licenses/NOTICE,sha256=DEsNrw6UdSIqdYYqMWVFgJnyt6jUivTD7iFU6YM_e1A,1122
45
+ scrapely_python-0.1.26.dist-info/METADATA,sha256=mag9UA_ijOHkoBHTTvSWq2Nai46Okg-M-wkW0aAO-Hk,3487
46
+ scrapely_python-0.1.26.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
47
+ scrapely_python-0.1.26.dist-info/top_level.txt,sha256=T4B9UMrs4q99QSAFyD1zdXhl40KnLhBKqrDkPhOTsmY,9
48
+ scrapely_python-0.1.26.dist-info/RECORD,,