Skip to content

Commit b5429ad

Browse files
committed
release: 0.1.23
1 parent ebb5912 commit b5429ad

File tree

9 files changed

+39
-39
lines changed

9 files changed

+39
-39
lines changed

cli/Cargo.lock

Lines changed: 10 additions & 10 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.22"
3+
version = "0.1.23"
44
edition = "2021"
55
authors = [ "j-mendez <[email protected]>"]
66
description = "The Spider Cloud CLI for web crawling and scraping"

javascript/package-lock.json

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

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.22",
3+
"version": "0.1.23",
44
"description": "Isomorphic Javascript SDK for Spider Cloud services",
55
"scripts": {
66
"test": "node --import tsx --test __tests__/*test.ts",

python/spider/async_spider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ def _prepare_headers(
430430
return {
431431
"Content-Type": content_type,
432432
"Authorization": f"Bearer {self.api_key}",
433-
"User-Agent": "AsyncSpider-Client/0.1.22",
433+
"User-Agent": "AsyncSpider-Client/0.1.23",
434434
}
435435

436436
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
@@ -415,7 +415,7 @@ def _prepare_headers(self, content_type: str = "application/json"):
415415
return {
416416
"Content-Type": content_type,
417417
"Authorization": f"Bearer {self.api_key}",
418-
"User-Agent": f"Spider-Client/0.1.22",
418+
"User-Agent": f"Spider-Client/0.1.23",
419419
}
420420

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

rust/Cargo.lock

Lines changed: 7 additions & 7 deletions
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.22"
3+
version = "0.1.23"
44
edition = "2021"
55
authors = [ "j-mendez <[email protected]>"]
66
description = "Spider Cloud client"

rust/src/lib.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ use reqwest::Client;
6565
use reqwest::{Error, Response};
6666
use serde::{Deserialize, Serialize};
6767
use std::collections::HashMap;
68-
use std::default;
6968
use tokio_stream::StreamExt;
7069

7170
/// Structure representing the Chunking algorithm dictionary.
@@ -104,15 +103,15 @@ pub enum WebAutomation {
104103
ScrollX { pixels: i32 },
105104
ScrollY { pixels: i32 },
106105
Fill { selector: String, value: String },
107-
InfiniteScroll { times: u32 }
106+
InfiniteScroll { times: u32 },
108107
}
109108

110109
#[derive(Default, Serialize, Deserialize, Debug, Clone)]
111110
#[serde(tag = "type", rename_all = "PascalCase")]
112111
pub enum RedirectPolicy {
113112
Loose,
114113
#[default]
115-
Strict
114+
Strict,
116115
}
117116

118117
pub type WebAutomationMap = std::collections::HashMap<String, Vec<WebAutomation>>;
@@ -379,7 +378,7 @@ pub struct RequestParams {
379378
/// Perform web automated tasks on a url or url path. You need to make your `request` `chrome` or `smart`
380379
pub automation_scripts: Option<WebAutomationMap>,
381380
/// The redirect policy for HTTP request. Set the value to Loose to allow all.
382-
pub redirect_policy: Option<RedirectPolicy>
381+
pub redirect_policy: Option<RedirectPolicy>,
383382
}
384383

385384
/// The structure representing request parameters for a search request.
@@ -1180,15 +1179,15 @@ mod tests {
11801179
};
11811180
}
11821181

1183-
#[tokio::test(flavor = "multi_thread")]
1182+
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
11841183
async fn test_scrape_url() {
11851184
let response = SPIDER_CLIENT
11861185
.scrape_url("https://example.com", None, "application/json")
11871186
.await;
11881187
assert!(response.is_ok());
11891188
}
11901189

1191-
#[tokio::test(flavor = "multi_thread")]
1190+
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
11921191
async fn test_crawl_url() {
11931192
let response = SPIDER_CLIENT
11941193
.crawl_url(
@@ -1202,15 +1201,15 @@ mod tests {
12021201
assert!(response.is_ok());
12031202
}
12041203

1205-
#[tokio::test(flavor = "multi_thread")]
1204+
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
12061205
async fn test_links() {
12071206
let response: Result<serde_json::Value, Error> = SPIDER_CLIENT
12081207
.links("https://example.com", None, false, "application/json")
12091208
.await;
12101209
assert!(response.is_ok());
12111210
}
12121211

1213-
#[tokio::test(flavor = "multi_thread")]
1212+
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
12141213
async fn test_screenshot() {
12151214
let mut params = RequestParams::default();
12161215
params.limit = Some(1);
@@ -1241,7 +1240,7 @@ mod tests {
12411240
// assert!(response.is_ok());
12421241
// }
12431242

1244-
#[tokio::test(flavor = "multi_thread")]
1243+
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
12451244
async fn test_transform() {
12461245
let data = vec![HashMap::from([(
12471246
"<html><body><h1>Transformation</h1></body></html>".into(),
@@ -1253,39 +1252,40 @@ mod tests {
12531252
assert!(response.is_ok());
12541253
}
12551254

1256-
#[tokio::test(flavor = "multi_thread")]
1255+
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
1256+
#[ignore]
12571257
async fn test_extract_contacts() {
12581258
let response = SPIDER_CLIENT
12591259
.extract_contacts("https://example.com", None, false, "application/json")
12601260
.await;
12611261
assert!(response.is_ok());
12621262
}
12631263

1264-
#[tokio::test(flavor = "multi_thread")]
1264+
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
12651265
async fn test_label() {
12661266
let response = SPIDER_CLIENT
12671267
.label("https://example.com", None, false, "application/json")
12681268
.await;
12691269
assert!(response.is_ok());
12701270
}
12711271

1272-
#[tokio::test(flavor = "multi_thread")]
1272+
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
12731273
async fn test_create_signed_url() {
12741274
let response = SPIDER_CLIENT
12751275
.create_signed_url(Some("example.com"), None)
12761276
.await;
12771277
assert!(response.is_ok());
12781278
}
12791279

1280-
#[tokio::test(flavor = "multi_thread")]
1280+
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
12811281
async fn test_get_crawl_state() {
12821282
let response = SPIDER_CLIENT
12831283
.get_crawl_state("https://example.com", None, "application/json")
12841284
.await;
12851285
assert!(response.is_ok());
12861286
}
12871287

1288-
#[tokio::test(flavor = "multi_thread")]
1288+
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
12891289
async fn test_query() {
12901290
let mut query = QueryRequest::default();
12911291

@@ -1295,7 +1295,7 @@ mod tests {
12951295
assert!(response.is_ok());
12961296
}
12971297

1298-
#[tokio::test(flavor = "multi_thread")]
1298+
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
12991299
async fn test_get_credits() {
13001300
let response = SPIDER_CLIENT.get_credits().await;
13011301
assert!(response.is_ok());

0 commit comments

Comments
 (0)