apify 3.2.2 → 3.2.3
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.
- package/actor.d.ts +57 -40
- package/actor.d.ts.map +1 -1
- package/actor.js +55 -38
- package/actor.js.map +1 -1
- package/key_value_store.d.ts.map +1 -1
- package/key_value_store.js +6 -1
- package/key_value_store.js.map +1 -1
- package/package.json +2 -2
- package/tsconfig.build.tsbuildinfo +1 -1
package/actor.d.ts
CHANGED
|
@@ -59,9 +59,6 @@ export declare class Actor<Data extends Dictionary = Dictionary> {
|
|
|
59
59
|
* it sets up a connection to listen for platform events.
|
|
60
60
|
* For example, to get a notification about an imminent migration to another server.
|
|
61
61
|
* See {@apilink Actor.events} for details.
|
|
62
|
-
* - It checks that either `APIFY_TOKEN` or `APIFY_LOCAL_STORAGE_DIR` environment variable
|
|
63
|
-
* is defined. If not, the functions sets `APIFY_LOCAL_STORAGE_DIR` to `./apify_storage`
|
|
64
|
-
* inside the current working directory. This is to simplify running code examples.
|
|
65
62
|
* - It invokes the user function passed as the `userFunc` parameter.
|
|
66
63
|
* - If the user function returned a promise, waits for it to resolve.
|
|
67
64
|
* - If the user function throws an exception or some other error is encountered,
|
|
@@ -70,7 +67,7 @@ export declare class Actor<Data extends Dictionary = Dictionary> {
|
|
|
70
67
|
*
|
|
71
68
|
* The user function can be synchronous:
|
|
72
69
|
*
|
|
73
|
-
* ```
|
|
70
|
+
* ```js
|
|
74
71
|
* await Actor.main(() => {
|
|
75
72
|
* // My synchronous function that returns immediately
|
|
76
73
|
* console.log('Hello world from Actor!');
|
|
@@ -78,7 +75,7 @@ export declare class Actor<Data extends Dictionary = Dictionary> {
|
|
|
78
75
|
* ```
|
|
79
76
|
*
|
|
80
77
|
* If the user function returns a promise, it is considered asynchronous:
|
|
81
|
-
* ```
|
|
78
|
+
* ```js
|
|
82
79
|
* import { gotScraping } from 'got-scraping';
|
|
83
80
|
*
|
|
84
81
|
* await Actor.main(() => {
|
|
@@ -91,7 +88,7 @@ export declare class Actor<Data extends Dictionary = Dictionary> {
|
|
|
91
88
|
*
|
|
92
89
|
* To simplify your code, you can take advantage of the `async`/`await` keywords:
|
|
93
90
|
*
|
|
94
|
-
* ```
|
|
91
|
+
* ```js
|
|
95
92
|
* import { gotScraping } from 'got-scraping';
|
|
96
93
|
*
|
|
97
94
|
* await Actor.main(async () => {
|
|
@@ -138,7 +135,7 @@ export declare class Actor<Data extends Dictionary = Dictionary> {
|
|
|
138
135
|
*
|
|
139
136
|
* **Example usage:**
|
|
140
137
|
*
|
|
141
|
-
* ```
|
|
138
|
+
* ```js
|
|
142
139
|
* const run = await Actor.call('apify/hello-world', { myInput: 123 });
|
|
143
140
|
* ```
|
|
144
141
|
*
|
|
@@ -163,7 +160,7 @@ export declare class Actor<Data extends Dictionary = Dictionary> {
|
|
|
163
160
|
*
|
|
164
161
|
* **Example usage:**
|
|
165
162
|
*
|
|
166
|
-
* ```
|
|
163
|
+
* ```js
|
|
167
164
|
* const run = await Actor.start('apify/hello-world', { myInput: 123 });
|
|
168
165
|
* ```
|
|
169
166
|
*
|
|
@@ -187,7 +184,7 @@ export declare class Actor<Data extends Dictionary = Dictionary> {
|
|
|
187
184
|
*
|
|
188
185
|
* **Example usage:**
|
|
189
186
|
*
|
|
190
|
-
* ```
|
|
187
|
+
* ```js
|
|
191
188
|
* const run = await Actor.abort(runId);
|
|
192
189
|
* ```
|
|
193
190
|
* @ignore
|
|
@@ -206,7 +203,7 @@ export declare class Actor<Data extends Dictionary = Dictionary> {
|
|
|
206
203
|
*
|
|
207
204
|
* **Example usage:**
|
|
208
205
|
*
|
|
209
|
-
* ```
|
|
206
|
+
* ```js
|
|
210
207
|
* const run = await Actor.callTask('bob/some-task');
|
|
211
208
|
* ```
|
|
212
209
|
*
|
|
@@ -269,12 +266,12 @@ export declare class Actor<Data extends Dictionary = Dictionary> {
|
|
|
269
266
|
*
|
|
270
267
|
* This is just a convenient shortcut for {@apilink Dataset.pushData}.
|
|
271
268
|
* For example, calling the following code:
|
|
272
|
-
* ```
|
|
269
|
+
* ```js
|
|
273
270
|
* await Actor.pushData({ myValue: 123 });
|
|
274
271
|
* ```
|
|
275
272
|
*
|
|
276
273
|
* is equivalent to:
|
|
277
|
-
* ```
|
|
274
|
+
* ```js
|
|
278
275
|
* const dataset = await Actor.openDataset();
|
|
279
276
|
* await dataset.pushData({ myValue: 123 });
|
|
280
277
|
* ```
|
|
@@ -310,12 +307,12 @@ export declare class Actor<Data extends Dictionary = Dictionary> {
|
|
|
310
307
|
*
|
|
311
308
|
* This is just a convenient shortcut for {@apilink KeyValueStore.getValue}.
|
|
312
309
|
* For example, calling the following code:
|
|
313
|
-
* ```
|
|
310
|
+
* ```js
|
|
314
311
|
* const value = await Actor.getValue('my-key');
|
|
315
312
|
* ```
|
|
316
313
|
*
|
|
317
314
|
* is equivalent to:
|
|
318
|
-
* ```
|
|
315
|
+
* ```js
|
|
319
316
|
* const store = await Actor.openKeyValueStore();
|
|
320
317
|
* const value = await store.getValue('my-key');
|
|
321
318
|
* ```
|
|
@@ -339,12 +336,12 @@ export declare class Actor<Data extends Dictionary = Dictionary> {
|
|
|
339
336
|
*
|
|
340
337
|
* This is just a convenient shortcut for {@apilink KeyValueStore.setValue}.
|
|
341
338
|
* For example, calling the following code:
|
|
342
|
-
* ```
|
|
339
|
+
* ```js
|
|
343
340
|
* await Actor.setValue('OUTPUT', { foo: "bar" });
|
|
344
341
|
* ```
|
|
345
342
|
*
|
|
346
343
|
* is equivalent to:
|
|
347
|
-
* ```
|
|
344
|
+
* ```js
|
|
348
345
|
* const store = await Actor.openKeyValueStore();
|
|
349
346
|
* await store.setValue('OUTPUT', { foo: "bar" });
|
|
350
347
|
* ```
|
|
@@ -371,12 +368,12 @@ export declare class Actor<Data extends Dictionary = Dictionary> {
|
|
|
371
368
|
*
|
|
372
369
|
* This is just a convenient shortcut for [`keyValueStore.getValue('INPUT')`](core/class/KeyValueStore#getValue).
|
|
373
370
|
* For example, calling the following code:
|
|
374
|
-
* ```
|
|
371
|
+
* ```js
|
|
375
372
|
* const input = await Actor.getInput();
|
|
376
373
|
* ```
|
|
377
374
|
*
|
|
378
375
|
* is equivalent to:
|
|
379
|
-
* ```
|
|
376
|
+
* ```js
|
|
380
377
|
* const store = await Actor.openKeyValueStore();
|
|
381
378
|
* await store.getValue('INPUT');
|
|
382
379
|
* ```
|
|
@@ -445,7 +442,7 @@ export declare class Actor<Data extends Dictionary = Dictionary> {
|
|
|
445
442
|
*
|
|
446
443
|
* For more details and code examples, see the {@apilink ProxyConfiguration} class.
|
|
447
444
|
*
|
|
448
|
-
* ```
|
|
445
|
+
* ```js
|
|
449
446
|
*
|
|
450
447
|
* // Returns initialized proxy configuration class
|
|
451
448
|
* const proxyConfiguration = await Actor.createProxyConfiguration({
|
|
@@ -539,9 +536,6 @@ export declare class Actor<Data extends Dictionary = Dictionary> {
|
|
|
539
536
|
* it sets up a connection to listen for platform events.
|
|
540
537
|
* For example, to get a notification about an imminent migration to another server.
|
|
541
538
|
* See {@apilink Actor.events} for details.
|
|
542
|
-
* - It checks that either `APIFY_TOKEN` or `APIFY_LOCAL_STORAGE_DIR` environment variable
|
|
543
|
-
* is defined. If not, the functions sets `APIFY_LOCAL_STORAGE_DIR` to `./apify_storage`
|
|
544
|
-
* inside the current working directory. This is to simplify running code examples.
|
|
545
539
|
* - It invokes the user function passed as the `userFunc` parameter.
|
|
546
540
|
* - If the user function returned a promise, waits for it to resolve.
|
|
547
541
|
* - If the user function throws an exception or some other error is encountered,
|
|
@@ -550,7 +544,7 @@ export declare class Actor<Data extends Dictionary = Dictionary> {
|
|
|
550
544
|
*
|
|
551
545
|
* The user function can be synchronous:
|
|
552
546
|
*
|
|
553
|
-
* ```
|
|
547
|
+
* ```js
|
|
554
548
|
* await Actor.main(() => {
|
|
555
549
|
* // My synchronous function that returns immediately
|
|
556
550
|
* console.log('Hello world from Actor!');
|
|
@@ -558,7 +552,7 @@ export declare class Actor<Data extends Dictionary = Dictionary> {
|
|
|
558
552
|
* ```
|
|
559
553
|
*
|
|
560
554
|
* If the user function returns a promise, it is considered asynchronous:
|
|
561
|
-
* ```
|
|
555
|
+
* ```js
|
|
562
556
|
* import { gotScraping } from 'got-scraping';
|
|
563
557
|
*
|
|
564
558
|
* await Actor.main(() => {
|
|
@@ -571,7 +565,7 @@ export declare class Actor<Data extends Dictionary = Dictionary> {
|
|
|
571
565
|
*
|
|
572
566
|
* To simplify your code, you can take advantage of the `async`/`await` keywords:
|
|
573
567
|
*
|
|
574
|
-
* ```
|
|
568
|
+
* ```js
|
|
575
569
|
* import { gotScraping } from 'got-scraping';
|
|
576
570
|
*
|
|
577
571
|
* await Actor.main(async () => {
|
|
@@ -586,6 +580,29 @@ export declare class Actor<Data extends Dictionary = Dictionary> {
|
|
|
586
580
|
* @param options
|
|
587
581
|
*/
|
|
588
582
|
static main<T>(userFunc: UserFunc<T>, options?: MainOptions): Promise<T>;
|
|
583
|
+
/**
|
|
584
|
+
* Initializes the Actor, enabling support for the [Apify platform](https://apify.com/actors) dynamically
|
|
585
|
+
* based on `APIFY_IS_AT_HOME` env var. If you are not running the code on Apify, you don't need to use it.
|
|
586
|
+
* The method will switch storage client implementation automatically, so when you run on the Apify platform,
|
|
587
|
+
* it will use its API instead of the default memory storage. It also increases the available memory ratio
|
|
588
|
+
* from 25% to 100% on the platform.
|
|
589
|
+
*
|
|
590
|
+
* Calling `Actor.exit()` is required if you use the `Actor.init()` method, since it opens websocket connection
|
|
591
|
+
* (see {@apilink Actor.events} for details), which needs to be terminated for the code to finish.
|
|
592
|
+
*
|
|
593
|
+
* ```js
|
|
594
|
+
* import { gotScraping } from 'got-scraping';
|
|
595
|
+
*
|
|
596
|
+
* await Actor.init();
|
|
597
|
+
*
|
|
598
|
+
* const html = await gotScraping('http://www.example.com');
|
|
599
|
+
* console.log(html);
|
|
600
|
+
*
|
|
601
|
+
* await Actor.exit();
|
|
602
|
+
* ```
|
|
603
|
+
*
|
|
604
|
+
* @param options
|
|
605
|
+
*/
|
|
589
606
|
static init(options?: InitOptions): Promise<void>;
|
|
590
607
|
/**
|
|
591
608
|
* Gracefully exits the Actor run with the provided status message and exit code.
|
|
@@ -612,7 +629,7 @@ export declare class Actor<Data extends Dictionary = Dictionary> {
|
|
|
612
629
|
*
|
|
613
630
|
* **Example usage:**
|
|
614
631
|
*
|
|
615
|
-
* ```
|
|
632
|
+
* ```js
|
|
616
633
|
* const run = await Actor.call('apify/hello-world', { myInput: 123 });
|
|
617
634
|
* ```
|
|
618
635
|
*
|
|
@@ -638,7 +655,7 @@ export declare class Actor<Data extends Dictionary = Dictionary> {
|
|
|
638
655
|
*
|
|
639
656
|
* **Example usage:**
|
|
640
657
|
*
|
|
641
|
-
* ```
|
|
658
|
+
* ```js
|
|
642
659
|
* const run = await Actor.callTask('bob/some-task');
|
|
643
660
|
* ```
|
|
644
661
|
*
|
|
@@ -662,7 +679,7 @@ export declare class Actor<Data extends Dictionary = Dictionary> {
|
|
|
662
679
|
*
|
|
663
680
|
* **Example usage:**
|
|
664
681
|
*
|
|
665
|
-
* ```
|
|
682
|
+
* ```js
|
|
666
683
|
* const run = await Actor.start('apify/hello-world', { myInput: 123 });
|
|
667
684
|
* ```
|
|
668
685
|
*
|
|
@@ -685,7 +702,7 @@ export declare class Actor<Data extends Dictionary = Dictionary> {
|
|
|
685
702
|
*
|
|
686
703
|
* **Example usage:**
|
|
687
704
|
*
|
|
688
|
-
* ```
|
|
705
|
+
* ```js
|
|
689
706
|
* const run = await Actor.abort(runId);
|
|
690
707
|
* ```
|
|
691
708
|
*/
|
|
@@ -738,12 +755,12 @@ export declare class Actor<Data extends Dictionary = Dictionary> {
|
|
|
738
755
|
*
|
|
739
756
|
* This is just a convenient shortcut for {@apilink Dataset.pushData}.
|
|
740
757
|
* For example, calling the following code:
|
|
741
|
-
* ```
|
|
758
|
+
* ```js
|
|
742
759
|
* await Actor.pushData({ myValue: 123 });
|
|
743
760
|
* ```
|
|
744
761
|
*
|
|
745
762
|
* is equivalent to:
|
|
746
|
-
* ```
|
|
763
|
+
* ```js
|
|
747
764
|
* const dataset = await Actor.openDataset();
|
|
748
765
|
* await dataset.pushData({ myValue: 123 });
|
|
749
766
|
* ```
|
|
@@ -777,12 +794,12 @@ export declare class Actor<Data extends Dictionary = Dictionary> {
|
|
|
777
794
|
*
|
|
778
795
|
* This is just a convenient shortcut for {@apilink KeyValueStore.getValue}.
|
|
779
796
|
* For example, calling the following code:
|
|
780
|
-
* ```
|
|
797
|
+
* ```js
|
|
781
798
|
* const value = await Actor.getValue('my-key');
|
|
782
799
|
* ```
|
|
783
800
|
*
|
|
784
801
|
* is equivalent to:
|
|
785
|
-
* ```
|
|
802
|
+
* ```js
|
|
786
803
|
* const store = await Actor.openKeyValueStore();
|
|
787
804
|
* const value = await store.getValue('my-key');
|
|
788
805
|
* ```
|
|
@@ -805,12 +822,12 @@ export declare class Actor<Data extends Dictionary = Dictionary> {
|
|
|
805
822
|
*
|
|
806
823
|
* This is just a convenient shortcut for {@apilink KeyValueStore.setValue}.
|
|
807
824
|
* For example, calling the following code:
|
|
808
|
-
* ```
|
|
825
|
+
* ```js
|
|
809
826
|
* await Actor.setValue('OUTPUT', { foo: "bar" });
|
|
810
827
|
* ```
|
|
811
828
|
*
|
|
812
829
|
* is equivalent to:
|
|
813
|
-
* ```
|
|
830
|
+
* ```js
|
|
814
831
|
* const store = await Actor.openKeyValueStore();
|
|
815
832
|
* await store.setValue('OUTPUT', { foo: "bar" });
|
|
816
833
|
* ```
|
|
@@ -836,12 +853,12 @@ export declare class Actor<Data extends Dictionary = Dictionary> {
|
|
|
836
853
|
*
|
|
837
854
|
* This is just a convenient shortcut for {@apilink KeyValueStore.getValue | `keyValueStore.getValue('INPUT')`}.
|
|
838
855
|
* For example, calling the following code:
|
|
839
|
-
* ```
|
|
856
|
+
* ```js
|
|
840
857
|
* const input = await Actor.getInput();
|
|
841
858
|
* ```
|
|
842
859
|
*
|
|
843
860
|
* is equivalent to:
|
|
844
|
-
* ```
|
|
861
|
+
* ```js
|
|
845
862
|
* const store = await Actor.openKeyValueStore();
|
|
846
863
|
* await store.getValue('INPUT');
|
|
847
864
|
* ```
|
|
@@ -906,7 +923,7 @@ export declare class Actor<Data extends Dictionary = Dictionary> {
|
|
|
906
923
|
*
|
|
907
924
|
* For more details and code examples, see the {@apilink ProxyConfiguration} class.
|
|
908
925
|
*
|
|
909
|
-
* ```
|
|
926
|
+
* ```js
|
|
910
927
|
*
|
|
911
928
|
* // Returns initialized proxy configuration class
|
|
912
929
|
* const proxyConfiguration = await Actor.createProxyConfiguration({
|
|
@@ -1054,7 +1071,7 @@ export interface ApifyEnv {
|
|
|
1054
1071
|
* Defines the path to a local directory where KeyValueStore, Dataset, and RequestQueue
|
|
1055
1072
|
* store their data. Typically, it is set to ./storage. If omitted, you should define the
|
|
1056
1073
|
* APIFY_TOKEN environment variable instead. See more info on combination of this and
|
|
1057
|
-
* APIFY_TOKEN [here](https://docs.apify.com/sdk/js/docs/guides/environment-variables#combinations-of-apify_local_storage_dir-and-apify_token)(
|
|
1074
|
+
* APIFY_TOKEN [here](https://docs.apify.com/sdk/js/docs/guides/environment-variables#combinations-of-apify_local_storage_dir-and-apify_token)(CRAWLEE_STORAGE_DIR)
|
|
1058
1075
|
*/
|
|
1059
1076
|
localStorageDir: string | null;
|
|
1060
1077
|
/**
|
|
@@ -1165,7 +1182,7 @@ export interface ExitOptions {
|
|
|
1165
1182
|
}
|
|
1166
1183
|
export interface OpenStorageOptions {
|
|
1167
1184
|
/**
|
|
1168
|
-
* If set to `true` then the cloud storage is used even if the `
|
|
1185
|
+
* If set to `true` then the cloud storage is used even if the `CRAWLEE_STORAGE_DIR`
|
|
1169
1186
|
* environment variable is set. This way it is possible to combine local and cloud storage.
|
|
1170
1187
|
* @default false
|
|
1171
1188
|
*/
|
package/actor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actor.d.ts","sourceRoot":"","sources":["../src/actor.ts"],"names":[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MAAM,CAAC;CACnC;AAED,MAAM,WAAW,aAAa;IAC1B,gBAAgB;IAChB,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,MAAM,WAAW,WAAW;IACxB,qCAAqC;IACrC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IAC/B;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,OAAO,EAAE,cAAc,IAAI,QAAQ,EAAE,CAAC;AAEtC;;;;;GAKG;AACH,eAAO,MAAM,UAAU;;;;CAItB,CAAC"}
|
package/actor.js
CHANGED
|
@@ -95,9 +95,6 @@ class Actor {
|
|
|
95
95
|
* it sets up a connection to listen for platform events.
|
|
96
96
|
* For example, to get a notification about an imminent migration to another server.
|
|
97
97
|
* See {@apilink Actor.events} for details.
|
|
98
|
-
* - It checks that either `APIFY_TOKEN` or `APIFY_LOCAL_STORAGE_DIR` environment variable
|
|
99
|
-
* is defined. If not, the functions sets `APIFY_LOCAL_STORAGE_DIR` to `./apify_storage`
|
|
100
|
-
* inside the current working directory. This is to simplify running code examples.
|
|
101
98
|
* - It invokes the user function passed as the `userFunc` parameter.
|
|
102
99
|
* - If the user function returned a promise, waits for it to resolve.
|
|
103
100
|
* - If the user function throws an exception or some other error is encountered,
|
|
@@ -106,7 +103,7 @@ class Actor {
|
|
|
106
103
|
*
|
|
107
104
|
* The user function can be synchronous:
|
|
108
105
|
*
|
|
109
|
-
* ```
|
|
106
|
+
* ```js
|
|
110
107
|
* await Actor.main(() => {
|
|
111
108
|
* // My synchronous function that returns immediately
|
|
112
109
|
* console.log('Hello world from Actor!');
|
|
@@ -114,7 +111,7 @@ class Actor {
|
|
|
114
111
|
* ```
|
|
115
112
|
*
|
|
116
113
|
* If the user function returns a promise, it is considered asynchronous:
|
|
117
|
-
* ```
|
|
114
|
+
* ```js
|
|
118
115
|
* import { gotScraping } from 'got-scraping';
|
|
119
116
|
*
|
|
120
117
|
* await Actor.main(() => {
|
|
@@ -127,7 +124,7 @@ class Actor {
|
|
|
127
124
|
*
|
|
128
125
|
* To simplify your code, you can take advantage of the `async`/`await` keywords:
|
|
129
126
|
*
|
|
130
|
-
* ```
|
|
127
|
+
* ```js
|
|
131
128
|
* import { gotScraping } from 'got-scraping';
|
|
132
129
|
*
|
|
133
130
|
* await Actor.main(async () => {
|
|
@@ -271,7 +268,7 @@ class Actor {
|
|
|
271
268
|
*
|
|
272
269
|
* **Example usage:**
|
|
273
270
|
*
|
|
274
|
-
* ```
|
|
271
|
+
* ```js
|
|
275
272
|
* const run = await Actor.call('apify/hello-world', { myInput: 123 });
|
|
276
273
|
* ```
|
|
277
274
|
*
|
|
@@ -300,7 +297,7 @@ class Actor {
|
|
|
300
297
|
*
|
|
301
298
|
* **Example usage:**
|
|
302
299
|
*
|
|
303
|
-
* ```
|
|
300
|
+
* ```js
|
|
304
301
|
* const run = await Actor.start('apify/hello-world', { myInput: 123 });
|
|
305
302
|
* ```
|
|
306
303
|
*
|
|
@@ -328,7 +325,7 @@ class Actor {
|
|
|
328
325
|
*
|
|
329
326
|
* **Example usage:**
|
|
330
327
|
*
|
|
331
|
-
* ```
|
|
328
|
+
* ```js
|
|
332
329
|
* const run = await Actor.abort(runId);
|
|
333
330
|
* ```
|
|
334
331
|
* @ignore
|
|
@@ -354,7 +351,7 @@ class Actor {
|
|
|
354
351
|
*
|
|
355
352
|
* **Example usage:**
|
|
356
353
|
*
|
|
357
|
-
* ```
|
|
354
|
+
* ```js
|
|
358
355
|
* const run = await Actor.callTask('bob/some-task');
|
|
359
356
|
* ```
|
|
360
357
|
*
|
|
@@ -505,12 +502,12 @@ class Actor {
|
|
|
505
502
|
*
|
|
506
503
|
* This is just a convenient shortcut for {@apilink Dataset.pushData}.
|
|
507
504
|
* For example, calling the following code:
|
|
508
|
-
* ```
|
|
505
|
+
* ```js
|
|
509
506
|
* await Actor.pushData({ myValue: 123 });
|
|
510
507
|
* ```
|
|
511
508
|
*
|
|
512
509
|
* is equivalent to:
|
|
513
|
-
* ```
|
|
510
|
+
* ```js
|
|
514
511
|
* const dataset = await Actor.openDataset();
|
|
515
512
|
* await dataset.pushData({ myValue: 123 });
|
|
516
513
|
* ```
|
|
@@ -557,12 +554,12 @@ class Actor {
|
|
|
557
554
|
*
|
|
558
555
|
* This is just a convenient shortcut for {@apilink KeyValueStore.getValue}.
|
|
559
556
|
* For example, calling the following code:
|
|
560
|
-
* ```
|
|
557
|
+
* ```js
|
|
561
558
|
* const value = await Actor.getValue('my-key');
|
|
562
559
|
* ```
|
|
563
560
|
*
|
|
564
561
|
* is equivalent to:
|
|
565
|
-
* ```
|
|
562
|
+
* ```js
|
|
566
563
|
* const store = await Actor.openKeyValueStore();
|
|
567
564
|
* const value = await store.getValue('my-key');
|
|
568
565
|
* ```
|
|
@@ -590,12 +587,12 @@ class Actor {
|
|
|
590
587
|
*
|
|
591
588
|
* This is just a convenient shortcut for {@apilink KeyValueStore.setValue}.
|
|
592
589
|
* For example, calling the following code:
|
|
593
|
-
* ```
|
|
590
|
+
* ```js
|
|
594
591
|
* await Actor.setValue('OUTPUT', { foo: "bar" });
|
|
595
592
|
* ```
|
|
596
593
|
*
|
|
597
594
|
* is equivalent to:
|
|
598
|
-
* ```
|
|
595
|
+
* ```js
|
|
599
596
|
* const store = await Actor.openKeyValueStore();
|
|
600
597
|
* await store.setValue('OUTPUT', { foo: "bar" });
|
|
601
598
|
* ```
|
|
@@ -626,12 +623,12 @@ class Actor {
|
|
|
626
623
|
*
|
|
627
624
|
* This is just a convenient shortcut for [`keyValueStore.getValue('INPUT')`](core/class/KeyValueStore#getValue).
|
|
628
625
|
* For example, calling the following code:
|
|
629
|
-
* ```
|
|
626
|
+
* ```js
|
|
630
627
|
* const input = await Actor.getInput();
|
|
631
628
|
* ```
|
|
632
629
|
*
|
|
633
630
|
* is equivalent to:
|
|
634
|
-
* ```
|
|
631
|
+
* ```js
|
|
635
632
|
* const store = await Actor.openKeyValueStore();
|
|
636
633
|
* await store.getValue('INPUT');
|
|
637
634
|
* ```
|
|
@@ -733,7 +730,7 @@ class Actor {
|
|
|
733
730
|
*
|
|
734
731
|
* For more details and code examples, see the {@apilink ProxyConfiguration} class.
|
|
735
732
|
*
|
|
736
|
-
* ```
|
|
733
|
+
* ```js
|
|
737
734
|
*
|
|
738
735
|
* // Returns initialized proxy configuration class
|
|
739
736
|
* const proxyConfiguration = await Actor.createProxyConfiguration({
|
|
@@ -884,9 +881,6 @@ class Actor {
|
|
|
884
881
|
* it sets up a connection to listen for platform events.
|
|
885
882
|
* For example, to get a notification about an imminent migration to another server.
|
|
886
883
|
* See {@apilink Actor.events} for details.
|
|
887
|
-
* - It checks that either `APIFY_TOKEN` or `APIFY_LOCAL_STORAGE_DIR` environment variable
|
|
888
|
-
* is defined. If not, the functions sets `APIFY_LOCAL_STORAGE_DIR` to `./apify_storage`
|
|
889
|
-
* inside the current working directory. This is to simplify running code examples.
|
|
890
884
|
* - It invokes the user function passed as the `userFunc` parameter.
|
|
891
885
|
* - If the user function returned a promise, waits for it to resolve.
|
|
892
886
|
* - If the user function throws an exception or some other error is encountered,
|
|
@@ -895,7 +889,7 @@ class Actor {
|
|
|
895
889
|
*
|
|
896
890
|
* The user function can be synchronous:
|
|
897
891
|
*
|
|
898
|
-
* ```
|
|
892
|
+
* ```js
|
|
899
893
|
* await Actor.main(() => {
|
|
900
894
|
* // My synchronous function that returns immediately
|
|
901
895
|
* console.log('Hello world from Actor!');
|
|
@@ -903,7 +897,7 @@ class Actor {
|
|
|
903
897
|
* ```
|
|
904
898
|
*
|
|
905
899
|
* If the user function returns a promise, it is considered asynchronous:
|
|
906
|
-
* ```
|
|
900
|
+
* ```js
|
|
907
901
|
* import { gotScraping } from 'got-scraping';
|
|
908
902
|
*
|
|
909
903
|
* await Actor.main(() => {
|
|
@@ -916,7 +910,7 @@ class Actor {
|
|
|
916
910
|
*
|
|
917
911
|
* To simplify your code, you can take advantage of the `async`/`await` keywords:
|
|
918
912
|
*
|
|
919
|
-
* ```
|
|
913
|
+
* ```js
|
|
920
914
|
* import { gotScraping } from 'got-scraping';
|
|
921
915
|
*
|
|
922
916
|
* await Actor.main(async () => {
|
|
@@ -933,6 +927,29 @@ class Actor {
|
|
|
933
927
|
static async main(userFunc, options) {
|
|
934
928
|
return Actor.getDefaultInstance().main(userFunc, options);
|
|
935
929
|
}
|
|
930
|
+
/**
|
|
931
|
+
* Initializes the Actor, enabling support for the [Apify platform](https://apify.com/actors) dynamically
|
|
932
|
+
* based on `APIFY_IS_AT_HOME` env var. If you are not running the code on Apify, you don't need to use it.
|
|
933
|
+
* The method will switch storage client implementation automatically, so when you run on the Apify platform,
|
|
934
|
+
* it will use its API instead of the default memory storage. It also increases the available memory ratio
|
|
935
|
+
* from 25% to 100% on the platform.
|
|
936
|
+
*
|
|
937
|
+
* Calling `Actor.exit()` is required if you use the `Actor.init()` method, since it opens websocket connection
|
|
938
|
+
* (see {@apilink Actor.events} for details), which needs to be terminated for the code to finish.
|
|
939
|
+
*
|
|
940
|
+
* ```js
|
|
941
|
+
* import { gotScraping } from 'got-scraping';
|
|
942
|
+
*
|
|
943
|
+
* await Actor.init();
|
|
944
|
+
*
|
|
945
|
+
* const html = await gotScraping('http://www.example.com');
|
|
946
|
+
* console.log(html);
|
|
947
|
+
*
|
|
948
|
+
* await Actor.exit();
|
|
949
|
+
* ```
|
|
950
|
+
*
|
|
951
|
+
* @param options
|
|
952
|
+
*/
|
|
936
953
|
static async init(options = {}) {
|
|
937
954
|
return Actor.getDefaultInstance().init(options);
|
|
938
955
|
}
|
|
@@ -969,7 +986,7 @@ class Actor {
|
|
|
969
986
|
*
|
|
970
987
|
* **Example usage:**
|
|
971
988
|
*
|
|
972
|
-
* ```
|
|
989
|
+
* ```js
|
|
973
990
|
* const run = await Actor.call('apify/hello-world', { myInput: 123 });
|
|
974
991
|
* ```
|
|
975
992
|
*
|
|
@@ -997,7 +1014,7 @@ class Actor {
|
|
|
997
1014
|
*
|
|
998
1015
|
* **Example usage:**
|
|
999
1016
|
*
|
|
1000
|
-
* ```
|
|
1017
|
+
* ```js
|
|
1001
1018
|
* const run = await Actor.callTask('bob/some-task');
|
|
1002
1019
|
* ```
|
|
1003
1020
|
*
|
|
@@ -1023,7 +1040,7 @@ class Actor {
|
|
|
1023
1040
|
*
|
|
1024
1041
|
* **Example usage:**
|
|
1025
1042
|
*
|
|
1026
|
-
* ```
|
|
1043
|
+
* ```js
|
|
1027
1044
|
* const run = await Actor.start('apify/hello-world', { myInput: 123 });
|
|
1028
1045
|
* ```
|
|
1029
1046
|
*
|
|
@@ -1048,7 +1065,7 @@ class Actor {
|
|
|
1048
1065
|
*
|
|
1049
1066
|
* **Example usage:**
|
|
1050
1067
|
*
|
|
1051
|
-
* ```
|
|
1068
|
+
* ```js
|
|
1052
1069
|
* const run = await Actor.abort(runId);
|
|
1053
1070
|
* ```
|
|
1054
1071
|
*/
|
|
@@ -1111,12 +1128,12 @@ class Actor {
|
|
|
1111
1128
|
*
|
|
1112
1129
|
* This is just a convenient shortcut for {@apilink Dataset.pushData}.
|
|
1113
1130
|
* For example, calling the following code:
|
|
1114
|
-
* ```
|
|
1131
|
+
* ```js
|
|
1115
1132
|
* await Actor.pushData({ myValue: 123 });
|
|
1116
1133
|
* ```
|
|
1117
1134
|
*
|
|
1118
1135
|
* is equivalent to:
|
|
1119
|
-
* ```
|
|
1136
|
+
* ```js
|
|
1120
1137
|
* const dataset = await Actor.openDataset();
|
|
1121
1138
|
* await dataset.pushData({ myValue: 123 });
|
|
1122
1139
|
* ```
|
|
@@ -1154,12 +1171,12 @@ class Actor {
|
|
|
1154
1171
|
*
|
|
1155
1172
|
* This is just a convenient shortcut for {@apilink KeyValueStore.getValue}.
|
|
1156
1173
|
* For example, calling the following code:
|
|
1157
|
-
* ```
|
|
1174
|
+
* ```js
|
|
1158
1175
|
* const value = await Actor.getValue('my-key');
|
|
1159
1176
|
* ```
|
|
1160
1177
|
*
|
|
1161
1178
|
* is equivalent to:
|
|
1162
|
-
* ```
|
|
1179
|
+
* ```js
|
|
1163
1180
|
* const store = await Actor.openKeyValueStore();
|
|
1164
1181
|
* const value = await store.getValue('my-key');
|
|
1165
1182
|
* ```
|
|
@@ -1184,12 +1201,12 @@ class Actor {
|
|
|
1184
1201
|
*
|
|
1185
1202
|
* This is just a convenient shortcut for {@apilink KeyValueStore.setValue}.
|
|
1186
1203
|
* For example, calling the following code:
|
|
1187
|
-
* ```
|
|
1204
|
+
* ```js
|
|
1188
1205
|
* await Actor.setValue('OUTPUT', { foo: "bar" });
|
|
1189
1206
|
* ```
|
|
1190
1207
|
*
|
|
1191
1208
|
* is equivalent to:
|
|
1192
|
-
* ```
|
|
1209
|
+
* ```js
|
|
1193
1210
|
* const store = await Actor.openKeyValueStore();
|
|
1194
1211
|
* await store.setValue('OUTPUT', { foo: "bar" });
|
|
1195
1212
|
* ```
|
|
@@ -1217,12 +1234,12 @@ class Actor {
|
|
|
1217
1234
|
*
|
|
1218
1235
|
* This is just a convenient shortcut for {@apilink KeyValueStore.getValue | `keyValueStore.getValue('INPUT')`}.
|
|
1219
1236
|
* For example, calling the following code:
|
|
1220
|
-
* ```
|
|
1237
|
+
* ```js
|
|
1221
1238
|
* const input = await Actor.getInput();
|
|
1222
1239
|
* ```
|
|
1223
1240
|
*
|
|
1224
1241
|
* is equivalent to:
|
|
1225
|
-
* ```
|
|
1242
|
+
* ```js
|
|
1226
1243
|
* const store = await Actor.openKeyValueStore();
|
|
1227
1244
|
* await store.getValue('INPUT');
|
|
1228
1245
|
* ```
|
|
@@ -1295,7 +1312,7 @@ class Actor {
|
|
|
1295
1312
|
*
|
|
1296
1313
|
* For more details and code examples, see the {@apilink ProxyConfiguration} class.
|
|
1297
1314
|
*
|
|
1298
|
-
* ```
|
|
1315
|
+
* ```js
|
|
1299
1316
|
*
|
|
1300
1317
|
* // Returns initialized proxy configuration class
|
|
1301
1318
|
* const proxyConfiguration = await Actor.createProxyConfiguration({
|