instagram: use correct id when requesting from mobile API

This commit is contained in:
dumbmoron 2024-06-16 10:52:54 +00:00
parent d2e5b6542f
commit 21d5b4b8d4
No known key found for this signature in database

View file

@ -256,11 +256,11 @@ export default function(obj) {
if (!media_id && cookie) media_id = await getMediaId(id, { cookie }); if (!media_id && cookie) media_id = await getMediaId(id, { cookie });
// mobile api (bearer) // 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) // mobile api (no cookie, cookie)
if (!data && media_id) data = await requestMobileApi(id); if (media_id && !data) data = await requestMobileApi(media_id);
if (!data && media_id && cookie) data = await requestMobileApi(id, { cookie }); if (media_id && cookie && !data) data = await requestMobileApi(media_id, { cookie });
// html embed (no cookie, cookie) // html embed (no cookie, cookie)
if (!data) data = await requestHTML(id); if (!data) data = await requestHTML(id);