scrapely-python 0.1.48__tar.gz → 0.1.49__tar.gz

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.
Files changed (85) hide show
  1. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/CHANGELOG.md +4 -0
  2. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/PKG-INFO +1 -1
  3. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/pyproject.toml +1 -1
  4. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/__init__.py +1 -1
  5. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/charging.py +7 -1
  6. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely_python.egg-info/PKG-INFO +1 -1
  7. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/LICENSE +0 -0
  8. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/LICENSE-APACHE +0 -0
  9. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/MANIFEST.in +0 -0
  10. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/NOTICE +0 -0
  11. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/README.md +0 -0
  12. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/setup.cfg +0 -0
  13. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/_browser_locations.py +0 -0
  14. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/actor.py +0 -0
  15. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/browser_configuration.py +0 -0
  16. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/cdp_retry.py +0 -0
  17. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/charging_client.py +0 -0
  18. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/configuration.py +0 -0
  19. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/crypto/__init__.py +0 -0
  20. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/crypto/_secrets.py +0 -0
  21. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/errors.py +0 -0
  22. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/events/__init__.py +0 -0
  23. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/events/_types.py +0 -0
  24. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/events/event_manager.py +0 -0
  25. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/http/__init__.py +0 -0
  26. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/http/_capture.py +0 -0
  27. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/http/_client.py +0 -0
  28. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/http/_compat.py +0 -0
  29. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/http/_detect.py +0 -0
  30. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/http/_headers.py +0 -0
  31. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/http/_options.py +0 -0
  32. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/http/_policy.py +0 -0
  33. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/http/_profiles.py +0 -0
  34. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/http/_response.py +0 -0
  35. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/http/_stats.py +0 -0
  36. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/http/_transport.py +0 -0
  37. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/http/profiles.json +0 -0
  38. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/log.py +0 -0
  39. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/patch_browser_pool.py +0 -0
  40. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/pricing_types.py +0 -0
  41. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/proxy_configuration.py +0 -0
  42. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/py.typed +0 -0
  43. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/request_loaders/__init__.py +0 -0
  44. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/request_loaders/_scrapely_request_list.py +0 -0
  45. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/resume_dedupe.py +0 -0
  46. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/scrapy/__init__.py +0 -0
  47. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/scrapy/_actor_runner.py +0 -0
  48. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/scrapy/_async_thread.py +0 -0
  49. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/scrapy/_logging_config.py +0 -0
  50. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/scrapy/_serialization.py +0 -0
  51. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/scrapy/_warnings.py +0 -0
  52. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/scrapy/extensions/__init__.py +0 -0
  53. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/scrapy/extensions/_graceful_stop.py +0 -0
  54. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/scrapy/extensions/_httpcache.py +0 -0
  55. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/scrapy/middlewares/__init__.py +0 -0
  56. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/scrapy/middlewares/apify_proxy.py +0 -0
  57. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/scrapy/pipelines/__init__.py +0 -0
  58. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/scrapy/pipelines/actor_dataset_push.py +0 -0
  59. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/scrapy/requests.py +0 -0
  60. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/scrapy/scheduler.py +0 -0
  61. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/scrapy/utils.py +0 -0
  62. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/solver.py +0 -0
  63. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/storage/__init__.py +0 -0
  64. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/storage/_file_system/__init__.py +0 -0
  65. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/storage/_file_system/_key_value_store_client.py +0 -0
  66. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/storage/_file_system/_storage_client.py +0 -0
  67. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/storage/_metadata.py +0 -0
  68. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/storage/api_client.py +0 -0
  69. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/storage/client.py +0 -0
  70. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/storage/patch_storage.py +0 -0
  71. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/storage/scrapely_dataset_client.py +0 -0
  72. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/storage/scrapely_kvs_client.py +0 -0
  73. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/storage/scrapely_rq_client.py +0 -0
  74. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/storage/scrapely_storage_client.py +0 -0
  75. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/storage/smart_scrapely_storage_client.py +0 -0
  76. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/storage/types.py +0 -0
  77. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/storage/utils.py +0 -0
  78. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/storage_clients/__init__.py +0 -0
  79. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/storages/__init__.py +0 -0
  80. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/types.py +0 -0
  81. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely/webhook.py +0 -0
  82. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely_python.egg-info/SOURCES.txt +0 -0
  83. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely_python.egg-info/dependency_links.txt +0 -0
  84. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely_python.egg-info/requires.txt +0 -0
  85. {scrapely_python-0.1.48 → scrapely_python-0.1.49}/src/scrapely_python.egg-info/top_level.txt +0 -0
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.1.49] - 2026-11-13
8
+
9
+ - **The actor-start event is never counted as a saved item when the stop reason is guessed.** The platform now includes the actor start it bills in `ACTOR_CHARGED_EVENT_COUNTS`, so the room left under the maximum charge leaves its price out. When the platform does not say which limit stopped a run, the SDK guesses it from the charged counts; `scrapely-actor-start` / `apify-actor-start` no longer count there, so a run with an item limit of 1 that the start alone stopped is reported as stopped at the maximum charge (`get_charge_limit_message()`), not at the item limit. Charging is unchanged.
10
+
7
11
  ## [0.1.48] - 2026-11-10
8
12
 
9
13
  - **A resurrected or rebooted run stops at the Actor's own result limit.** A resumed run starts the Actor's code again, and with it the Actor's own result count, so an Actor whose source returns results in a different order each run (search pages, feeds) could end with more results than its limit: with `maxResults` 60, 24 rows saved before the abort plus the resumed run's own 60 (some of them saved before and skipped) gave 67. `Actor.set_result_limit(n)` declares the Actor's run-level result limit, e.g. its `maxItems` input. In a resumed run the rows saved before count towards it: once they and the new rows reach `n`, further charged rows are refused like at the spending limit (not saved, not charged, the push reports the limit), so the run ends with `n` results. Declare only a limit that counts all results of the run, not one per search. Nothing changes in a first run or for Actors that do not declare a limit.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scrapely-python
3
- Version: 0.1.48
3
+ Version: 0.1.49
4
4
  Summary: Scrapely Python SDK - A toolkit for building Actors on the Scrapely platform
5
5
  Author-email: Scrapely <hello@scrape.ly>
6
6
  License-Expression: MIT AND Apache-2.0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "scrapely-python"
7
- version = "0.1.48"
7
+ version = "0.1.49"
8
8
  description = "Scrapely Python SDK - A toolkit for building Actors on the Scrapely platform"
9
9
  readme = "README.md"
10
10
  license = "MIT AND Apache-2.0"
@@ -325,7 +325,7 @@ if TYPE_CHECKING: # Static analysers and IDEs see the lazy names as plain impor
325
325
  )
326
326
  from .webhook import Webhook, WebhookEventType
327
327
 
328
- __version__ = '0.1.48'
328
+ __version__ = '0.1.49'
329
329
  __all__ = [
330
330
  # Core
331
331
  'Actor',
@@ -206,6 +206,10 @@ def is_default_dataset_item_event(event_name: str) -> bool:
206
206
  return event_name in (APIFY_DEFAULT_DATASET_ITEM_EVENT, SCRAPELY_DEFAULT_DATASET_ITEM_EVENT)
207
207
 
208
208
 
209
+ # The actor-start events the platform bills by itself (never an item the run saved).
210
+ PLATFORM_START_EVENTS = frozenset({'scrapely-actor-start', 'apify-actor-start'})
211
+
212
+
209
213
  def resolve_default_dataset_item_event_name(pricing_info: dict) -> str:
210
214
  """Resolve the default dataset item event name from pricing info."""
211
215
  if APIFY_DEFAULT_DATASET_ITEM_EVENT in pricing_info:
@@ -591,7 +595,9 @@ class ChargingManager:
591
595
  if max_items is not None and any(
592
596
  count >= max_items
593
597
  for name, count in self._charged_events.items()
594
- if not is_default_dataset_item_event(name) and self._per_event_prices.get(name, 0) > 0
598
+ if not is_default_dataset_item_event(name)
599
+ and name not in PLATFORM_START_EVENTS
600
+ and self._per_event_prices.get(name, 0) > 0
595
601
  ):
596
602
  return CHARGE_LIMIT_MAX_ITEMS
597
603
  if self._max_total_charge_usd is not None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scrapely-python
3
- Version: 0.1.48
3
+ Version: 0.1.49
4
4
  Summary: Scrapely Python SDK - A toolkit for building Actors on the Scrapely platform
5
5
  Author-email: Scrapely <hello@scrape.ly>
6
6
  License-Expression: MIT AND Apache-2.0