postaddictme / instagram-java-scraper

Instagram Java Scraper. Get account information, photos, videos and comments.
447 stars 148 forks source link

RATE_LIMITED #159

Open Nicky-Sa opened 2 years ago

Nicky-Sa commented 2 years ago

Hello, tnx for your project, when I call instagram.basePage(), I get this error: Exception in thread "main" me.postaddict.instagram.scraper.exception.InstagramException: Rate limited : RATE_LIMITED this is my code: HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor(); loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY);

    OkHttpClient httpClient = new OkHttpClient.Builder()
            .addNetworkInterceptor(loggingInterceptor)
            .addInterceptor(new ErrorInterceptor())
            .cookieJar(new DefaultCookieJar(new CookieHashSet()))
            .build();

    Instagram instagram = new Instagram(httpClient);
    instagram.basePage();
gouravg8 commented 1 year ago

RATE_LIMITED error happens because Instagram does not allow scraping data without authorization (login) from their platform

hetalvadadoriya commented 7 months ago

Does this behaviour will change if the OP log into their Instagram account?