dilame / instagram-private-api

NodeJS Instagram private API SDK. Written in TypeScript.
MIT License
5.93k stars 1.14k forks source link

IGTV: Sorry, this photo has been deleted error #1237

Open RainGrid opened 4 years ago

RainGrid commented 4 years ago

Form

Put an [x] if you meet the condition, else leave [ ].

Question

Hello. For some IGTV medias i get "400 Bad Request; Sorry, this photo has been deleted." (for media.likers()) and "400 Bad Request; Media not found or unavailable" (for media.info()) errors.

Code

 const mediaRepository = await ig.media.info(
    ref.urlSegmentToInstagramId('CDGt6fkqi_t'),
  );
 const likersRepository = await ig.media.likers(
    ref.urlSegmentToInstagramId('CDGt6fkqi_t'),
  );

Full example

require('dotenv').config();

const { IgApiClient } = require('instagram-private-api');
const ref = require('instagram-id-to-url-segment');
const ig = new IgApiClient();
ig.state.generateDevice(process.env.IG_USER);
ig.state.proxyUrl = process.env.IG_PROXY;
(async () => {
  await ig.simulate.preLoginFlow();
  const loggedInUser = await ig.account.login(
    process.env.IG_USER,
    process.env.IG_PASS,
  );
  process.nextTick(async () => await ig.simulate.postLoginFlow());

  const likersRepository = await ig.media.likers(
    ref.urlSegmentToInstagramId('CDGt6fkqi_t'),
  );
  console.log(likersRepository);
})();

Error and Output

IgResponseError: GET /api/v1/media/2361287644293440500/likers/ - 400 Bad Request; Sorry, this photo has been deleted.
IgResponseError: GET /api/v1/media/2361776986326183917/info/ - 400 Bad Request; Media not found or unavailable
mehrdadmms commented 4 years ago

Hi I have the same problem. I can't get any of IGTV posts when I read user posts feed and when I want to specifically get the post (using the same url as above) I get Media not found I can see the post inside my phone on application and on the web but when I read user feed there is no IGTV in data for example you can use this post