mcp-scraper 0.33.7 → 0.34.0
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/bin/api-server.cjs +10063 -10012
- package/dist/bin/api-server.cjs.map +1 -1
- package/dist/bin/api-server.js +2 -2
- package/dist/bin/mcp-scraper-cli.cjs +2 -1
- package/dist/bin/mcp-scraper-cli.cjs.map +1 -1
- package/dist/bin/mcp-scraper-cli.js +3 -3
- package/dist/bin/mcp-scraper-install.cjs +1 -1
- package/dist/bin/mcp-scraper-install.cjs.map +1 -1
- package/dist/bin/mcp-scraper-install.js +1 -1
- package/dist/bin/mcp-stdio-server.cjs +15 -8
- package/dist/bin/mcp-stdio-server.cjs.map +1 -1
- package/dist/bin/mcp-stdio-server.js +3 -3
- package/dist/bin/paa-harvest.cjs +22 -0
- package/dist/bin/paa-harvest.cjs.map +1 -1
- package/dist/bin/paa-harvest.js +2 -2
- package/dist/{chunk-XVCETVYY.js → chunk-4KQVIYIH.js} +11 -3
- package/dist/chunk-4KQVIYIH.js.map +1 -0
- package/dist/{chunk-V73MPRU6.js → chunk-CB5C3BPB.js} +17 -1
- package/dist/chunk-CB5C3BPB.js.map +1 -0
- package/dist/{chunk-H6QECE2U.js → chunk-J32XSMJI.js} +16 -10
- package/dist/chunk-J32XSMJI.js.map +1 -0
- package/dist/chunk-NFMIHEYE.js +7 -0
- package/dist/chunk-NFMIHEYE.js.map +1 -0
- package/dist/{chunk-AT2PFWHW.js → chunk-ZID3WQID.js} +2 -2
- package/dist/index.cjs +22 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2 -2
- package/dist/{server-B35CQJB3.js → server-LKVPEQFE.js} +130 -108
- package/dist/server-LKVPEQFE.js.map +1 -0
- package/dist/{worker-3LYNVGLF.js → worker-ZZHSYI3Y.js} +3 -3
- package/docs/mcp-tool-manifest.generated.json +36 -8
- package/package.json +1 -1
- package/dist/chunk-H6QECE2U.js.map +0 -1
- package/dist/chunk-HAMN42SP.js +0 -7
- package/dist/chunk-HAMN42SP.js.map +0 -1
- package/dist/chunk-V73MPRU6.js.map +0 -1
- package/dist/chunk-XVCETVYY.js.map +0 -1
- package/dist/server-B35CQJB3.js.map +0 -1
- /package/dist/{chunk-AT2PFWHW.js.map → chunk-ZID3WQID.js.map} +0 -0
- /package/dist/{worker-3LYNVGLF.js.map → worker-ZZHSYI3Y.js.map} +0 -0
package/dist/bin/paa-harvest.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
harvest
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-4KQVIYIH.js";
|
|
5
5
|
import {
|
|
6
6
|
browserServiceApiKey
|
|
7
7
|
} from "../chunk-V36LS5YV.js";
|
|
8
8
|
import "../chunk-K443GQY5.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-CB5C3BPB.js";
|
|
10
10
|
import "../chunk-M2S27J6Z.js";
|
|
11
11
|
import "../chunk-62DQAWPF.js";
|
|
12
12
|
|
|
@@ -12,8 +12,9 @@ import {
|
|
|
12
12
|
import {
|
|
13
13
|
DEFAULT_PROXY_MODE,
|
|
14
14
|
HarvestOptionsSchema,
|
|
15
|
-
RawPAAItemSchema
|
|
16
|
-
|
|
15
|
+
RawPAAItemSchema,
|
|
16
|
+
recencyToTbs
|
|
17
|
+
} from "./chunk-CB5C3BPB.js";
|
|
17
18
|
import {
|
|
18
19
|
CaptchaError,
|
|
19
20
|
ExtractionError,
|
|
@@ -484,6 +485,7 @@ var BrowserDriver = class {
|
|
|
484
485
|
async navigateToSERP(query, uule, gl, hl, options) {
|
|
485
486
|
const params = new URLSearchParams({ q: query, gl, hl, pws: "0" });
|
|
486
487
|
if (options?.num) params.set("num", String(options.num));
|
|
488
|
+
if (options?.tbs) params.set("tbs", options.tbs);
|
|
487
489
|
if (uule) params.set("uule", uule);
|
|
488
490
|
const url = "https://www.google.com/search?" + params.toString();
|
|
489
491
|
const navUrl = serpArrivalUrl(url);
|
|
@@ -2050,6 +2052,7 @@ var PAAExtractor = class {
|
|
|
2050
2052
|
options.hl,
|
|
2051
2053
|
{
|
|
2052
2054
|
...options.serpOnly ? { num: 100 } : {},
|
|
2055
|
+
...recencyToTbs(options.recency) ? { tbs: recencyToTbs(options.recency) } : {},
|
|
2053
2056
|
debug: options.debug
|
|
2054
2057
|
}
|
|
2055
2058
|
);
|
|
@@ -2069,6 +2072,8 @@ var PAAExtractor = class {
|
|
|
2069
2072
|
let allOrganic2 = organicResults2;
|
|
2070
2073
|
if ((options.pages ?? 1) >= 2) {
|
|
2071
2074
|
const p2params = new URLSearchParams({ q: options.query, gl: options.gl, hl: options.hl, pws: "0", start: "10" });
|
|
2075
|
+
if (recencyToTbs(options.recency)) p2params.set("tbs", recencyToTbs(options.recency));
|
|
2076
|
+
if (recencyToTbs(options.recency)) p2params.set("tbs", recencyToTbs(options.recency));
|
|
2072
2077
|
if (uule) p2params.set("uule", uule);
|
|
2073
2078
|
await this.driver.navigateTo("https://www.google.com/search?" + p2params.toString());
|
|
2074
2079
|
await this.throwIfCaptcha(page, "Google SERP page 2");
|
|
@@ -2128,6 +2133,8 @@ var PAAExtractor = class {
|
|
|
2128
2133
|
let locationEvidence2 = initialLocationEvidence;
|
|
2129
2134
|
if ((options.pages ?? 1) >= 2) {
|
|
2130
2135
|
const p2params = new URLSearchParams({ q: options.query, gl: options.gl, hl: options.hl, pws: "0", start: "10" });
|
|
2136
|
+
if (recencyToTbs(options.recency)) p2params.set("tbs", recencyToTbs(options.recency));
|
|
2137
|
+
if (recencyToTbs(options.recency)) p2params.set("tbs", recencyToTbs(options.recency));
|
|
2131
2138
|
if (uule) p2params.set("uule", uule);
|
|
2132
2139
|
await this.driver.navigateTo("https://www.google.com/search?" + p2params.toString());
|
|
2133
2140
|
await this.throwIfCaptcha(page, "Google SERP page 2");
|
|
@@ -2194,6 +2201,7 @@ var PAAExtractor = class {
|
|
|
2194
2201
|
let locationEvidence = initialLocationEvidence;
|
|
2195
2202
|
if ((options.pages ?? 1) >= 2) {
|
|
2196
2203
|
const p2params = new URLSearchParams({ q: options.query, gl: options.gl, hl: options.hl, pws: "0", start: "10" });
|
|
2204
|
+
if (recencyToTbs(options.recency)) p2params.set("tbs", recencyToTbs(options.recency));
|
|
2197
2205
|
if (uule) p2params.set("uule", uule);
|
|
2198
2206
|
await this.driver.navigateTo("https://www.google.com/search?" + p2params.toString());
|
|
2199
2207
|
await this.throwIfCaptcha(page, "Google SERP page 2");
|
|
@@ -3293,4 +3301,4 @@ export {
|
|
|
3293
3301
|
resolveKernelProxyId,
|
|
3294
3302
|
harvest
|
|
3295
3303
|
};
|
|
3296
|
-
//# sourceMappingURL=chunk-
|
|
3304
|
+
//# sourceMappingURL=chunk-4KQVIYIH.js.map
|