rezo 1.0.63 → 1.0.64
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/dist/adapters/index.cjs +6 -6
- package/dist/cache/index.cjs +9 -9
- package/dist/crawler/crawler.cjs +1 -2
- package/dist/crawler/crawler.js +1 -2
- package/dist/crawler/index.cjs +40 -40
- package/dist/crawler/plugin/index.cjs +1 -1
- package/dist/entries/crawler.cjs +4 -4
- package/dist/index.cjs +27 -27
- package/dist/internal/agents/index.cjs +10 -10
- package/dist/proxy/index.cjs +4 -4
- package/dist/queue/index.cjs +8 -8
- package/dist/responses/universal/index.cjs +11 -11
- package/package.json +1 -1
package/dist/adapters/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.detectRuntime =
|
|
3
|
-
exports.getAdapterCapabilities =
|
|
4
|
-
exports.buildAdapterContext =
|
|
5
|
-
exports.getAvailableAdapters =
|
|
6
|
-
exports.selectAdapter =
|
|
1
|
+
const _mod_4c0peh = require('./picker.cjs');
|
|
2
|
+
exports.detectRuntime = _mod_4c0peh.detectRuntime;
|
|
3
|
+
exports.getAdapterCapabilities = _mod_4c0peh.getAdapterCapabilities;
|
|
4
|
+
exports.buildAdapterContext = _mod_4c0peh.buildAdapterContext;
|
|
5
|
+
exports.getAvailableAdapters = _mod_4c0peh.getAvailableAdapters;
|
|
6
|
+
exports.selectAdapter = _mod_4c0peh.selectAdapter;;
|
package/dist/cache/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.LRUCache =
|
|
3
|
-
const
|
|
4
|
-
exports.DNSCache =
|
|
5
|
-
exports.getGlobalDNSCache =
|
|
6
|
-
exports.resetGlobalDNSCache =
|
|
7
|
-
const
|
|
8
|
-
exports.ResponseCache =
|
|
9
|
-
exports.normalizeResponseCacheConfig =
|
|
1
|
+
const _mod_z313xk = require('./lru-cache.cjs');
|
|
2
|
+
exports.LRUCache = _mod_z313xk.LRUCache;;
|
|
3
|
+
const _mod_s9k0nm = require('./dns-cache.cjs');
|
|
4
|
+
exports.DNSCache = _mod_s9k0nm.DNSCache;
|
|
5
|
+
exports.getGlobalDNSCache = _mod_s9k0nm.getGlobalDNSCache;
|
|
6
|
+
exports.resetGlobalDNSCache = _mod_s9k0nm.resetGlobalDNSCache;;
|
|
7
|
+
const _mod_mk2k1e = require('./response-cache.cjs');
|
|
8
|
+
exports.ResponseCache = _mod_mk2k1e.ResponseCache;
|
|
9
|
+
exports.normalizeResponseCacheConfig = _mod_mk2k1e.normalizeResponseCacheConfig;;
|
package/dist/crawler/crawler.cjs
CHANGED
|
@@ -843,7 +843,7 @@ class Crawler {
|
|
|
843
843
|
params,
|
|
844
844
|
proxy: useProxy ? this.config.getAdapter(url, "proxies", true, true) || undefined : undefined,
|
|
845
845
|
rejectUnauthorized: typeof rejectUnauthorized === "boolean" ? rejectUnauthorized : this.config.rejectUnauthorized,
|
|
846
|
-
|
|
846
|
+
queue: this.config.getAdapter(url, "limiters", useQueue, useQueue) || undefined
|
|
847
847
|
};
|
|
848
848
|
let oxylabsOptions = {};
|
|
849
849
|
let oxylabsInstanse = undefined;
|
|
@@ -940,7 +940,6 @@ class Crawler {
|
|
|
940
940
|
}
|
|
941
941
|
const requestStartTime = Date.now();
|
|
942
942
|
const response = cache && method === "GET" && !skipCache ? cache : oxylabsInstanse && oxylabsOptions ? await oxylabsInstanse.scrape(url) : decodoInstanse && decodoOptions ? await decodoInstanse.scrape(url) : await (method === "GET" ? this.http.get(url, options) : method === "PATCH" ? this.http.patch(url, body, options) : method === "POST" ? this.http.post(url, body, options) : this.http.put(url, body, options));
|
|
943
|
-
console.log({ response, cache });
|
|
944
943
|
if (!cache) {
|
|
945
944
|
const responseTime = Date.now() - requestStartTime;
|
|
946
945
|
this.calculateAutoThrottleDelay(domain, responseTime);
|
package/dist/crawler/crawler.js
CHANGED
|
@@ -843,7 +843,7 @@ export class Crawler {
|
|
|
843
843
|
params,
|
|
844
844
|
proxy: useProxy ? this.config.getAdapter(url, "proxies", true, true) || undefined : undefined,
|
|
845
845
|
rejectUnauthorized: typeof rejectUnauthorized === "boolean" ? rejectUnauthorized : this.config.rejectUnauthorized,
|
|
846
|
-
|
|
846
|
+
queue: this.config.getAdapter(url, "limiters", useQueue, useQueue) || undefined
|
|
847
847
|
};
|
|
848
848
|
let oxylabsOptions = {};
|
|
849
849
|
let oxylabsInstanse = undefined;
|
|
@@ -940,7 +940,6 @@ export class Crawler {
|
|
|
940
940
|
}
|
|
941
941
|
const requestStartTime = Date.now();
|
|
942
942
|
const response = cache && method === "GET" && !skipCache ? cache : oxylabsInstanse && oxylabsOptions ? await oxylabsInstanse.scrape(url) : decodoInstanse && decodoOptions ? await decodoInstanse.scrape(url) : await (method === "GET" ? this.http.get(url, options) : method === "PATCH" ? this.http.patch(url, body, options) : method === "POST" ? this.http.post(url, body, options) : this.http.put(url, body, options));
|
|
943
|
-
console.log({ response, cache });
|
|
944
943
|
if (!cache) {
|
|
945
944
|
const responseTime = Date.now() - requestStartTime;
|
|
946
945
|
this.calculateAutoThrottleDelay(domain, responseTime);
|
package/dist/crawler/index.cjs
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.Crawler =
|
|
3
|
-
const
|
|
4
|
-
exports.CrawlerOptions =
|
|
5
|
-
const
|
|
6
|
-
exports.RobotsTxt =
|
|
7
|
-
const
|
|
8
|
-
exports.FileCacher =
|
|
9
|
-
const
|
|
10
|
-
exports.UrlStore =
|
|
11
|
-
const
|
|
12
|
-
exports.NavigationHistory =
|
|
13
|
-
const
|
|
14
|
-
exports.Oxylabs =
|
|
15
|
-
const
|
|
16
|
-
exports.OXYLABS_BROWSER_TYPES =
|
|
17
|
-
exports.OXYLABS_COMMON_LOCALES =
|
|
18
|
-
exports.OXYLABS_COMMON_GEO_LOCATIONS =
|
|
19
|
-
exports.OXYLABS_US_STATES =
|
|
20
|
-
exports.OXYLABS_EUROPEAN_COUNTRIES =
|
|
21
|
-
exports.OXYLABS_ASIAN_COUNTRIES =
|
|
22
|
-
exports.getRandomOxylabsBrowserType =
|
|
23
|
-
exports.getRandomOxylabsLocale =
|
|
24
|
-
exports.getRandomOxylabsGeoLocation =
|
|
25
|
-
const
|
|
26
|
-
exports.Decodo =
|
|
27
|
-
const
|
|
28
|
-
exports.DECODO_DEVICE_TYPES =
|
|
29
|
-
exports.DECODO_HEADLESS_MODES =
|
|
30
|
-
exports.DECODO_COMMON_LOCALES =
|
|
31
|
-
exports.DECODO_COMMON_COUNTRIES =
|
|
32
|
-
exports.DECODO_EUROPEAN_COUNTRIES =
|
|
33
|
-
exports.DECODO_ASIAN_COUNTRIES =
|
|
34
|
-
exports.DECODO_US_STATES =
|
|
35
|
-
exports.DECODO_COMMON_CITIES =
|
|
36
|
-
exports.getRandomDecodoDeviceType =
|
|
37
|
-
exports.getRandomDecodoLocale =
|
|
38
|
-
exports.getRandomDecodoCountry =
|
|
39
|
-
exports.getRandomDecodoCity =
|
|
40
|
-
exports.generateDecodoSessionId =
|
|
1
|
+
const _mod_o1i7dy = require('./crawler.cjs');
|
|
2
|
+
exports.Crawler = _mod_o1i7dy.Crawler;;
|
|
3
|
+
const _mod_9ywpl4 = require('./crawler-options.cjs');
|
|
4
|
+
exports.CrawlerOptions = _mod_9ywpl4.CrawlerOptions;;
|
|
5
|
+
const _mod_z2gv2k = require('./plugin/robots-txt.cjs');
|
|
6
|
+
exports.RobotsTxt = _mod_z2gv2k.RobotsTxt;;
|
|
7
|
+
const _mod_hipgel = require('./plugin/file-cacher.cjs');
|
|
8
|
+
exports.FileCacher = _mod_hipgel.FileCacher;;
|
|
9
|
+
const _mod_xk7y1s = require('./plugin/url-store.cjs');
|
|
10
|
+
exports.UrlStore = _mod_xk7y1s.UrlStore;;
|
|
11
|
+
const _mod_x224qe = require('./plugin/navigation-history.cjs');
|
|
12
|
+
exports.NavigationHistory = _mod_x224qe.NavigationHistory;;
|
|
13
|
+
const _mod_3sph6m = require('./addon/oxylabs/index.cjs');
|
|
14
|
+
exports.Oxylabs = _mod_3sph6m.Oxylabs;;
|
|
15
|
+
const _mod_3e4t9e = require('./addon/oxylabs/options.cjs');
|
|
16
|
+
exports.OXYLABS_BROWSER_TYPES = _mod_3e4t9e.OXYLABS_BROWSER_TYPES;
|
|
17
|
+
exports.OXYLABS_COMMON_LOCALES = _mod_3e4t9e.OXYLABS_COMMON_LOCALES;
|
|
18
|
+
exports.OXYLABS_COMMON_GEO_LOCATIONS = _mod_3e4t9e.OXYLABS_COMMON_GEO_LOCATIONS;
|
|
19
|
+
exports.OXYLABS_US_STATES = _mod_3e4t9e.OXYLABS_US_STATES;
|
|
20
|
+
exports.OXYLABS_EUROPEAN_COUNTRIES = _mod_3e4t9e.OXYLABS_EUROPEAN_COUNTRIES;
|
|
21
|
+
exports.OXYLABS_ASIAN_COUNTRIES = _mod_3e4t9e.OXYLABS_ASIAN_COUNTRIES;
|
|
22
|
+
exports.getRandomOxylabsBrowserType = _mod_3e4t9e.getRandomBrowserType;
|
|
23
|
+
exports.getRandomOxylabsLocale = _mod_3e4t9e.getRandomLocale;
|
|
24
|
+
exports.getRandomOxylabsGeoLocation = _mod_3e4t9e.getRandomGeoLocation;;
|
|
25
|
+
const _mod_jbcztc = require('./addon/decodo/index.cjs');
|
|
26
|
+
exports.Decodo = _mod_jbcztc.Decodo;;
|
|
27
|
+
const _mod_zqnknu = require('./addon/decodo/options.cjs');
|
|
28
|
+
exports.DECODO_DEVICE_TYPES = _mod_zqnknu.DECODO_DEVICE_TYPES;
|
|
29
|
+
exports.DECODO_HEADLESS_MODES = _mod_zqnknu.DECODO_HEADLESS_MODES;
|
|
30
|
+
exports.DECODO_COMMON_LOCALES = _mod_zqnknu.DECODO_COMMON_LOCALES;
|
|
31
|
+
exports.DECODO_COMMON_COUNTRIES = _mod_zqnknu.DECODO_COMMON_COUNTRIES;
|
|
32
|
+
exports.DECODO_EUROPEAN_COUNTRIES = _mod_zqnknu.DECODO_EUROPEAN_COUNTRIES;
|
|
33
|
+
exports.DECODO_ASIAN_COUNTRIES = _mod_zqnknu.DECODO_ASIAN_COUNTRIES;
|
|
34
|
+
exports.DECODO_US_STATES = _mod_zqnknu.DECODO_US_STATES;
|
|
35
|
+
exports.DECODO_COMMON_CITIES = _mod_zqnknu.DECODO_COMMON_CITIES;
|
|
36
|
+
exports.getRandomDecodoDeviceType = _mod_zqnknu.getRandomDeviceType;
|
|
37
|
+
exports.getRandomDecodoLocale = _mod_zqnknu.getRandomLocale;
|
|
38
|
+
exports.getRandomDecodoCountry = _mod_zqnknu.getRandomCountry;
|
|
39
|
+
exports.getRandomDecodoCity = _mod_zqnknu.getRandomCity;
|
|
40
|
+
exports.generateDecodoSessionId = _mod_zqnknu.generateSessionId;;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var r=require("./file-cacher.cjs");exports.FileCacher=r.FileCacher;var e=require("./url-store.cjs");exports.UrlStore=e.UrlStore;
|
package/dist/entries/crawler.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.Crawler =
|
|
3
|
-
const
|
|
4
|
-
exports.CrawlerOptions =
|
|
1
|
+
const _mod_w4kkhv = require('../crawler/crawler.cjs');
|
|
2
|
+
exports.Crawler = _mod_w4kkhv.Crawler;;
|
|
3
|
+
const _mod_fiyx3u = require('../crawler/crawler-options.cjs');
|
|
4
|
+
exports.CrawlerOptions = _mod_fiyx3u.CrawlerOptions;;
|
package/dist/index.cjs
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.Rezo =
|
|
3
|
-
exports.createRezoInstance =
|
|
4
|
-
exports.createDefaultInstance =
|
|
5
|
-
const
|
|
6
|
-
exports.RezoError =
|
|
7
|
-
exports.RezoErrorCode =
|
|
8
|
-
const
|
|
9
|
-
exports.RezoHeaders =
|
|
10
|
-
const
|
|
11
|
-
exports.RezoFormData =
|
|
12
|
-
const
|
|
13
|
-
exports.RezoCookieJar =
|
|
14
|
-
exports.Cookie =
|
|
15
|
-
const
|
|
16
|
-
exports.toCurl =
|
|
17
|
-
exports.fromCurl =
|
|
18
|
-
const
|
|
19
|
-
exports.createDefaultHooks =
|
|
20
|
-
exports.mergeHooks =
|
|
21
|
-
const
|
|
22
|
-
exports.ProxyManager =
|
|
23
|
-
const
|
|
24
|
-
exports.RezoQueue =
|
|
25
|
-
exports.HttpQueue =
|
|
26
|
-
exports.Priority =
|
|
27
|
-
exports.HttpMethodPriority =
|
|
1
|
+
const _mod_7y7owb = require('./core/rezo.cjs');
|
|
2
|
+
exports.Rezo = _mod_7y7owb.Rezo;
|
|
3
|
+
exports.createRezoInstance = _mod_7y7owb.createRezoInstance;
|
|
4
|
+
exports.createDefaultInstance = _mod_7y7owb.createDefaultInstance;;
|
|
5
|
+
const _mod_m2gp9k = require('./errors/rezo-error.cjs');
|
|
6
|
+
exports.RezoError = _mod_m2gp9k.RezoError;
|
|
7
|
+
exports.RezoErrorCode = _mod_m2gp9k.RezoErrorCode;;
|
|
8
|
+
const _mod_1kei6w = require('./utils/headers.cjs');
|
|
9
|
+
exports.RezoHeaders = _mod_1kei6w.RezoHeaders;;
|
|
10
|
+
const _mod_otsozo = require('./utils/form-data.cjs');
|
|
11
|
+
exports.RezoFormData = _mod_otsozo.RezoFormData;;
|
|
12
|
+
const _mod_i1qoqb = require('./utils/cookies.cjs');
|
|
13
|
+
exports.RezoCookieJar = _mod_i1qoqb.RezoCookieJar;
|
|
14
|
+
exports.Cookie = _mod_i1qoqb.Cookie;;
|
|
15
|
+
const _mod_l234vd = require('./utils/curl.cjs');
|
|
16
|
+
exports.toCurl = _mod_l234vd.toCurl;
|
|
17
|
+
exports.fromCurl = _mod_l234vd.fromCurl;;
|
|
18
|
+
const _mod_4xnhr8 = require('./core/hooks.cjs');
|
|
19
|
+
exports.createDefaultHooks = _mod_4xnhr8.createDefaultHooks;
|
|
20
|
+
exports.mergeHooks = _mod_4xnhr8.mergeHooks;;
|
|
21
|
+
const _mod_mibvuq = require('./proxy/manager.cjs');
|
|
22
|
+
exports.ProxyManager = _mod_mibvuq.ProxyManager;;
|
|
23
|
+
const _mod_cye7iw = require('./queue/index.cjs');
|
|
24
|
+
exports.RezoQueue = _mod_cye7iw.RezoQueue;
|
|
25
|
+
exports.HttpQueue = _mod_cye7iw.HttpQueue;
|
|
26
|
+
exports.Priority = _mod_cye7iw.Priority;
|
|
27
|
+
exports.HttpMethodPriority = _mod_cye7iw.HttpMethodPriority;;
|
|
28
28
|
const { RezoError } = require('./errors/rezo-error.cjs');
|
|
29
29
|
const isRezoError = exports.isRezoError = RezoError.isRezoError;
|
|
30
30
|
const Cancel = exports.Cancel = RezoError;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.Agent =
|
|
3
|
-
const
|
|
4
|
-
exports.HttpProxyAgent =
|
|
5
|
-
const
|
|
6
|
-
exports.HttpsProxyAgent =
|
|
7
|
-
const
|
|
8
|
-
exports.SocksProxyAgent =
|
|
9
|
-
const
|
|
10
|
-
exports.SocksClient =
|
|
1
|
+
const _mod_5wmaq1 = require('./base.cjs');
|
|
2
|
+
exports.Agent = _mod_5wmaq1.Agent;;
|
|
3
|
+
const _mod_rekzdg = require('./http-proxy.cjs');
|
|
4
|
+
exports.HttpProxyAgent = _mod_rekzdg.HttpProxyAgent;;
|
|
5
|
+
const _mod_pstipg = require('./https-proxy.cjs');
|
|
6
|
+
exports.HttpsProxyAgent = _mod_pstipg.HttpsProxyAgent;;
|
|
7
|
+
const _mod_haz0pb = require('./socks-proxy.cjs');
|
|
8
|
+
exports.SocksProxyAgent = _mod_haz0pb.SocksProxyAgent;;
|
|
9
|
+
const _mod_mxslm0 = require('./socks-client.cjs');
|
|
10
|
+
exports.SocksClient = _mod_mxslm0.SocksClient;;
|
package/dist/proxy/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const { Agent, HttpProxyAgent, HttpsProxyAgent, SocksProxyAgent } = require('../internal/agents/index.cjs');
|
|
2
2
|
const { parseProxyString } = require('./parse.cjs');
|
|
3
|
-
const
|
|
4
|
-
exports.ProxyManager =
|
|
5
|
-
const
|
|
6
|
-
exports.parseProxyString =
|
|
3
|
+
const _mod_0p8pms = require('./manager.cjs');
|
|
4
|
+
exports.ProxyManager = _mod_0p8pms.ProxyManager;;
|
|
5
|
+
const _mod_t2470u = require('./parse.cjs');
|
|
6
|
+
exports.parseProxyString = _mod_t2470u.parseProxyString;;
|
|
7
7
|
function createOptions(uri, opts) {
|
|
8
8
|
if (uri instanceof URL || typeof uri === "string") {
|
|
9
9
|
return {
|
package/dist/queue/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.RezoQueue =
|
|
3
|
-
const
|
|
4
|
-
exports.HttpQueue =
|
|
5
|
-
exports.extractDomain =
|
|
6
|
-
const
|
|
7
|
-
exports.Priority =
|
|
8
|
-
exports.HttpMethodPriority =
|
|
1
|
+
const _mod_sm75pf = require('./queue.cjs');
|
|
2
|
+
exports.RezoQueue = _mod_sm75pf.RezoQueue;;
|
|
3
|
+
const _mod_jkxs9z = require('./http-queue.cjs');
|
|
4
|
+
exports.HttpQueue = _mod_jkxs9z.HttpQueue;
|
|
5
|
+
exports.extractDomain = _mod_jkxs9z.extractDomain;;
|
|
6
|
+
const _mod_3nhfhq = require('./types.cjs');
|
|
7
|
+
exports.Priority = _mod_3nhfhq.Priority;
|
|
8
|
+
exports.HttpMethodPriority = _mod_3nhfhq.HttpMethodPriority;;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.UniversalEventEmitter =
|
|
3
|
-
const
|
|
4
|
-
exports.UniversalStreamResponse =
|
|
5
|
-
exports.StreamResponse =
|
|
6
|
-
const
|
|
7
|
-
exports.UniversalDownloadResponse =
|
|
8
|
-
exports.DownloadResponse =
|
|
9
|
-
const
|
|
10
|
-
exports.UniversalUploadResponse =
|
|
11
|
-
exports.UploadResponse =
|
|
1
|
+
const _mod_ilaezh = require('./event-emitter.cjs');
|
|
2
|
+
exports.UniversalEventEmitter = _mod_ilaezh.UniversalEventEmitter;;
|
|
3
|
+
const _mod_vh2ew1 = require('./stream.cjs');
|
|
4
|
+
exports.UniversalStreamResponse = _mod_vh2ew1.UniversalStreamResponse;
|
|
5
|
+
exports.StreamResponse = _mod_vh2ew1.StreamResponse;;
|
|
6
|
+
const _mod_rsdt23 = require('./download.cjs');
|
|
7
|
+
exports.UniversalDownloadResponse = _mod_rsdt23.UniversalDownloadResponse;
|
|
8
|
+
exports.DownloadResponse = _mod_rsdt23.DownloadResponse;;
|
|
9
|
+
const _mod_15456i = require('./upload.cjs');
|
|
10
|
+
exports.UniversalUploadResponse = _mod_15456i.UniversalUploadResponse;
|
|
11
|
+
exports.UploadResponse = _mod_15456i.UploadResponse;;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rezo",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.64",
|
|
4
4
|
"description": "Lightning-fast, enterprise-grade HTTP client for modern JavaScript. Full HTTP/2 support, intelligent cookie management, multiple adapters (HTTP, Fetch, cURL, XHR), streaming, proxy support (HTTP/HTTPS/SOCKS), and cross-environment compatibility.",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|