Skip to content

Commit 5999a62

Browse files
committed
add cost_budget parameter
1 parent 49a84aa commit 5999a62

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ $ npm install
4343
Build and test:
4444

4545
```shell
46-
$ npm task build
47-
$ npm task tests
46+
$ npm run build
47+
$ npm run tests
4848
```

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.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "scrapfly-sdk",
3-
"version": "0.1.0",
3+
"version": "0.2.0",
44
"description": "SDK for Scrapfly.io web scraping service",
55
"type": "module",
66
"types": "build/src/main.d.ts",

src/scrapeconfig.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export class ScrapeConfig {
1414
render_js = false;
1515
cache = false;
1616
cache_clear = false;
17+
cost_budget?: number = null
1718
ssl = false;
1819
dns = false;
1920
asp = false;
@@ -49,6 +50,7 @@ export class ScrapeConfig {
4950
render_js?: boolean;
5051
cache?: boolean;
5152
cache_clear?: boolean;
53+
cost_budget?: number;
5254
ssl?: boolean;
5355
dns?: boolean;
5456
asp?: boolean;
@@ -84,6 +86,7 @@ export class ScrapeConfig {
8486
this.render_js = options.render_js ?? this.render_js;
8587
this.cache = options.cache ?? this.cache;
8688
this.cache_clear = options.cache_clear ?? this.cache_clear;
89+
this.cost_budget = options.cost_budget ?? this.cost_budget;
8790
this.asp = options.asp ?? this.asp;
8891
this.headers = options.headers
8992
? Object.fromEntries(Object.entries(options.headers).map(([k, v]) => [k.toLowerCase(), v]))

0 commit comments

Comments
 (0)