From 21d5b4b8d457c0bfe3dfe17029c235e115957200 Mon Sep 17 00:00:00 2001 From: dumbmoron Date: Sun, 16 Jun 2024 10:52:54 +0000 Subject: [PATCH] instagram: use correct id when requesting from mobile API --- src/modules/processing/services/instagram.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/processing/services/instagram.js b/src/modules/processing/services/instagram.js index 2fc533d8..6ea05178 100644 --- a/src/modules/processing/services/instagram.js +++ b/src/modules/processing/services/instagram.js @@ -256,11 +256,11 @@ export default function(obj) { if (!media_id && cookie) media_id = await getMediaId(id, { cookie }); // mobile api (bearer) - if (media_id && token) data = await requestMobileApi(id, { token }); + if (media_id && token) data = await requestMobileApi(media_id, { token }); // mobile api (no cookie, cookie) - if (!data && media_id) data = await requestMobileApi(id); - if (!data && media_id && cookie) data = await requestMobileApi(id, { cookie }); + if (media_id && !data) data = await requestMobileApi(media_id); + if (media_id && cookie && !data) data = await requestMobileApi(media_id, { cookie }); // html embed (no cookie, cookie) if (!data) data = await requestHTML(id);