scrapely-client-python 1.0.3__py3-none-any.whl → 1.0.6__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_client/_charging.py +3 -4
- scrapely_client/_consts.py +1 -1
- scrapely_client/_logging.py +1 -1
- scrapely_client/_models.py +37 -43
- scrapely_client/_resource_clients/__init__.py +6 -0
- scrapely_client/_resource_clients/_resource_client.py +2 -2
- scrapely_client/_resource_clients/actor.py +2 -2
- scrapely_client/_resource_clients/actor_collection.py +2 -2
- scrapely_client/_resource_clients/automation.py +330 -0
- scrapely_client/_resource_clients/automation_collection.py +169 -0
- scrapely_client/_resource_clients/build.py +2 -2
- scrapely_client/_resource_clients/build_collection.py +2 -2
- scrapely_client/_resource_clients/dataset.py +2 -2
- scrapely_client/_resource_clients/dataset_collection.py +2 -2
- scrapely_client/_resource_clients/key_value_store.py +2 -2
- scrapely_client/_resource_clients/key_value_store_collection.py +2 -2
- scrapely_client/_resource_clients/log.py +2 -2
- scrapely_client/_resource_clients/request_queue.py +2 -2
- scrapely_client/_resource_clients/request_queue_collection.py +2 -2
- scrapely_client/_resource_clients/run.py +2 -2
- scrapely_client/_resource_clients/run_collection.py +2 -2
- scrapely_client/_resource_clients/schedule.py +2 -2
- scrapely_client/_resource_clients/schedule_collection.py +2 -2
- scrapely_client/_resource_clients/store_collection.py +2 -2
- scrapely_client/_resource_clients/task.py +2 -2
- scrapely_client/_resource_clients/task_collection.py +2 -2
- scrapely_client/_resource_clients/user.py +2 -2
- scrapely_client/_resource_clients/webhook.py +2 -2
- scrapely_client/_resource_clients/webhook_collection.py +2 -2
- scrapely_client/_resource_clients/webhook_dispatch.py +2 -2
- scrapely_client/_resource_clients/webhook_dispatch_collection.py +2 -2
- scrapely_client/_scrapely_client.py +54 -26
- scrapely_client/_utils/errors.py +1 -1
- scrapely_client/errors.py +3 -3
- scrapely_client/http_clients/_base.py +5 -5
- scrapely_client/http_clients/_impit.py +4 -4
- scrapely_client/http_compressors/_brotli.py +1 -1
- scrapely_client/types.py +1 -1
- {scrapely_client_python-1.0.3.dist-info → scrapely_client_python-1.0.6.dist-info}/METADATA +9 -9
- scrapely_client_python-1.0.6.dist-info/RECORD +68 -0
- {scrapely_client_python-1.0.3.dist-info → scrapely_client_python-1.0.6.dist-info}/WHEEL +1 -1
- scrapely_client_python-1.0.6.dist-info/licenses/NOTICE +7 -0
- scrapely_client_python-1.0.3.dist-info/RECORD +0 -66
- scrapely_client_python-1.0.3.dist-info/licenses/NOTICE +0 -23
- {scrapely_client_python-1.0.3.dist-info → scrapely_client_python-1.0.6.dist-info}/licenses/LICENSE +0 -0
scrapely_client/_charging.py
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"""Opt-in pay-per-event charging interception for dataset pushes.
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Charging interception for dataset pushes, implemented in the client
|
|
4
4
|
itself, with the charging logic supplied by the host SDK via the
|
|
5
5
|
:class:`ChargingHooks` protocol (no SDK import — the SDK adapts its
|
|
6
6
|
``ChargingManager`` to these hooks later).
|
|
7
7
|
|
|
8
|
-
Without hooks (the default),
|
|
9
|
-
``apify-client``.
|
|
8
|
+
Without hooks (the default), dataset pushes are not intercepted.
|
|
10
9
|
"""
|
|
11
10
|
|
|
12
11
|
from __future__ import annotations
|
|
@@ -126,7 +125,7 @@ def _merge_context_charge_result(context: PpeAwarePushDataContext, hooks: Chargi
|
|
|
126
125
|
def wrap_dataset_client_with_charging(client: Any, hooks: ChargingHooks, *, is_async: bool) -> Any:
|
|
127
126
|
"""Wrap a dataset client's ``push_items`` with charging interception (method swap by design).
|
|
128
127
|
|
|
129
|
-
|
|
128
|
+
Normalize items →
|
|
130
129
|
``push_and_charge`` with a ``push_fn`` that pushes the accepted subset via the
|
|
131
130
|
original ``push_items``, and accumulate the charge result into the ambient
|
|
132
131
|
``push_data_charging_context`` when present.
|
scrapely_client/_consts.py
CHANGED
scrapely_client/_logging.py
CHANGED
|
@@ -110,7 +110,7 @@ def create_redirect_logger(name: str) -> logging.Logger:
|
|
|
110
110
|
"""Create a logger for redirecting logs from another Actor.
|
|
111
111
|
|
|
112
112
|
Args:
|
|
113
|
-
name: Logger name. Use dot notation for hierarchy (e.g., "
|
|
113
|
+
name: Logger name. Use dot notation for hierarchy (e.g., "scrapely.xyz" creates "xyz" under "scrapely").
|
|
114
114
|
|
|
115
115
|
Returns:
|
|
116
116
|
Configured logger with RedirectLogFormatter.
|
scrapely_client/_models.py
CHANGED
|
@@ -88,7 +88,7 @@ class Actor(BaseModel):
|
|
|
88
88
|
"""
|
|
89
89
|
description: Annotated[str | None, Field(examples=['Extract data from hundreds of places fast.'])] = None
|
|
90
90
|
"""
|
|
91
|
-
Short description of the Actor, displayed in Scrapely Store and
|
|
91
|
+
Short description of the Actor, displayed in Scrapely Store and dashboard.
|
|
92
92
|
"""
|
|
93
93
|
restart_on_error: Annotated[bool | None, Field(deprecated=True, examples=[False])] = None
|
|
94
94
|
is_public: Annotated[bool, Field(examples=[False])]
|
|
@@ -133,7 +133,7 @@ class Actor(BaseModel):
|
|
|
133
133
|
"""
|
|
134
134
|
title: Annotated[str | None, Field(examples=['Google Search Extractor'])] = None
|
|
135
135
|
"""
|
|
136
|
-
Human-readable name of the Actor, displayed in Scrapely Store and
|
|
136
|
+
Human-readable name of the Actor, displayed in Scrapely Store and dashboard.
|
|
137
137
|
"""
|
|
138
138
|
tagged_builds: dict[str, TaggedBuildInfo | None] | None = None
|
|
139
139
|
actor_standby: ActorStandby | None = None
|
|
@@ -143,7 +143,7 @@ class Actor(BaseModel):
|
|
|
143
143
|
"""
|
|
144
144
|
seo_title: Annotated[str | None, Field(examples=['Web Scraper'])] = None
|
|
145
145
|
"""
|
|
146
|
-
Name of the Actor to display by search engines such as Google. Can be different from the Actor's name displayed in Scrapely Store and
|
|
146
|
+
Name of the Actor to display by search engines such as Google. Can be different from the Actor's name displayed in Scrapely Store and dashboard.
|
|
147
147
|
"""
|
|
148
148
|
seo_description: Annotated[
|
|
149
149
|
str | None, Field(examples=['Crawls websites using Chrome and extracts data from pages using JavaScript.'])
|
|
@@ -152,12 +152,12 @@ class Actor(BaseModel):
|
|
|
152
152
|
Description of the Actor to display by search engines such as Google.
|
|
153
153
|
"""
|
|
154
154
|
picture_url: Annotated[
|
|
155
|
-
str | None, Field(examples=['https://
|
|
155
|
+
str | None, Field(examples=['https://images.scrape.ly/.../actor-picture.png'])
|
|
156
156
|
] = None
|
|
157
157
|
"""
|
|
158
|
-
URL of the Actor's icon, displayed on the Actor's page in Scrapely Store and
|
|
158
|
+
URL of the Actor's icon, displayed on the Actor's page in Scrapely Store and dashboard.
|
|
159
159
|
"""
|
|
160
|
-
standby_url: Annotated[str | None, Field(examples=['https://jane35--my-actor.
|
|
160
|
+
standby_url: Annotated[str | None, Field(examples=['https://jane35--my-actor.scrape.ly'])] = None
|
|
161
161
|
"""
|
|
162
162
|
URL for sending requests to the Actor in Standby mode.
|
|
163
163
|
`null` if the Standby mode isn't enabled.
|
|
@@ -292,7 +292,7 @@ class ActorDefinition(BaseModel):
|
|
|
292
292
|
|
|
293
293
|
@docs_group('Models')
|
|
294
294
|
class ActorNotice(Enum):
|
|
295
|
-
"""A warning displayed on the Actor's page in Scrapely Store and
|
|
295
|
+
"""A warning displayed on the Actor's page in Scrapely Store and dashboard. Can be set by the Actor's developer or automatically by Scrapely's quality checks."""
|
|
296
296
|
|
|
297
297
|
NONE = 'NONE'
|
|
298
298
|
RESIDENTIAL_PROXY_REQUIRED = 'RESIDENTIAL_PROXY_REQUIRED'
|
|
@@ -454,7 +454,7 @@ class AddedRequest(BaseModel):
|
|
|
454
454
|
"""
|
|
455
455
|
A unique identifier assigned to the request.
|
|
456
456
|
"""
|
|
457
|
-
unique_key: Annotated[str, Field(examples=['GET|60d83e70|e3b0c442|https://api
|
|
457
|
+
unique_key: Annotated[str, Field(examples=['GET|60d83e70|e3b0c442|https://api.scrape.ly'])]
|
|
458
458
|
"""
|
|
459
459
|
A unique key used for request de-duplication. Requests with the same unique key are considered identical.
|
|
460
460
|
"""
|
|
@@ -737,11 +737,6 @@ class CommonActorPricingInfo(BaseModel):
|
|
|
737
737
|
populate_by_name=True,
|
|
738
738
|
alias_generator=to_camel,
|
|
739
739
|
)
|
|
740
|
-
apify_margin_percentage: float | None = None
|
|
741
|
-
"""
|
|
742
|
-
In [0, 1], fraction of pricePerUnitUsd that goes to Scrapely.
|
|
743
|
-
Optional: Scrapely staging PAY_PER_EVENT payloads often omit this.
|
|
744
|
-
"""
|
|
745
740
|
created_at: AwareDatetime | None = None
|
|
746
741
|
"""
|
|
747
742
|
When this pricing info record has been created.
|
|
@@ -774,11 +769,11 @@ class CreateActorRequest(BaseModel):
|
|
|
774
769
|
None
|
|
775
770
|
)
|
|
776
771
|
"""
|
|
777
|
-
Short description of the Actor, displayed in Scrapely Store and
|
|
772
|
+
Short description of the Actor, displayed in Scrapely Store and dashboard.
|
|
778
773
|
"""
|
|
779
774
|
title: Annotated[str | None, Field(examples=['Instagram scraper'])] = None
|
|
780
775
|
"""
|
|
781
|
-
Human-readable name of the Actor, displayed in Scrapely Store and
|
|
776
|
+
Human-readable name of the Actor, displayed in Scrapely Store and dashboard. Can contain spaces and capital letters. Recommended length is 40-50 characters. You can change this title without affecting the Actor's URL or SEO.
|
|
782
777
|
"""
|
|
783
778
|
is_public: Annotated[bool | None, Field(examples=[False])] = None
|
|
784
779
|
"""
|
|
@@ -786,7 +781,7 @@ class CreateActorRequest(BaseModel):
|
|
|
786
781
|
"""
|
|
787
782
|
seo_title: Annotated[str | None, Field(examples=['Free Instagram scraper'])] = None
|
|
788
783
|
"""
|
|
789
|
-
Name of the Actor to display by search engines such as Google. Can be different from the Actor's name displayed in Scrapely Store and
|
|
784
|
+
Name of the Actor to display by search engines such as Google. Can be different from the Actor's name displayed in Scrapely Store and dashboard. Recommended length is 40-50 characters.
|
|
790
785
|
"""
|
|
791
786
|
seo_description: Annotated[str | None, Field(examples=['The best scraper for Instagram'])] = None
|
|
792
787
|
"""
|
|
@@ -920,7 +915,6 @@ class CurrentPricingInfo(BaseModel):
|
|
|
920
915
|
alias_generator=to_camel,
|
|
921
916
|
)
|
|
922
917
|
pricing_model: Annotated[str, Field(examples=['FREE'])]
|
|
923
|
-
apify_margin_percentage: Annotated[float | None, Field(examples=[0.2])] = None
|
|
924
918
|
created_at: Annotated[AwareDatetime | None, Field(examples=['2023-01-01T00:00:00.000Z'])] = None
|
|
925
919
|
started_at: Annotated[AwareDatetime | None, Field(examples=['2023-01-01T00:00:00.000Z'])] = None
|
|
926
920
|
notified_about_change_at: Annotated[AwareDatetime | None, Field(examples=[None])] = None
|
|
@@ -998,7 +992,7 @@ class Dataset(BaseModel):
|
|
|
998
992
|
"""
|
|
999
993
|
console_url: Annotated[AnyUrl, Field(examples=['https://api.scrape.ly/storage/datasets/27TmTznX9YPeAYhkC'])]
|
|
1000
994
|
items_public_url: Annotated[
|
|
1001
|
-
AnyUrl | None, Field(examples=['https://api
|
|
995
|
+
AnyUrl | None, Field(examples=['https://api.scrape.ly/v2/datasets/WkzbQMuFYuamGv3YF/items?signature=abc123'])
|
|
1002
996
|
] = None
|
|
1003
997
|
"""
|
|
1004
998
|
A public link to access the dataset items directly.
|
|
@@ -1215,7 +1209,7 @@ class DeletedRequestById(BaseModel):
|
|
|
1215
1209
|
populate_by_name=True,
|
|
1216
1210
|
alias_generator=to_camel,
|
|
1217
1211
|
)
|
|
1218
|
-
unique_key: Annotated[str | None, Field(examples=['GET|60d83e70|e3b0c442|https://api
|
|
1212
|
+
unique_key: Annotated[str | None, Field(examples=['GET|60d83e70|e3b0c442|https://api.scrape.ly'])] = None
|
|
1219
1213
|
"""
|
|
1220
1214
|
A unique key used for request de-duplication. Requests with the same unique key are considered identical.
|
|
1221
1215
|
"""
|
|
@@ -1234,7 +1228,7 @@ class DeletedRequestByUniqueKey(BaseModel):
|
|
|
1234
1228
|
populate_by_name=True,
|
|
1235
1229
|
alias_generator=to_camel,
|
|
1236
1230
|
)
|
|
1237
|
-
unique_key: Annotated[str, Field(examples=['GET|60d83e70|e3b0c442|https://api
|
|
1231
|
+
unique_key: Annotated[str, Field(examples=['GET|60d83e70|e3b0c442|https://api.scrape.ly'])]
|
|
1238
1232
|
"""
|
|
1239
1233
|
A unique key used for request de-duplication. Requests with the same unique key are considered identical.
|
|
1240
1234
|
"""
|
|
@@ -1472,11 +1466,11 @@ class HeadRequest(BaseModel):
|
|
|
1472
1466
|
"""
|
|
1473
1467
|
A unique identifier assigned to the request.
|
|
1474
1468
|
"""
|
|
1475
|
-
unique_key: Annotated[str, Field(examples=['GET|60d83e70|e3b0c442|https://api
|
|
1469
|
+
unique_key: Annotated[str, Field(examples=['GET|60d83e70|e3b0c442|https://api.scrape.ly'])]
|
|
1476
1470
|
"""
|
|
1477
1471
|
A unique key used for request de-duplication. Requests with the same unique key are considered identical.
|
|
1478
1472
|
"""
|
|
1479
|
-
url: Annotated[str, Field(examples=['https://api
|
|
1473
|
+
url: Annotated[str, Field(examples=['https://api.scrape.ly'])]
|
|
1480
1474
|
"""
|
|
1481
1475
|
The URL of the request.
|
|
1482
1476
|
"""
|
|
@@ -1537,13 +1531,13 @@ class KeyValueStore(BaseModel):
|
|
|
1537
1531
|
] = None
|
|
1538
1532
|
keys_public_url: Annotated[
|
|
1539
1533
|
AnyUrl | None,
|
|
1540
|
-
Field(examples=['https://api
|
|
1534
|
+
Field(examples=['https://api.scrape.ly/v2/key-value-stores/WkzbQMuFYuamGv3YF/keys?signature=abc123']),
|
|
1541
1535
|
] = None
|
|
1542
1536
|
"""
|
|
1543
1537
|
A public link to access keys of the key-value store directly.
|
|
1544
1538
|
"""
|
|
1545
1539
|
records_public_url: Annotated[
|
|
1546
|
-
AnyUrl | None, Field(examples=['https://api
|
|
1540
|
+
AnyUrl | None, Field(examples=['https://api.scrape.ly/v2/key-value-stores/WkzbQMuFYuamGv3YF/records'])
|
|
1547
1541
|
] = None
|
|
1548
1542
|
"""
|
|
1549
1543
|
A public link to access records of the key-value store directly.
|
|
@@ -1572,7 +1566,7 @@ class KeyValueStoreKey(BaseModel):
|
|
|
1572
1566
|
record_public_url: Annotated[
|
|
1573
1567
|
AnyUrl,
|
|
1574
1568
|
Field(
|
|
1575
|
-
examples=['https://api
|
|
1569
|
+
examples=['https://api.scrape.ly/v2/key-value-stores/WkzbQMuFYuamGv3YF/records/some-key?signature=abc123']
|
|
1576
1570
|
),
|
|
1577
1571
|
]
|
|
1578
1572
|
"""
|
|
@@ -1891,11 +1885,11 @@ class LockedHeadRequest(BaseModel):
|
|
|
1891
1885
|
"""
|
|
1892
1886
|
A unique identifier assigned to the request.
|
|
1893
1887
|
"""
|
|
1894
|
-
unique_key: Annotated[str, Field(examples=['GET|60d83e70|e3b0c442|https://api
|
|
1888
|
+
unique_key: Annotated[str, Field(examples=['GET|60d83e70|e3b0c442|https://api.scrape.ly'])]
|
|
1895
1889
|
"""
|
|
1896
1890
|
A unique key used for request de-duplication. Requests with the same unique key are considered identical.
|
|
1897
1891
|
"""
|
|
1898
|
-
url: Annotated[str, Field(examples=['https://api
|
|
1892
|
+
url: Annotated[str, Field(examples=['https://api.scrape.ly'])]
|
|
1899
1893
|
"""
|
|
1900
1894
|
The URL of the request.
|
|
1901
1895
|
"""
|
|
@@ -2212,7 +2206,7 @@ class Plan(BaseModel):
|
|
|
2212
2206
|
max_monthly_external_data_transfer_gbytes: Annotated[float | None, Field(examples=[1000])] = None
|
|
2213
2207
|
max_actor_count: Annotated[int | None, Field(examples=[100])] = None
|
|
2214
2208
|
max_actor_task_count: Annotated[int | None, Field(examples=[1000])] = None
|
|
2215
|
-
data_retention_days: Annotated[int | None, Field(examples=[
|
|
2209
|
+
data_retention_days: Annotated[int | None, Field(examples=[90])] = None
|
|
2216
2210
|
available_proxy_groups: dict[str, int]
|
|
2217
2211
|
team_account_seat_count: Annotated[int | None, Field(examples=[1])] = None
|
|
2218
2212
|
support_level: Annotated[str | None, Field(examples=['COMMUNITY'])] = None
|
|
@@ -2291,7 +2285,7 @@ class Profile(BaseModel):
|
|
|
2291
2285
|
)
|
|
2292
2286
|
bio: Annotated[str | None, Field(examples=['I started web scraping in 1985 using Altair BASIC.'])] = None
|
|
2293
2287
|
name: Annotated[str | None, Field(examples=['Jane Doe'])] = None
|
|
2294
|
-
picture_url: Annotated[AnyUrl | None, Field(examples=['https://api
|
|
2288
|
+
picture_url: Annotated[AnyUrl | None, Field(examples=['https://api.scrape.ly/img/anonymous_user_picture.png'])] = None
|
|
2295
2289
|
github_username: Annotated[str | None, Field(examples=['torvalds.'])] = None
|
|
2296
2290
|
website_url: Annotated[AnyUrl | None, Field(examples=['http://www.example.com'])] = None
|
|
2297
2291
|
twitter_username: Annotated[str | None, Field(examples=['@BillGates'])] = None
|
|
@@ -2435,11 +2429,11 @@ class RequestBase(BaseModel):
|
|
|
2435
2429
|
populate_by_name=True,
|
|
2436
2430
|
alias_generator=to_camel,
|
|
2437
2431
|
)
|
|
2438
|
-
unique_key: Annotated[str | None, Field(examples=['GET|60d83e70|e3b0c442|https://api
|
|
2432
|
+
unique_key: Annotated[str | None, Field(examples=['GET|60d83e70|e3b0c442|https://api.scrape.ly'])] = None
|
|
2439
2433
|
"""
|
|
2440
2434
|
A unique key used for request de-duplication. Requests with the same unique key are considered identical.
|
|
2441
2435
|
"""
|
|
2442
|
-
url: Annotated[str | None, Field(examples=['https://api
|
|
2436
|
+
url: Annotated[str | None, Field(examples=['https://api.scrape.ly'])] = None
|
|
2443
2437
|
"""
|
|
2444
2438
|
The URL of the request.
|
|
2445
2439
|
"""
|
|
@@ -2448,7 +2442,7 @@ class RequestBase(BaseModel):
|
|
|
2448
2442
|
"""
|
|
2449
2443
|
The number of times this request has been retried.
|
|
2450
2444
|
"""
|
|
2451
|
-
loaded_url: Annotated[str | None, Field(examples=['https://api
|
|
2445
|
+
loaded_url: Annotated[str | None, Field(examples=['https://api.scrape.ly/jobs'])] = None
|
|
2452
2446
|
"""
|
|
2453
2447
|
The final URL that was loaded, after redirects (if any).
|
|
2454
2448
|
"""
|
|
@@ -2503,11 +2497,11 @@ class RequestDraft(BaseModel):
|
|
|
2503
2497
|
"""
|
|
2504
2498
|
A unique identifier assigned to the request.
|
|
2505
2499
|
"""
|
|
2506
|
-
unique_key: Annotated[str, Field(examples=['GET|60d83e70|e3b0c442|https://api
|
|
2500
|
+
unique_key: Annotated[str, Field(examples=['GET|60d83e70|e3b0c442|https://api.scrape.ly'])]
|
|
2507
2501
|
"""
|
|
2508
2502
|
A unique key used for request de-duplication. Requests with the same unique key are considered identical.
|
|
2509
2503
|
"""
|
|
2510
|
-
url: Annotated[str, Field(examples=['https://api
|
|
2504
|
+
url: Annotated[str, Field(examples=['https://api.scrape.ly'])]
|
|
2511
2505
|
"""
|
|
2512
2506
|
The URL of the request.
|
|
2513
2507
|
"""
|
|
@@ -2527,7 +2521,7 @@ class RequestDraftDeleteById(BaseModel):
|
|
|
2527
2521
|
"""
|
|
2528
2522
|
A unique identifier assigned to the request.
|
|
2529
2523
|
"""
|
|
2530
|
-
unique_key: Annotated[str | None, Field(examples=['GET|60d83e70|e3b0c442|https://api
|
|
2524
|
+
unique_key: Annotated[str | None, Field(examples=['GET|60d83e70|e3b0c442|https://api.scrape.ly'])] = None
|
|
2531
2525
|
"""
|
|
2532
2526
|
A unique key used for request de-duplication. Requests with the same unique key are considered identical.
|
|
2533
2527
|
"""
|
|
@@ -2546,7 +2540,7 @@ class RequestDraftDeleteByUniqueKey(BaseModel):
|
|
|
2546
2540
|
"""
|
|
2547
2541
|
A unique identifier assigned to the request.
|
|
2548
2542
|
"""
|
|
2549
|
-
unique_key: Annotated[str, Field(examples=['GET|60d83e70|e3b0c442|https://api
|
|
2543
|
+
unique_key: Annotated[str, Field(examples=['GET|60d83e70|e3b0c442|https://api.scrape.ly'])]
|
|
2550
2544
|
"""
|
|
2551
2545
|
A unique key used for request de-duplication. Requests with the same unique key are considered identical.
|
|
2552
2546
|
"""
|
|
@@ -2632,9 +2626,9 @@ class RequestQueue(BaseModel):
|
|
|
2632
2626
|
"""
|
|
2633
2627
|
Whether the request queue has been accessed by multiple different clients.
|
|
2634
2628
|
"""
|
|
2635
|
-
console_url: Annotated[AnyUrl, Field(examples=['https://api
|
|
2629
|
+
console_url: Annotated[AnyUrl, Field(examples=['https://api.scrape.ly/v2/request-queues/27TmTznX9YPeAYhkC'])]
|
|
2636
2630
|
"""
|
|
2637
|
-
The URL to view the request queue in the Scrapely
|
|
2631
|
+
The URL to view the request queue in the Scrapely dashboard.
|
|
2638
2632
|
"""
|
|
2639
2633
|
stats: RequestQueueStats | None = None
|
|
2640
2634
|
general_access: GeneralAccess | None = None
|
|
@@ -2952,7 +2946,7 @@ class Run(BaseModel):
|
|
|
2952
2946
|
"""
|
|
2953
2947
|
Build number of the Actor build used for this run.
|
|
2954
2948
|
"""
|
|
2955
|
-
container_url: Annotated[AnyUrl | None, Field(examples=['https://g8kd8kbc5ge8.runs.
|
|
2949
|
+
container_url: Annotated[AnyUrl | None, Field(examples=['https://g8kd8kbc5ge8.runs.scrape.ly'])] = None
|
|
2956
2950
|
"""
|
|
2957
2951
|
URL of the container running the Actor.
|
|
2958
2952
|
"""
|
|
@@ -3669,7 +3663,7 @@ class UpdateActorRequest(BaseModel):
|
|
|
3669
3663
|
None
|
|
3670
3664
|
)
|
|
3671
3665
|
"""
|
|
3672
|
-
Short description of the Actor, displayed in Scrapely Store and
|
|
3666
|
+
Short description of the Actor, displayed in Scrapely Store and dashboard.
|
|
3673
3667
|
"""
|
|
3674
3668
|
is_public: Annotated[bool | None, Field(examples=[False])] = None
|
|
3675
3669
|
"""
|
|
@@ -3678,7 +3672,7 @@ class UpdateActorRequest(BaseModel):
|
|
|
3678
3672
|
actor_permission_level: ActorPermissionLevel | None = None
|
|
3679
3673
|
seo_title: Annotated[str | None, Field(examples=['Free Instagram scraper'])] = None
|
|
3680
3674
|
"""
|
|
3681
|
-
Name of the Actor to display by search engines such as Google. Can be different from the Actor's name displayed in Scrapely Store and
|
|
3675
|
+
Name of the Actor to display by search engines such as Google. Can be different from the Actor's name displayed in Scrapely Store and dashboard. Recommended length is 40-50 characters.
|
|
3682
3676
|
"""
|
|
3683
3677
|
seo_description: Annotated[str | None, Field(examples=['The best scraper for Instagram'])] = None
|
|
3684
3678
|
"""
|
|
@@ -3686,7 +3680,7 @@ class UpdateActorRequest(BaseModel):
|
|
|
3686
3680
|
"""
|
|
3687
3681
|
title: Annotated[str | None, Field(examples=['Instagram scraper'])] = None
|
|
3688
3682
|
"""
|
|
3689
|
-
Human-readable name of the Actor, displayed in Scrapely Store and
|
|
3683
|
+
Human-readable name of the Actor, displayed in Scrapely Store and dashboard. Can contain spaces and capital letters. Recommended length is 40-50 characters. You can change this title without affecting the Actor's URL or SEO.
|
|
3690
3684
|
"""
|
|
3691
3685
|
restart_on_error: Annotated[bool | None, Field(deprecated=True, examples=[False])] = None
|
|
3692
3686
|
versions: list[CreateOrUpdateVersionRequest] | None = None
|
|
@@ -3758,7 +3752,7 @@ class UpdateLimitsRequest(BaseModel):
|
|
|
3758
3752
|
"""
|
|
3759
3753
|
data_retention_days: Annotated[int | None, Field(examples=[90])] = None
|
|
3760
3754
|
"""
|
|
3761
|
-
|
|
3755
|
+
How many days unnamed storages (datasets, key-value stores and request queues without a name) are kept: Free 2 days (48 hours), Starter 31, Scale 60, Business 90. Runs follow their own retention: on the Free plan the latest 10 runs per Actor are kept and older ones are deleted after 7 days; on paid plans runs are deleted after 31 days. This value is set by your plan and cannot be changed through the API.
|
|
3762
3756
|
|
|
3763
3757
|
"""
|
|
3764
3758
|
|
|
@@ -4,6 +4,8 @@ from .actor_env_var import ActorEnvVarClient, ActorEnvVarClientAsync
|
|
|
4
4
|
from .actor_env_var_collection import ActorEnvVarCollectionClient, ActorEnvVarCollectionClientAsync
|
|
5
5
|
from .actor_version import ActorVersionClient, ActorVersionClientAsync
|
|
6
6
|
from .actor_version_collection import ActorVersionCollectionClient, ActorVersionCollectionClientAsync
|
|
7
|
+
from .automation import AutomationClient, AutomationClientAsync
|
|
8
|
+
from .automation_collection import AutomationCollectionClient, AutomationCollectionClientAsync
|
|
7
9
|
from .build import BuildClient, BuildClientAsync
|
|
8
10
|
from .build_collection import BuildCollectionClient, BuildCollectionClientAsync
|
|
9
11
|
from .dataset import DatasetClient, DatasetClientAsync
|
|
@@ -39,6 +41,10 @@ __all__ = [
|
|
|
39
41
|
'ActorVersionClientAsync',
|
|
40
42
|
'ActorVersionCollectionClient',
|
|
41
43
|
'ActorVersionCollectionClientAsync',
|
|
44
|
+
'AutomationClient',
|
|
45
|
+
'AutomationClientAsync',
|
|
46
|
+
'AutomationCollectionClient',
|
|
47
|
+
'AutomationCollectionClientAsync',
|
|
42
48
|
'BuildClient',
|
|
43
49
|
'BuildClientAsync',
|
|
44
50
|
'BuildCollectionClient',
|
|
@@ -328,7 +328,7 @@ class ResourceClient(ResourceClientBase):
|
|
|
328
328
|
DEFAULT_WAIT_WHEN_JOB_NOT_EXIST seconds.
|
|
329
329
|
|
|
330
330
|
Raises:
|
|
331
|
-
|
|
331
|
+
ScrapelyApiError: If API returns errors other than 404.
|
|
332
332
|
"""
|
|
333
333
|
deadline = (datetime.now(UTC) + wait_duration) if wait_duration is not None else None
|
|
334
334
|
not_found_deadline: datetime | None = None
|
|
@@ -520,7 +520,7 @@ class ResourceClientAsync(ResourceClientBase):
|
|
|
520
520
|
DEFAULT_WAIT_WHEN_JOB_NOT_EXIST seconds.
|
|
521
521
|
|
|
522
522
|
Raises:
|
|
523
|
-
|
|
523
|
+
ScrapelyApiError: If API returns errors other than 404.
|
|
524
524
|
"""
|
|
525
525
|
deadline = (datetime.now(UTC) + wait_duration) if wait_duration is not None else None
|
|
526
526
|
not_found_deadline: datetime | None = None
|
|
@@ -67,7 +67,7 @@ class ActorClient(ResourceClient):
|
|
|
67
67
|
"""Sub-client for managing a specific Actor.
|
|
68
68
|
|
|
69
69
|
Provides methods to manage a specific Actor, e.g. update it, delete it, build it, or start runs. Obtain an instance
|
|
70
|
-
via an appropriate method on the `
|
|
70
|
+
via an appropriate method on the `ScrapelyClient` class.
|
|
71
71
|
"""
|
|
72
72
|
|
|
73
73
|
def __init__(
|
|
@@ -563,7 +563,7 @@ class ActorClientAsync(ResourceClientAsync):
|
|
|
563
563
|
"""Sub-client for managing a specific Actor.
|
|
564
564
|
|
|
565
565
|
Provides methods to manage a specific Actor, e.g. update it, delete it, build it, or start runs. Obtain an instance
|
|
566
|
-
via an appropriate method on the `
|
|
566
|
+
via an appropriate method on the `ScrapelyClientAsync` class.
|
|
567
567
|
"""
|
|
568
568
|
|
|
569
569
|
def __init__(
|
|
@@ -32,7 +32,7 @@ class ActorCollectionClient(ResourceClient):
|
|
|
32
32
|
"""Sub-client for the Actor collection.
|
|
33
33
|
|
|
34
34
|
Provides methods to manage the Actor collection, e.g. list or create Actors. Obtain an instance via an appropriate
|
|
35
|
-
method on the `
|
|
35
|
+
method on the `ScrapelyClient` class.
|
|
36
36
|
"""
|
|
37
37
|
|
|
38
38
|
def __init__(
|
|
@@ -208,7 +208,7 @@ class ActorCollectionClientAsync(ResourceClientAsync):
|
|
|
208
208
|
"""Sub-client for the Actor collection.
|
|
209
209
|
|
|
210
210
|
Provides methods to manage the Actor collection, e.g. list or create Actors. Obtain an instance via an appropriate
|
|
211
|
-
method on the `
|
|
211
|
+
method on the `ScrapelyClientAsync` class.
|
|
212
212
|
"""
|
|
213
213
|
|
|
214
214
|
def __init__(
|