open-nami 1.2.2 → 1.2.3

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.
Files changed (2) hide show
  1. package/dist/cli.js +32 -27
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -9,7 +9,7 @@ var require_package = __commonJS({
9
9
  "package.json"(exports, module) {
10
10
  module.exports = {
11
11
  name: "open-nami",
12
- version: "1.2.2",
12
+ version: "1.2.3",
13
13
  description: "Open Nami: terminal-first bulk social media profile downloader for Instagram, TikTok, Facebook & X.",
14
14
  type: "module",
15
15
  bin: {
@@ -1205,7 +1205,8 @@ var IG_QUERIES = {
1205
1205
  PolarisProfilePostsTabContentQuery_connection: "39229011733413759",
1206
1206
  PolarisProfileReelsTabContentQuery_connection: "28989741540630190",
1207
1207
  PolarisProfileTaggedTabContentQuery_connection: "28794602806842110",
1208
- PolarisProfileStoryHighlightsTrayContentQuery: "26970053832668570",
1208
+ ProfileStoryHighlightsTrayContentQuery_connection: "38168009559465141",
1209
+ PolarisProfileStoryHighlightsTrayContentQuery: "38168009559465141",
1209
1210
  PolarisStoriesV3ReelPageGalleryQuery: "28262315486766731",
1210
1211
  PolarisStoriesV3TrayContainerQuery: "27703822975903310",
1211
1212
  PolarisProfilePageContentQuery: "28649589871350527"
@@ -1392,12 +1393,18 @@ var InstagramExtractor = class {
1392
1393
  __user: "0",
1393
1394
  __a: "1",
1394
1395
  __req: "0",
1396
+ __hs: "20731.HYP:instagram_web_pkg.2.1...0",
1395
1397
  dpr: "1",
1398
+ __ccg: "EXCELLENT",
1399
+ __rev: "1049285836",
1400
+ __hsi: "7693193318680449885",
1401
+ __comet_req: "7",
1402
+ jazoest: "26461",
1396
1403
  fb_api_caller_class: "RelayModern",
1397
- fb_api_req_friendly_name: "PolarisProfileStoryHighlightsTrayContentQuery",
1404
+ fb_api_req_friendly_name: "ProfileStoryHighlightsTrayContentQuery_connection",
1398
1405
  server_timestamps: "true",
1399
1406
  variables,
1400
- doc_id: IG_QUERIES.PolarisProfileStoryHighlightsTrayContentQuery
1407
+ doc_id: IG_QUERIES.ProfileStoryHighlightsTrayContentQuery_connection
1401
1408
  });
1402
1409
  if (tokens?.fbDtsg) bodyParams.set("fb_dtsg", tokens.fbDtsg);
1403
1410
  if (tokens?.lsd) bodyParams.set("lsd", tokens.lsd);
@@ -1405,14 +1412,18 @@ var InstagramExtractor = class {
1405
1412
  "Accept": "*/*",
1406
1413
  "Content-Type": "application/x-www-form-urlencoded",
1407
1414
  "X-IG-App-ID": IG_APP_ID,
1408
- "X-FB-Friendly-Name": "PolarisProfileStoryHighlightsTrayContentQuery",
1415
+ "X-IG-Max-Touch-Points": "0",
1416
+ "X-FB-Friendly-Name": "ProfileStoryHighlightsTrayContentQuery_connection",
1409
1417
  "Referer": "https://www.instagram.com/",
1410
1418
  "Origin": "https://www.instagram.com",
1411
- "X-ASBD-ID": "359341"
1419
+ "X-ASBD-ID": "359341",
1420
+ "Sec-Fetch-Dest": "empty",
1421
+ "Sec-Fetch-Mode": "cors",
1422
+ "Sec-Fetch-Site": "same-origin"
1412
1423
  };
1413
1424
  if (tokens?.csrfToken) headers["X-CSRFToken"] = tokens.csrfToken;
1414
1425
  if (tokens?.lsd) headers["X-FB-LSD"] = tokens.lsd;
1415
- const res = await this.httpClient.fetchJson("https://www.instagram.com/graphql/query", {
1426
+ const res = await this.httpClient.fetchJson("https://www.instagram.com/api/graphql", {
1416
1427
  method: "POST",
1417
1428
  body: bodyParams.toString(),
1418
1429
  cookiePath: options.cookiePath,
@@ -1423,7 +1434,7 @@ var InstagramExtractor = class {
1423
1434
  const edges = res?.data?.highlights?.edges;
1424
1435
  if (Array.isArray(edges)) {
1425
1436
  if (res?.errors && Array.isArray(res.errors) && res.errors.length > 0) {
1426
- logExtractorDebug("PolarisProfileStoryHighlightsTrayContentQuery partial field errors", res.errors);
1437
+ logExtractorDebug("ProfileStoryHighlightsTrayContentQuery_connection partial field errors", res.errors);
1427
1438
  }
1428
1439
  return edges.map((e) => e.node).filter(Boolean);
1429
1440
  }
@@ -1434,7 +1445,7 @@ var InstagramExtractor = class {
1434
1445
  }
1435
1446
  }
1436
1447
  } catch (err) {
1437
- logExtractorDebug("PolarisProfileStoryHighlightsTrayContentQuery", err);
1448
+ logExtractorDebug("ProfileStoryHighlightsTrayContentQuery_connection", err);
1438
1449
  const msg = err instanceof Error ? err.message : String(err);
1439
1450
  if (isExplicitAuthError(msg)) {
1440
1451
  authError = new Error("Instagram Highlights require an active authenticated session. Your session cookie is missing or expired. Update your cookies in Settings (^s).");
@@ -1481,7 +1492,13 @@ var InstagramExtractor = class {
1481
1492
  __user: "0",
1482
1493
  __a: "1",
1483
1494
  __req: "0",
1495
+ __hs: "20731.HYP:instagram_web_pkg.2.1...0",
1484
1496
  dpr: "1",
1497
+ __ccg: "EXCELLENT",
1498
+ __rev: "1049285836",
1499
+ __hsi: "7693193318680449885",
1500
+ __comet_req: "7",
1501
+ jazoest: "26461",
1485
1502
  fb_api_caller_class: "RelayModern",
1486
1503
  fb_api_req_friendly_name: "PolarisStoriesV3ReelPageGalleryQuery",
1487
1504
  server_timestamps: "true",
@@ -1494,14 +1511,18 @@ var InstagramExtractor = class {
1494
1511
  "Accept": "*/*",
1495
1512
  "Content-Type": "application/x-www-form-urlencoded",
1496
1513
  "X-IG-App-ID": IG_APP_ID,
1514
+ "X-IG-Max-Touch-Points": "0",
1497
1515
  "X-FB-Friendly-Name": "PolarisStoriesV3ReelPageGalleryQuery",
1498
1516
  "Referer": "https://www.instagram.com/",
1499
1517
  "Origin": "https://www.instagram.com",
1500
- "X-ASBD-ID": "359341"
1518
+ "X-ASBD-ID": "359341",
1519
+ "Sec-Fetch-Dest": "empty",
1520
+ "Sec-Fetch-Mode": "cors",
1521
+ "Sec-Fetch-Site": "same-origin"
1501
1522
  };
1502
1523
  if (tokens?.csrfToken) headers["X-CSRFToken"] = tokens.csrfToken;
1503
1524
  if (tokens?.lsd) headers["X-FB-LSD"] = tokens.lsd;
1504
- const res = await this.httpClient.fetchJson("https://www.instagram.com/graphql/query", {
1525
+ const res = await this.httpClient.fetchJson("https://www.instagram.com/api/graphql", {
1505
1526
  method: "POST",
1506
1527
  body: bodyParams.toString(),
1507
1528
  cookiePath: options.cookiePath,
@@ -1864,14 +1885,6 @@ var InstagramExtractor = class {
1864
1885
  if (!userId || userId === "[object Object]") {
1865
1886
  throw new Error(`Could not resolve user ID for @${username}. Profile may be private or unavailable.`);
1866
1887
  }
1867
- if (user?.latest_reel_media === 0) {
1868
- options.onProgress?.({
1869
- stage: "Stories",
1870
- found: 0,
1871
- message: `Profile @${username} has no active stories in the last 24 hours.`
1872
- });
1873
- return;
1874
- }
1875
1888
  options.onProgress?.({
1876
1889
  stage: "Stories",
1877
1890
  found: 0,
@@ -1901,14 +1914,6 @@ var InstagramExtractor = class {
1901
1914
  if (!userId || userId === "[object Object]") {
1902
1915
  throw new Error(`Could not resolve user ID for @${username}. Profile may be private or unavailable.`);
1903
1916
  }
1904
- if (user?.highlight_reel_count === 0) {
1905
- options.onProgress?.({
1906
- stage: "Highlights",
1907
- found: 0,
1908
- message: `Profile @${username} has no available highlights.`
1909
- });
1910
- return;
1911
- }
1912
1917
  options.onProgress?.({
1913
1918
  stage: "Highlights",
1914
1919
  found: 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-nami",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "Open Nami: terminal-first bulk social media profile downloader for Instagram, TikTok, Facebook & X.",
5
5
  "type": "module",
6
6
  "bin": {