instasave-sdk 1.2.7 → 1.2.8
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/CHANGELOG.md +113 -0
- package/README.md +202 -2
- package/dist/core/media-scraper.d.ts +6 -0
- package/dist/core/media-scraper.d.ts.map +1 -1
- package/dist/core/media-scraper.js +8 -0
- package/dist/core/media-scraper.js.map +1 -1
- package/dist/download/download-engine.d.ts +32 -0
- package/dist/download/download-engine.d.ts.map +1 -0
- package/dist/download/download-engine.js +177 -0
- package/dist/download/download-engine.js.map +1 -0
- package/dist/download/download-manager.d.ts +18 -0
- package/dist/download/download-manager.d.ts.map +1 -0
- package/dist/download/download-manager.js +232 -0
- package/dist/download/download-manager.js.map +1 -0
- package/dist/download/download-scrape.d.ts +32 -0
- package/dist/download/download-scrape.d.ts.map +1 -0
- package/dist/download/download-scrape.js +159 -0
- package/dist/download/download-scrape.js.map +1 -0
- package/dist/download/index.d.ts +4 -0
- package/dist/download/index.d.ts.map +1 -0
- package/dist/download/index.js +25 -0
- package/dist/download/index.js.map +1 -0
- package/dist/download/types.d.ts +48 -0
- package/dist/download/types.d.ts.map +1 -0
- package/dist/download/types.js +6 -0
- package/dist/download/types.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/package.json +6 -3
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.DownloadScrapeEngine = exports.downloadScrape = exports.downloadImages = exports.DownloadManager = void 0;
|
|
18
|
+
__exportStar(require("./types"), exports);
|
|
19
|
+
var download_manager_1 = require("./download-manager");
|
|
20
|
+
Object.defineProperty(exports, "DownloadManager", { enumerable: true, get: function () { return download_manager_1.DownloadManager; } });
|
|
21
|
+
Object.defineProperty(exports, "downloadImages", { enumerable: true, get: function () { return download_manager_1.downloadImages; } });
|
|
22
|
+
var download_scrape_1 = require("./download-scrape");
|
|
23
|
+
Object.defineProperty(exports, "downloadScrape", { enumerable: true, get: function () { return download_scrape_1.downloadScrape; } });
|
|
24
|
+
Object.defineProperty(exports, "DownloadScrapeEngine", { enumerable: true, get: function () { return download_scrape_1.DownloadScrapeEngine; } });
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/download/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,uDAAqE;AAA5D,mHAAA,eAAe,OAAA;AAAE,kHAAA,cAAc,OAAA;AACxC,qDAAsH;AAA7G,iHAAA,cAAc,OAAA;AAAE,uHAAA,oBAAoB,OAAA"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Download module types
|
|
3
|
+
*/
|
|
4
|
+
export interface DownloadOptions {
|
|
5
|
+
savePath: string;
|
|
6
|
+
getFile: 'download' | 'save' | boolean;
|
|
7
|
+
filename?: string;
|
|
8
|
+
format?: 'original';
|
|
9
|
+
quality?: number;
|
|
10
|
+
overwrite?: boolean;
|
|
11
|
+
skipDuplicates?: boolean;
|
|
12
|
+
createSubfolders?: boolean;
|
|
13
|
+
onProgress?: (percent: number, current: number, total: number) => void;
|
|
14
|
+
timeout?: number;
|
|
15
|
+
}
|
|
16
|
+
export interface DownloadResult {
|
|
17
|
+
success: boolean;
|
|
18
|
+
total: number;
|
|
19
|
+
downloaded: number;
|
|
20
|
+
failed: number;
|
|
21
|
+
skipped: number;
|
|
22
|
+
files: DownloadedFile[];
|
|
23
|
+
errors: DownloadError[];
|
|
24
|
+
totalBytes: number;
|
|
25
|
+
duration: number;
|
|
26
|
+
}
|
|
27
|
+
export interface DownloadedFile {
|
|
28
|
+
index: number;
|
|
29
|
+
url: string;
|
|
30
|
+
path: string;
|
|
31
|
+
filename: string;
|
|
32
|
+
bytes: number;
|
|
33
|
+
format: string;
|
|
34
|
+
}
|
|
35
|
+
export interface DownloadError {
|
|
36
|
+
index: number;
|
|
37
|
+
url: string;
|
|
38
|
+
code: string;
|
|
39
|
+
message: string;
|
|
40
|
+
}
|
|
41
|
+
export interface DownloadFileParams {
|
|
42
|
+
url: string;
|
|
43
|
+
destPath: string;
|
|
44
|
+
filename: string;
|
|
45
|
+
onProgress?: (percent: number) => void;
|
|
46
|
+
timeout?: number;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/download/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,UAAU,GAAG,MAAM,GAAG,OAAO,CAAC;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,C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AA;;GAEG"}
|
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,9 @@ export { URLNormalizer } from './utils/url-normalizer';
|
|
|
11
11
|
export { CrawlerManager } from './browser/crawler-manager';
|
|
12
12
|
export { BrowserPool } from './browser/browser-pool';
|
|
13
13
|
export { ConsoleMode, log } from './utils/logger';
|
|
14
|
+
export { DownloadManager, downloadImages } from './download';
|
|
15
|
+
export { downloadScrape, DownloadScrapeEngine, DownloadScrapeOptions, DownloadScrapeResult } from './download';
|
|
16
|
+
export type { DownloadOptions, DownloadResult, DownloadedFile, DownloadError } from './download';
|
|
14
17
|
export * from './types';
|
|
15
18
|
export * from './platforms';
|
|
16
19
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAChH,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC5F,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,cAAc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,aAAa,EAAE,MAAM,YAAY,CAAC;AAGjG,cAAc,SAAS,CAAC;AAGxB,cAAc,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.log = exports.BrowserPool = exports.CrawlerManager = exports.URLNormalizer = exports.ConfigParser = exports.FileManager = exports.ProgressTracker = exports.BUILTIN_PLATFORMS = exports.HealthChecker = exports.MetricsCollector = exports.PluginManager = exports.FastAuthManager = exports.WorkflowExecutor = exports.MediaScraper = void 0;
|
|
17
|
+
exports.DownloadScrapeEngine = exports.downloadScrape = exports.downloadImages = exports.DownloadManager = exports.log = exports.BrowserPool = exports.CrawlerManager = exports.URLNormalizer = exports.ConfigParser = exports.FileManager = exports.ProgressTracker = exports.BUILTIN_PLATFORMS = exports.HealthChecker = exports.MetricsCollector = exports.PluginManager = exports.FastAuthManager = exports.WorkflowExecutor = exports.MediaScraper = void 0;
|
|
18
18
|
// Main SDK exports - backward compatibility maintained
|
|
19
19
|
var core_1 = require("./core");
|
|
20
20
|
Object.defineProperty(exports, "MediaScraper", { enumerable: true, get: function () { return core_1.MediaScraper; } });
|
|
@@ -43,6 +43,12 @@ var browser_pool_1 = require("./browser/browser-pool");
|
|
|
43
43
|
Object.defineProperty(exports, "BrowserPool", { enumerable: true, get: function () { return browser_pool_1.BrowserPool; } });
|
|
44
44
|
var logger_1 = require("./utils/logger");
|
|
45
45
|
Object.defineProperty(exports, "log", { enumerable: true, get: function () { return logger_1.log; } });
|
|
46
|
+
var download_1 = require("./download");
|
|
47
|
+
Object.defineProperty(exports, "DownloadManager", { enumerable: true, get: function () { return download_1.DownloadManager; } });
|
|
48
|
+
Object.defineProperty(exports, "downloadImages", { enumerable: true, get: function () { return download_1.downloadImages; } });
|
|
49
|
+
var download_2 = require("./download");
|
|
50
|
+
Object.defineProperty(exports, "downloadScrape", { enumerable: true, get: function () { return download_2.downloadScrape; } });
|
|
51
|
+
Object.defineProperty(exports, "DownloadScrapeEngine", { enumerable: true, get: function () { return download_2.DownloadScrapeEngine; } });
|
|
46
52
|
// Re-export all types for backward compatibility
|
|
47
53
|
__exportStar(require("./types"), exports);
|
|
48
54
|
// Re-export platforms
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uDAAuD;AACvD,+BAAwD;AAA/C,oGAAA,YAAY,OAAA;AAAE,wGAAA,gBAAgB,OAAA;AACvC,+BAAwE;AAA/D,uGAAA,eAAe,OAAA;AACxB,qCAAgH;AAAvG,wGAAA,aAAa,OAAA;AACtB,2CAAmD;AAA1C,2GAAA,gBAAgB,OAAA;AACzB,yCAA+C;AAAtC,uGAAA,aAAa,OAAA;AACtB,yCAAgD;AAAvC,8GAAA,iBAAiB,OAAA;AAC1B,6DAA4F;AAAnF,mHAAA,eAAe,OAAA;AACxB,qDAAmD;AAA1C,2GAAA,WAAW,OAAA;AACpB,yCAA+D;AAAtD,sGAAA,YAAY,OAAA;AACrB,yDAAuD;AAA9C,+GAAA,aAAa,OAAA;AACtB,6DAA2D;AAAlD,iHAAA,cAAc,OAAA;AACvB,uDAAqD;AAA5C,2GAAA,WAAW,OAAA;AACpB,yCAAkD;AAA5B,6FAAA,GAAG,OAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uDAAuD;AACvD,+BAAwD;AAA/C,oGAAA,YAAY,OAAA;AAAE,wGAAA,gBAAgB,OAAA;AACvC,+BAAwE;AAA/D,uGAAA,eAAe,OAAA;AACxB,qCAAgH;AAAvG,wGAAA,aAAa,OAAA;AACtB,2CAAmD;AAA1C,2GAAA,gBAAgB,OAAA;AACzB,yCAA+C;AAAtC,uGAAA,aAAa,OAAA;AACtB,yCAAgD;AAAvC,8GAAA,iBAAiB,OAAA;AAC1B,6DAA4F;AAAnF,mHAAA,eAAe,OAAA;AACxB,qDAAmD;AAA1C,2GAAA,WAAW,OAAA;AACpB,yCAA+D;AAAtD,sGAAA,YAAY,OAAA;AACrB,yDAAuD;AAA9C,+GAAA,aAAa,OAAA;AACtB,6DAA2D;AAAlD,iHAAA,cAAc,OAAA;AACvB,uDAAqD;AAA5C,2GAAA,WAAW,OAAA;AACpB,yCAAkD;AAA5B,6FAAA,GAAG,OAAA;AACzB,uCAA6D;AAApD,2GAAA,eAAe,OAAA;AAAE,0GAAA,cAAc,OAAA;AACxC,uCAA+G;AAAtG,0GAAA,cAAc,OAAA;AAAE,gHAAA,oBAAoB,OAAA;AAG7C,iDAAiD;AACjD,0CAAwB;AAExB,sBAAsB;AACtB,8CAA4B"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "instasave-sdk",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"description": "Instagram image scraper SDK with authentication support",
|
|
3
|
+
"version": "1.2.8",
|
|
4
|
+
"description": "Instagram image scraper SDK with authentication support and direct download functionality",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"repository": {
|
|
@@ -34,7 +34,10 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"crawlee": "^3.5.0",
|
|
36
36
|
"puppeteer": "^21.0.0",
|
|
37
|
-
"dotenv": "^16.0.0"
|
|
37
|
+
"dotenv": "^16.0.0",
|
|
38
|
+
"axios": "^1.6.0",
|
|
39
|
+
"sharp": "^0.33.0",
|
|
40
|
+
"file-type": "^18.0.0"
|
|
38
41
|
},
|
|
39
42
|
"devDependencies": {
|
|
40
43
|
"typescript": "^5.0.0",
|