postaddictme/instagram-java-scraper

RATE_LIMITED

Opened this issue · 2 comments

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();

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

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