@activepieces/piece-scrapegrapghai 0.0.1
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/README.md +33 -0
- package/package.json +36 -0
- package/src/index.d.ts +2 -0
- package/src/index.js +72 -0
- package/src/index.js.map +1 -0
- package/src/lib/actions/local-scraper.d.ts +5 -0
- package/src/lib/actions/local-scraper.js +49 -0
- package/src/lib/actions/local-scraper.js.map +1 -0
- package/src/lib/actions/markdownify.d.ts +3 -0
- package/src/lib/actions/markdownify.js +37 -0
- package/src/lib/actions/markdownify.js.map +1 -0
- package/src/lib/actions/smart-scraper.d.ts +5 -0
- package/src/lib/actions/smart-scraper.js +49 -0
- package/src/lib/actions/smart-scraper.js.map +1 -0
package/README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# ScrapeGraphAI
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
ScrapeGraphAI is a powerful web scraping and content extraction API. This piece enables integration with ScrapeGraphAI's API to perform smart scraping, local scraping, and markdown conversion.
|
|
5
|
+
|
|
6
|
+
## Actions
|
|
7
|
+
1. **Smart Scraper**: Advanced web scraping with AI-powered content extraction
|
|
8
|
+
- Automatic content detection
|
|
9
|
+
- Clean HTML output
|
|
10
|
+
- Support for dynamic websites
|
|
11
|
+
- Configurable options for content types
|
|
12
|
+
|
|
13
|
+
2. **Local Scraper**: Fast and lightweight web scraping
|
|
14
|
+
- Basic content extraction
|
|
15
|
+
- Static website support
|
|
16
|
+
- Configurable selectors
|
|
17
|
+
- Resource-efficient
|
|
18
|
+
|
|
19
|
+
3. **Markdownify**: Convert web content to clean Markdown
|
|
20
|
+
- Clean and formatted markdown output
|
|
21
|
+
- Preserves content structure
|
|
22
|
+
- Handles various content types
|
|
23
|
+
- Customizable output options
|
|
24
|
+
|
|
25
|
+
## Authentication
|
|
26
|
+
This piece requires an API key from ScrapeGraphAI. To obtain your API key:
|
|
27
|
+
1. Visit https://scrapegraphai.com
|
|
28
|
+
2. Sign up for an account
|
|
29
|
+
3. Navigate to your dashboard
|
|
30
|
+
4. Copy your API key
|
|
31
|
+
|
|
32
|
+
## Requirements
|
|
33
|
+
- ScrapeGraphAI API Key
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@activepieces/piece-scrapegrapghai",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"dependencies": {
|
|
5
|
+
"@anthropic-ai/sdk": "0.33.1",
|
|
6
|
+
"@sinclair/typebox": "0.34.11",
|
|
7
|
+
"axios": "1.7.8",
|
|
8
|
+
"axios-retry": "4.4.1",
|
|
9
|
+
"deepmerge-ts": "7.1.0",
|
|
10
|
+
"mime-types": "2.1.35",
|
|
11
|
+
"nanoid": "3.3.8",
|
|
12
|
+
"openai": "4.67.1",
|
|
13
|
+
"replicate": "0.34.1",
|
|
14
|
+
"semver": "7.6.0",
|
|
15
|
+
"zod": "3.23.8",
|
|
16
|
+
"@activepieces/pieces-common": "0.3.0",
|
|
17
|
+
"@activepieces/pieces-framework": "0.7.42",
|
|
18
|
+
"@activepieces/shared": "0.10.140",
|
|
19
|
+
"tslib": "1.14.1"
|
|
20
|
+
},
|
|
21
|
+
"overrides": {
|
|
22
|
+
"cross-spawn": "7.0.6",
|
|
23
|
+
"@tryfabric/martian": {
|
|
24
|
+
"@notionhq/client": "$@notionhq/client"
|
|
25
|
+
},
|
|
26
|
+
"vite": {
|
|
27
|
+
"rollup": "npm:@rollup/wasm-node"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"resolutions": {
|
|
31
|
+
"rollup": "npm:@rollup/wasm-node"
|
|
32
|
+
},
|
|
33
|
+
"main": "./src/index.js",
|
|
34
|
+
"type": "commonjs",
|
|
35
|
+
"types": "./src/index.d.ts"
|
|
36
|
+
}
|
package/src/index.d.ts
ADDED
package/src/index.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.scrapegraphai = exports.scrapegraphaiAuth = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
6
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
7
|
+
const shared_1 = require("@activepieces/shared");
|
|
8
|
+
const smart_scraper_1 = require("./lib/actions/smart-scraper");
|
|
9
|
+
const local_scraper_1 = require("./lib/actions/local-scraper");
|
|
10
|
+
const markdownify_1 = require("./lib/actions/markdownify");
|
|
11
|
+
const markdownDescription = `
|
|
12
|
+
Follow these steps to obtain your ScrapeGraphAI API Key:
|
|
13
|
+
|
|
14
|
+
1. Visit [ScrapeGraphAI](https://scrapegraphai.com) and create an account.
|
|
15
|
+
2. Log in and navigate to your dashboard.
|
|
16
|
+
3. Locate and copy your API key from the dashboard.
|
|
17
|
+
`;
|
|
18
|
+
exports.scrapegraphaiAuth = pieces_framework_1.PieceAuth.SecretText({
|
|
19
|
+
description: markdownDescription,
|
|
20
|
+
displayName: 'API Key',
|
|
21
|
+
required: true,
|
|
22
|
+
validate: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
23
|
+
try {
|
|
24
|
+
yield pieces_common_1.httpClient.sendRequest({
|
|
25
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
26
|
+
url: 'https://api.scrapegraphai.com/v1/smartscraper',
|
|
27
|
+
headers: {
|
|
28
|
+
'Content-Type': 'application/json',
|
|
29
|
+
'SGAI-APIKEY': auth,
|
|
30
|
+
},
|
|
31
|
+
body: {
|
|
32
|
+
user_prompt: 'test',
|
|
33
|
+
website_url: 'https://www.example.com',
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
return {
|
|
37
|
+
valid: true,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
catch (e) {
|
|
41
|
+
return {
|
|
42
|
+
valid: false,
|
|
43
|
+
error: 'Invalid API Key',
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
}),
|
|
47
|
+
});
|
|
48
|
+
exports.scrapegraphai = (0, pieces_framework_1.createPiece)({
|
|
49
|
+
displayName: 'ScrapeGraphAI',
|
|
50
|
+
description: 'AI-powered web scraping and content extraction.',
|
|
51
|
+
minimumSupportedRelease: '0.30.0',
|
|
52
|
+
logoUrl: 'https://cdn.activepieces.com/pieces/scrapegraphai.jpg',
|
|
53
|
+
categories: [shared_1.PieceCategory.ARTIFICIAL_INTELLIGENCE],
|
|
54
|
+
authors: ["OsamaHaikal"],
|
|
55
|
+
auth: exports.scrapegraphaiAuth,
|
|
56
|
+
actions: [
|
|
57
|
+
smart_scraper_1.smartScraper,
|
|
58
|
+
local_scraper_1.localScraper,
|
|
59
|
+
markdownify_1.markdownify,
|
|
60
|
+
(0, pieces_common_1.createCustomApiCallAction)({
|
|
61
|
+
baseUrl: () => 'https://api.scrapegraphai.com/v1',
|
|
62
|
+
auth: exports.scrapegraphaiAuth,
|
|
63
|
+
authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
64
|
+
return ({
|
|
65
|
+
'SGAI-APIKEY': `${auth}`,
|
|
66
|
+
});
|
|
67
|
+
}),
|
|
68
|
+
}),
|
|
69
|
+
],
|
|
70
|
+
triggers: [],
|
|
71
|
+
});
|
|
72
|
+
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/scrapegrapghai/src/index.ts"],"names":[],"mappings":";;;;AAAA,+DAAgG;AAChG,qEAAwE;AACxE,iDAAqD;AACrD,+DAA2D;AAC3D,+DAA2D;AAC3D,2DAAwD;AAExD,MAAM,mBAAmB,GAAG;;;;;;CAM3B,CAAC;AAEW,QAAA,iBAAiB,GAAG,4BAAS,CAAC,UAAU,CAAC;IACpD,WAAW,EAAE,mBAAmB;IAChC,WAAW,EAAE,SAAS;IACtB,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;QACvB,IAAI,CAAC;YACH,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC3B,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,+CAA+C;gBACpD,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;oBAClC,aAAa,EAAE,IAAI;iBACpB;gBACD,IAAI,EAAE;oBACJ,WAAW,EAAE,MAAM;oBACnB,WAAW,EAAE,yBAAyB;iBACvC;aACF,CAAC,CAAC;YACH,OAAO;gBACL,KAAK,EAAE,IAAI;aACZ,CAAC;QACJ,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO;gBACL,KAAK,EAAE,KAAK;gBACZ,KAAK,EAAE,iBAAiB;aACzB,CAAC;QACJ,CAAC;IACH,CAAC,CAAA;CACF,CAAC,CAAC;AAEU,QAAA,aAAa,GAAG,IAAA,8BAAW,EAAC;IACvC,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,iDAAiD;IAC9D,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,uDAAuD;IAChE,UAAU,EAAE,CAAC,sBAAa,CAAC,uBAAuB,CAAC;IACnD,OAAO,EAAE,CAAC,aAAa,CAAC;IACxB,IAAI,EAAE,yBAAiB;IACvB,OAAO,EAAE;QACP,4BAAY;QACZ,4BAAY;QACZ,yBAAW;QACX,IAAA,yCAAyB,EAAC;YACxB,OAAO,EAAE,GAAG,EAAE,CAAC,kCAAkC;YACjD,IAAI,EAAE,yBAAiB;YACvB,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAAC,OAAA,CAAC;oBAC5B,aAAa,EAAE,GAAG,IAAI,EAAE;iBACzB,CAAC,CAAA;cAAA;SACH,CAAC;KACH;IACD,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const localScraper: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
+
website_html: import("@activepieces/pieces-framework").LongTextProperty<true>;
|
|
3
|
+
user_prompt: import("@activepieces/pieces-framework").LongTextProperty<true>;
|
|
4
|
+
output_schema: import("@activepieces/pieces-framework").JsonProperty<false>;
|
|
5
|
+
}>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.localScraper = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
+
const index_1 = require("../../index");
|
|
8
|
+
exports.localScraper = (0, pieces_framework_1.createAction)({
|
|
9
|
+
name: 'local_scraper',
|
|
10
|
+
displayName: 'Local Scraper',
|
|
11
|
+
description: 'Extract content from HTML content using AI by providing a natural language prompt.',
|
|
12
|
+
auth: index_1.scrapegraphaiAuth,
|
|
13
|
+
props: {
|
|
14
|
+
website_html: pieces_framework_1.Property.LongText({
|
|
15
|
+
displayName: 'HTML Content',
|
|
16
|
+
description: 'The HTML content to process (max 2MB).',
|
|
17
|
+
required: true,
|
|
18
|
+
}),
|
|
19
|
+
user_prompt: pieces_framework_1.Property.LongText({
|
|
20
|
+
displayName: 'Extraction Prompt',
|
|
21
|
+
description: 'Describe what information you want to extract in natural language.',
|
|
22
|
+
required: true,
|
|
23
|
+
}),
|
|
24
|
+
output_schema: pieces_framework_1.Property.Json({
|
|
25
|
+
displayName: 'Output Schema',
|
|
26
|
+
description: 'Optional schema to structure the output data.',
|
|
27
|
+
required: false,
|
|
28
|
+
}),
|
|
29
|
+
},
|
|
30
|
+
run(_a) {
|
|
31
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
32
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
33
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
34
|
+
url: 'https://api.scrapegraphai.com/v1/localscraper',
|
|
35
|
+
headers: {
|
|
36
|
+
'Content-Type': 'application/json',
|
|
37
|
+
'SGAI-APIKEY': auth,
|
|
38
|
+
},
|
|
39
|
+
body: {
|
|
40
|
+
website_html: propsValue.website_html,
|
|
41
|
+
user_prompt: propsValue.user_prompt,
|
|
42
|
+
output_schema: propsValue.output_schema,
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
return response.body;
|
|
46
|
+
});
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
//# sourceMappingURL=local-scraper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-scraper.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/scrapegrapghai/src/lib/actions/local-scraper.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAqE;AACrE,uCAAgD;AAEnC,QAAA,YAAY,GAAG,IAAA,+BAAY,EAAC;IACvC,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,oFAAoF;IACjG,IAAI,EAAE,yBAAiB;IACvB,KAAK,EAAE;QACL,YAAY,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC9B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,wCAAwC;YACrD,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,WAAW,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC7B,WAAW,EAAE,mBAAmB;YAChC,WAAW,EAAE,oEAAoE;YACjF,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,aAAa,EAAE,2BAAQ,CAAC,IAAI,CAAC;YAC3B,WAAW,EAAE,eAAe;YAC5B,WAAW,EAAE,+CAA+C;YAC5D,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,+CAA+C;gBACpD,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;oBAClC,aAAa,EAAE,IAAI;iBACpB;gBACD,IAAI,EAAE;oBACJ,YAAY,EAAE,UAAU,CAAC,YAAY;oBACrC,WAAW,EAAE,UAAU,CAAC,WAAW;oBACnC,aAAa,EAAE,UAAU,CAAC,aAAa;iBACxC;aACF,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.markdownify = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
+
const index_1 = require("../../index");
|
|
8
|
+
exports.markdownify = (0, pieces_framework_1.createAction)({
|
|
9
|
+
name: 'markdownify',
|
|
10
|
+
displayName: 'Convert to Markdown',
|
|
11
|
+
description: 'Convert any webpage into clean, readable Markdown format.',
|
|
12
|
+
auth: index_1.scrapegraphaiAuth,
|
|
13
|
+
props: {
|
|
14
|
+
website_url: pieces_framework_1.Property.ShortText({
|
|
15
|
+
displayName: 'Website URL',
|
|
16
|
+
description: 'The webpage URL to convert to Markdown',
|
|
17
|
+
required: true,
|
|
18
|
+
}),
|
|
19
|
+
},
|
|
20
|
+
run(_a) {
|
|
21
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
22
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
23
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
24
|
+
url: 'https://api.scrapegraphai.com/v1/markdownify',
|
|
25
|
+
headers: {
|
|
26
|
+
'Content-Type': 'application/json',
|
|
27
|
+
'SGAI-APIKEY': auth,
|
|
28
|
+
},
|
|
29
|
+
body: {
|
|
30
|
+
website_url: propsValue.website_url,
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
return response.body;
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
//# sourceMappingURL=markdownify.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdownify.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/scrapegrapghai/src/lib/actions/markdownify.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAqE;AACrE,uCAAgD;AAEnC,QAAA,WAAW,GAAG,IAAA,+BAAY,EAAC;IACtC,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,qBAAqB;IAClC,WAAW,EAAE,2DAA2D;IACxE,IAAI,EAAE,yBAAiB;IACvB,KAAK,EAAE;QACL,WAAW,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC9B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,wCAAwC;YACrD,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,8CAA8C;gBACnD,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;oBAClC,aAAa,EAAE,IAAI;iBACpB;gBACD,IAAI,EAAE;oBACJ,WAAW,EAAE,UAAU,CAAC,WAAW;iBACpC;aACF,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const smartScraper: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
+
website_url: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
user_prompt: import("@activepieces/pieces-framework").LongTextProperty<true>;
|
|
4
|
+
output_schema: import("@activepieces/pieces-framework").JsonProperty<false>;
|
|
5
|
+
}>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.smartScraper = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
+
const index_1 = require("../../index");
|
|
8
|
+
exports.smartScraper = (0, pieces_framework_1.createAction)({
|
|
9
|
+
name: 'smart_scraper',
|
|
10
|
+
displayName: 'Smart Scraper',
|
|
11
|
+
description: 'Extract content from a webpage using AI by providing a natural language prompt.',
|
|
12
|
+
auth: index_1.scrapegraphaiAuth,
|
|
13
|
+
props: {
|
|
14
|
+
website_url: pieces_framework_1.Property.ShortText({
|
|
15
|
+
displayName: 'Website URL',
|
|
16
|
+
description: 'The webpage URL to scrape.',
|
|
17
|
+
required: true,
|
|
18
|
+
}),
|
|
19
|
+
user_prompt: pieces_framework_1.Property.LongText({
|
|
20
|
+
displayName: 'Extraction Prompt',
|
|
21
|
+
description: 'Describe what information you want to extract in natural language.',
|
|
22
|
+
required: true,
|
|
23
|
+
}),
|
|
24
|
+
output_schema: pieces_framework_1.Property.Json({
|
|
25
|
+
displayName: 'Output Schema',
|
|
26
|
+
description: 'Optional schema to structure the output data.',
|
|
27
|
+
required: false,
|
|
28
|
+
}),
|
|
29
|
+
},
|
|
30
|
+
run(_a) {
|
|
31
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
32
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
33
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
34
|
+
url: 'https://api.scrapegraphai.com/v1/smartscraper',
|
|
35
|
+
headers: {
|
|
36
|
+
'Content-Type': 'application/json',
|
|
37
|
+
'SGAI-APIKEY': auth,
|
|
38
|
+
},
|
|
39
|
+
body: {
|
|
40
|
+
website_url: propsValue.website_url,
|
|
41
|
+
user_prompt: propsValue.user_prompt,
|
|
42
|
+
output_schema: propsValue.output_schema,
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
return response.body;
|
|
46
|
+
});
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
//# sourceMappingURL=smart-scraper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smart-scraper.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/scrapegrapghai/src/lib/actions/smart-scraper.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAqE;AACrE,uCAAgD;AAEnC,QAAA,YAAY,GAAG,IAAA,+BAAY,EAAC;IACvC,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,iFAAiF;IAC9F,IAAI,EAAE,yBAAiB;IACvB,KAAK,EAAE;QACL,WAAW,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC9B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,4BAA4B;YACzC,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,WAAW,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC7B,WAAW,EAAE,mBAAmB;YAChC,WAAW,EAAE,oEAAoE;YACjF,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,aAAa,EAAE,2BAAQ,CAAC,IAAI,CAAC;YAC3B,WAAW,EAAE,eAAe;YAC5B,WAAW,EAAE,+CAA+C;YAC5D,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,+CAA+C;gBACpD,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;oBAClC,aAAa,EAAE,IAAI;iBACpB;gBACD,IAAI,EAAE;oBACJ,WAAW,EAAE,UAAU,CAAC,WAAW;oBACnC,WAAW,EAAE,UAAU,CAAC,WAAW;oBACnC,aAAa,EAAE,UAAU,CAAC,aAAa;iBACxC;aACF,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|