scrapebadger 0.40.0 → 0.41.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/index.d.cts +49 -7
- package/dist/index.d.ts +49 -7
- package/dist/index.js +29 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +29 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -99,6 +99,27 @@ interface ScrapeResult {
|
|
|
99
99
|
ai_extraction: Record<string, unknown> | string | unknown[] | null;
|
|
100
100
|
ai_model: string | null;
|
|
101
101
|
ai_error: string | null;
|
|
102
|
+
/**
|
|
103
|
+
* Whether the `wait_for` selector appeared within `wait_timeout`. Null when
|
|
104
|
+
* no `wait_for` was requested. A miss never arrives as a success — the API
|
|
105
|
+
* answers `422 wait_for_timeout` and nothing is charged.
|
|
106
|
+
*/
|
|
107
|
+
wait_for_found?: boolean | null;
|
|
108
|
+
/**
|
|
109
|
+
* One entry per executed `js_scenario` step, in order: `step`, `action`,
|
|
110
|
+
* `selector`, `ok`, `error`, `url` (the page URL right after the step).
|
|
111
|
+
* Execution stops at the first failed step; a failed step is a free
|
|
112
|
+
* `422 js_scenario_failed`. Null when no scenario ran.
|
|
113
|
+
*/
|
|
114
|
+
js_scenario_report?: JsScenarioStepReport[] | null;
|
|
115
|
+
}
|
|
116
|
+
interface JsScenarioStepReport {
|
|
117
|
+
step: number;
|
|
118
|
+
action: string;
|
|
119
|
+
selector: string | null;
|
|
120
|
+
ok: boolean;
|
|
121
|
+
error: string | null;
|
|
122
|
+
url: string | null;
|
|
102
123
|
}
|
|
103
124
|
interface DetectOptions {
|
|
104
125
|
/** Request timeout in ms (1000-60000) */
|
|
@@ -4143,7 +4164,10 @@ declare class UsersClient$1 {
|
|
|
4143
4164
|
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4144
4165
|
*/
|
|
4145
4166
|
about(username: string): Promise<UserAbout>;
|
|
4146
|
-
/**
|
|
4167
|
+
/**
|
|
4168
|
+
* Get accounts related/suggested for a user.
|
|
4169
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4170
|
+
*/
|
|
4147
4171
|
related(username: string): Promise<Paginated<UserShort>>;
|
|
4148
4172
|
/** Get a user's timeline posts. */
|
|
4149
4173
|
posts(username: string, options?: {
|
|
@@ -4255,7 +4279,10 @@ declare class MediaClient$3 {
|
|
|
4255
4279
|
* @param code - The media shortcode (from the `/p/<code>/` URL).
|
|
4256
4280
|
*/
|
|
4257
4281
|
get(code: string): Promise<Media>;
|
|
4258
|
-
/**
|
|
4282
|
+
/**
|
|
4283
|
+
* Get oEmbed metadata for a media permalink.
|
|
4284
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4285
|
+
*/
|
|
4259
4286
|
oembed(code: string): Promise<Oembed>;
|
|
4260
4287
|
/** Get top-level comments on a media. */
|
|
4261
4288
|
comments(code: string, options?: {
|
|
@@ -4275,7 +4302,10 @@ declare class MediaClient$3 {
|
|
|
4275
4302
|
amount?: number;
|
|
4276
4303
|
cursor?: string;
|
|
4277
4304
|
}): Promise<Paginated<Comment$1>>;
|
|
4278
|
-
/**
|
|
4305
|
+
/**
|
|
4306
|
+
* Get the users who liked a comment.
|
|
4307
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4308
|
+
*/
|
|
4279
4309
|
commentLikers(code: string, commentId: string): Promise<Paginated<UserShort>>;
|
|
4280
4310
|
}
|
|
4281
4311
|
|
|
@@ -4309,7 +4339,10 @@ declare class SearchClient$e {
|
|
|
4309
4339
|
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4310
4340
|
*/
|
|
4311
4341
|
users(query: string): Promise<Paginated<UserShort>>;
|
|
4312
|
-
/**
|
|
4342
|
+
/**
|
|
4343
|
+
* Search hashtags.
|
|
4344
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4345
|
+
*/
|
|
4313
4346
|
hashtags(query: string): Promise<Paginated<Hashtag>>;
|
|
4314
4347
|
/**
|
|
4315
4348
|
* Search places/locations.
|
|
@@ -4326,7 +4359,10 @@ declare class SearchClient$e {
|
|
|
4326
4359
|
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4327
4360
|
*/
|
|
4328
4361
|
music(query: string): Promise<Paginated<Audio>>;
|
|
4329
|
-
/**
|
|
4362
|
+
/**
|
|
4363
|
+
* Get blended "top" results (users, hashtags, and places).
|
|
4364
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4365
|
+
*/
|
|
4330
4366
|
top(query: string): Promise<SearchTopResponse>;
|
|
4331
4367
|
/**
|
|
4332
4368
|
* Get typeahead/autocomplete suggestions (mixed entity types).
|
|
@@ -4346,7 +4382,10 @@ declare class SearchClient$e {
|
|
|
4346
4382
|
declare class HashtagsClient$1 {
|
|
4347
4383
|
private readonly client;
|
|
4348
4384
|
constructor(client: BaseClient);
|
|
4349
|
-
/**
|
|
4385
|
+
/**
|
|
4386
|
+
* Get a hashtag's info (media count, cover).
|
|
4387
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4388
|
+
*/
|
|
4350
4389
|
get(tag: string): Promise<Hashtag>;
|
|
4351
4390
|
/**
|
|
4352
4391
|
* Get the top/popular media for a hashtag.
|
|
@@ -4356,7 +4395,10 @@ declare class HashtagsClient$1 {
|
|
|
4356
4395
|
amount?: number;
|
|
4357
4396
|
cursor?: string;
|
|
4358
4397
|
}): Promise<Paginated<Media>>;
|
|
4359
|
-
/**
|
|
4398
|
+
/**
|
|
4399
|
+
* Get the most recent media for a hashtag.
|
|
4400
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4401
|
+
*/
|
|
4360
4402
|
recent(tag: string, options?: {
|
|
4361
4403
|
amount?: number;
|
|
4362
4404
|
cursor?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -99,6 +99,27 @@ interface ScrapeResult {
|
|
|
99
99
|
ai_extraction: Record<string, unknown> | string | unknown[] | null;
|
|
100
100
|
ai_model: string | null;
|
|
101
101
|
ai_error: string | null;
|
|
102
|
+
/**
|
|
103
|
+
* Whether the `wait_for` selector appeared within `wait_timeout`. Null when
|
|
104
|
+
* no `wait_for` was requested. A miss never arrives as a success — the API
|
|
105
|
+
* answers `422 wait_for_timeout` and nothing is charged.
|
|
106
|
+
*/
|
|
107
|
+
wait_for_found?: boolean | null;
|
|
108
|
+
/**
|
|
109
|
+
* One entry per executed `js_scenario` step, in order: `step`, `action`,
|
|
110
|
+
* `selector`, `ok`, `error`, `url` (the page URL right after the step).
|
|
111
|
+
* Execution stops at the first failed step; a failed step is a free
|
|
112
|
+
* `422 js_scenario_failed`. Null when no scenario ran.
|
|
113
|
+
*/
|
|
114
|
+
js_scenario_report?: JsScenarioStepReport[] | null;
|
|
115
|
+
}
|
|
116
|
+
interface JsScenarioStepReport {
|
|
117
|
+
step: number;
|
|
118
|
+
action: string;
|
|
119
|
+
selector: string | null;
|
|
120
|
+
ok: boolean;
|
|
121
|
+
error: string | null;
|
|
122
|
+
url: string | null;
|
|
102
123
|
}
|
|
103
124
|
interface DetectOptions {
|
|
104
125
|
/** Request timeout in ms (1000-60000) */
|
|
@@ -4143,7 +4164,10 @@ declare class UsersClient$1 {
|
|
|
4143
4164
|
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4144
4165
|
*/
|
|
4145
4166
|
about(username: string): Promise<UserAbout>;
|
|
4146
|
-
/**
|
|
4167
|
+
/**
|
|
4168
|
+
* Get accounts related/suggested for a user.
|
|
4169
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4170
|
+
*/
|
|
4147
4171
|
related(username: string): Promise<Paginated<UserShort>>;
|
|
4148
4172
|
/** Get a user's timeline posts. */
|
|
4149
4173
|
posts(username: string, options?: {
|
|
@@ -4255,7 +4279,10 @@ declare class MediaClient$3 {
|
|
|
4255
4279
|
* @param code - The media shortcode (from the `/p/<code>/` URL).
|
|
4256
4280
|
*/
|
|
4257
4281
|
get(code: string): Promise<Media>;
|
|
4258
|
-
/**
|
|
4282
|
+
/**
|
|
4283
|
+
* Get oEmbed metadata for a media permalink.
|
|
4284
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4285
|
+
*/
|
|
4259
4286
|
oembed(code: string): Promise<Oembed>;
|
|
4260
4287
|
/** Get top-level comments on a media. */
|
|
4261
4288
|
comments(code: string, options?: {
|
|
@@ -4275,7 +4302,10 @@ declare class MediaClient$3 {
|
|
|
4275
4302
|
amount?: number;
|
|
4276
4303
|
cursor?: string;
|
|
4277
4304
|
}): Promise<Paginated<Comment$1>>;
|
|
4278
|
-
/**
|
|
4305
|
+
/**
|
|
4306
|
+
* Get the users who liked a comment.
|
|
4307
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4308
|
+
*/
|
|
4279
4309
|
commentLikers(code: string, commentId: string): Promise<Paginated<UserShort>>;
|
|
4280
4310
|
}
|
|
4281
4311
|
|
|
@@ -4309,7 +4339,10 @@ declare class SearchClient$e {
|
|
|
4309
4339
|
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4310
4340
|
*/
|
|
4311
4341
|
users(query: string): Promise<Paginated<UserShort>>;
|
|
4312
|
-
/**
|
|
4342
|
+
/**
|
|
4343
|
+
* Search hashtags.
|
|
4344
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4345
|
+
*/
|
|
4313
4346
|
hashtags(query: string): Promise<Paginated<Hashtag>>;
|
|
4314
4347
|
/**
|
|
4315
4348
|
* Search places/locations.
|
|
@@ -4326,7 +4359,10 @@ declare class SearchClient$e {
|
|
|
4326
4359
|
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4327
4360
|
*/
|
|
4328
4361
|
music(query: string): Promise<Paginated<Audio>>;
|
|
4329
|
-
/**
|
|
4362
|
+
/**
|
|
4363
|
+
* Get blended "top" results (users, hashtags, and places).
|
|
4364
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4365
|
+
*/
|
|
4330
4366
|
top(query: string): Promise<SearchTopResponse>;
|
|
4331
4367
|
/**
|
|
4332
4368
|
* Get typeahead/autocomplete suggestions (mixed entity types).
|
|
@@ -4346,7 +4382,10 @@ declare class SearchClient$e {
|
|
|
4346
4382
|
declare class HashtagsClient$1 {
|
|
4347
4383
|
private readonly client;
|
|
4348
4384
|
constructor(client: BaseClient);
|
|
4349
|
-
/**
|
|
4385
|
+
/**
|
|
4386
|
+
* Get a hashtag's info (media count, cover).
|
|
4387
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4388
|
+
*/
|
|
4350
4389
|
get(tag: string): Promise<Hashtag>;
|
|
4351
4390
|
/**
|
|
4352
4391
|
* Get the top/popular media for a hashtag.
|
|
@@ -4356,7 +4395,10 @@ declare class HashtagsClient$1 {
|
|
|
4356
4395
|
amount?: number;
|
|
4357
4396
|
cursor?: string;
|
|
4358
4397
|
}): Promise<Paginated<Media>>;
|
|
4359
|
-
/**
|
|
4398
|
+
/**
|
|
4399
|
+
* Get the most recent media for a hashtag.
|
|
4400
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4401
|
+
*/
|
|
4360
4402
|
recent(tag: string, options?: {
|
|
4361
4403
|
amount?: number;
|
|
4362
4404
|
cursor?: string;
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
9
9
|
var WebSocket__default = /*#__PURE__*/_interopDefault(WebSocket);
|
|
10
10
|
|
|
11
11
|
// src/internal/version.ts
|
|
12
|
-
var SDK_VERSION = "0.
|
|
12
|
+
var SDK_VERSION = "0.41.0";
|
|
13
13
|
|
|
14
14
|
// src/internal/exceptions.ts
|
|
15
15
|
var ScrapeBadgerError = class _ScrapeBadgerError extends Error {
|
|
@@ -4302,7 +4302,10 @@ var UsersClient4 = class {
|
|
|
4302
4302
|
async about(username) {
|
|
4303
4303
|
return this.client.request(`/v1/instagram/users/${username}/about`);
|
|
4304
4304
|
}
|
|
4305
|
-
/**
|
|
4305
|
+
/**
|
|
4306
|
+
* Get accounts related/suggested for a user.
|
|
4307
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4308
|
+
*/
|
|
4306
4309
|
async related(username) {
|
|
4307
4310
|
return this.client.request(`/v1/instagram/users/${username}/related`);
|
|
4308
4311
|
}
|
|
@@ -4413,7 +4416,10 @@ var MediaClient = class {
|
|
|
4413
4416
|
async get(code) {
|
|
4414
4417
|
return this.client.request(`/v1/instagram/media/${code}`);
|
|
4415
4418
|
}
|
|
4416
|
-
/**
|
|
4419
|
+
/**
|
|
4420
|
+
* Get oEmbed metadata for a media permalink.
|
|
4421
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4422
|
+
*/
|
|
4417
4423
|
async oembed(code) {
|
|
4418
4424
|
return this.client.request(`/v1/instagram/media/${code}/oembed`);
|
|
4419
4425
|
}
|
|
@@ -4440,7 +4446,10 @@ var MediaClient = class {
|
|
|
4440
4446
|
{ params: { amount: options.amount, cursor: options.cursor } }
|
|
4441
4447
|
);
|
|
4442
4448
|
}
|
|
4443
|
-
/**
|
|
4449
|
+
/**
|
|
4450
|
+
* Get the users who liked a comment.
|
|
4451
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4452
|
+
*/
|
|
4444
4453
|
async commentLikers(code, commentId) {
|
|
4445
4454
|
return this.client.request(
|
|
4446
4455
|
`/v1/instagram/media/${code}/comments/${commentId}/likers`
|
|
@@ -4463,7 +4472,10 @@ var SearchClient4 = class {
|
|
|
4463
4472
|
params: { query }
|
|
4464
4473
|
});
|
|
4465
4474
|
}
|
|
4466
|
-
/**
|
|
4475
|
+
/**
|
|
4476
|
+
* Search hashtags.
|
|
4477
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4478
|
+
*/
|
|
4467
4479
|
async hashtags(query) {
|
|
4468
4480
|
return this.client.request("/v1/instagram/search/hashtags", {
|
|
4469
4481
|
params: { query }
|
|
@@ -4496,7 +4508,10 @@ var SearchClient4 = class {
|
|
|
4496
4508
|
params: { query }
|
|
4497
4509
|
});
|
|
4498
4510
|
}
|
|
4499
|
-
/**
|
|
4511
|
+
/**
|
|
4512
|
+
* Get blended "top" results (users, hashtags, and places).
|
|
4513
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4514
|
+
*/
|
|
4500
4515
|
async top(query) {
|
|
4501
4516
|
return this.client.request("/v1/instagram/search/top", {
|
|
4502
4517
|
params: { query }
|
|
@@ -4524,7 +4539,10 @@ var HashtagsClient = class {
|
|
|
4524
4539
|
constructor(client) {
|
|
4525
4540
|
this.client = client;
|
|
4526
4541
|
}
|
|
4527
|
-
/**
|
|
4542
|
+
/**
|
|
4543
|
+
* Get a hashtag's info (media count, cover).
|
|
4544
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4545
|
+
*/
|
|
4528
4546
|
async get(tag) {
|
|
4529
4547
|
return this.client.request(`/v1/instagram/hashtags/${tag}`);
|
|
4530
4548
|
}
|
|
@@ -4535,7 +4553,10 @@ var HashtagsClient = class {
|
|
|
4535
4553
|
async top(tag, options = {}) {
|
|
4536
4554
|
return mediaFeed(this.client, `/v1/instagram/hashtags/${tag}/top`, options);
|
|
4537
4555
|
}
|
|
4538
|
-
/**
|
|
4556
|
+
/**
|
|
4557
|
+
* Get the most recent media for a hashtag.
|
|
4558
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4559
|
+
*/
|
|
4539
4560
|
async recent(tag, options = {}) {
|
|
4540
4561
|
return mediaFeed(this.client, `/v1/instagram/hashtags/${tag}/recent`, options);
|
|
4541
4562
|
}
|