Skip to content

Commit f7fe90d

Browse files
committed
feat(wait): add idle and almost idle network
1 parent 664e8b0 commit f7fe90d

File tree

11 files changed

+20
-10
lines changed

11 files changed

+20
-10
lines changed

cli/Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "spider-cloud-cli"
3-
version = "0.1.80"
3+
version = "0.1.81"
44
edition = "2021"
55
authors = [ "j-mendez <jeff@spider.cloud>"]
66
description = "The Spider Cloud CLI for web crawling and scraping"

javascript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@spider-cloud/spider-client",
3-
"version": "0.1.80",
3+
"version": "0.1.81",
44
"description": "Isomorphic Javascript SDK for Spider Cloud services",
55
"scripts": {
66
"test": "node --import tsx --test __tests__/*test.ts",

javascript/src/config.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,17 @@ interface Delay {
112112
/**
113113
* Represents the wait_for configuration.
114114
* @typedef {Object} WaitFor
115-
* @property {IdleNetwork} [idle_network] - Configuration to wait for network to be idle.
115+
* @property {IdleNetwork} [idle_network] - Configuration to wait for network to be idle between period.
116+
* @property {IdleNetwork0} [idle_network] - Configuration to wait for network to be idle with max timeout.
117+
* @property {AlmostIdleNetwork0} [idle_network] - Configuration to wait for network to almost idle with max timeout.
116118
* @property {Selector} [selector] - Configuration to wait for a CSS selector.
117119
* @property {Delay} [delay] - Configuration to wait for a delay.
118120
* @property {boolean} [page_navigations] - Whether to wait for page navigations.
119121
*/
120122
export interface WaitForConfiguration {
121123
idle_network?: IdleNetwork;
124+
idle_network0?: IdleNetwork;
125+
almost_idle_network0?: IdleNetwork;
122126
selector?: Selector;
123127
dom?: Selector;
124128
delay?: Delay;

python/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def read_file(fname):
88

99
setup(
1010
name="spider_client",
11-
version="0.1.80",
11+
version="0.1.81",
1212
url="https://github.com/spider-rs/spider-clients/tree/main/python",
1313
license="MIT",
1414
author="Spider",

python/spider/async_spider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ def _prepare_headers(
267267
return {
268268
"Content-Type": content_type,
269269
"Authorization": f"Bearer {self.api_key}",
270-
"User-Agent": "AsyncSpider-Client/0.1.80",
270+
"User-Agent": "AsyncSpider-Client/0.1.81",
271271
}
272272

273273
async def _handle_error(self, response: ClientResponse, action: str) -> None:

python/spider/spider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def _prepare_headers(self, content_type: str = "application/json"):
280280
return {
281281
"Content-Type": content_type,
282282
"Authorization": f"Bearer {self.api_key}",
283-
"User-Agent": f"Spider-Client/0.1.80",
283+
"User-Agent": f"Spider-Client/0.1.81",
284284
}
285285

286286
def _post_request(self, url: str, data, headers, stream=False):

python/spider/spider_types.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ class DelayDict(TypedDict):
170170

171171
class WaitForDict(TypedDict, total=False):
172172
idle_network: Optional[IdleNetworkDict]
173+
idle_network0: Optional[IdleNetworkDict]
174+
almost_idle_network0: Optional[IdleNetworkDict]
173175
selector: Optional[SelectorDict]
174176
dom: Optional[SelectorDict]
175177
delay: Optional[DelayDict]

rust/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "spider-client"
3-
version = "0.1.80"
3+
version = "0.1.81"
44
edition = "2021"
55
authors = [ "j-mendez <jeff@spider.cloud>"]
66
description = "Spider Cloud client"

0 commit comments

Comments
 (0)