riad-azz / instagram-video-downloader

Simple website made with Next.js for downloading instagram videos with an API that can be used to integrate it in other applications.
https://instagram-videos.vercel.app
MIT License
180 stars 75 forks source link

This post is private or does not exist False error #8

Closed abdu558 closed 10 months ago

abdu558 commented 10 months ago

Describe the bug This post is private or does not exist even though the post is valid and can be viewed normally on any account. such as: This post is private or does not exist

To Reproduce

This happens in the website and the cloned app Steps to reproduce the behavior:

  1. Sumbit this link https://www.instagram.com/p/Cyy9LKZNYr_/
  2. See error
  3. Open the link on instagram and it works fine

Expected behavior I expected it to work normally, but the error comes up. It should download it, I dont understand why this happens as i ran over 100 posts and 2 got flagged for this error.

riad-azz commented 10 months ago

The problem had to do with a check in an attempt for better performance in src/lib/instagram/scrapers/webpage.ts :

  if (!response.data.includes('hreflang="x-default"')) {
    throw new BadRequest("This post is private or does not exist");
  }

Issue has been fixed with the latest commit.