ramtinak / InstagramApiSharp

A complete Private Instagram API for .NET (C#, VB.NET).
MIT License
779 stars 239 forks source link

Disabling accounts who are not aggressive likers, commenters #609

Open TNSGXhosts opened 4 months ago

TNSGXhosts commented 4 months ago

#### I've:

Issue category

Language

Usage

Operating System

Debug logs

If your issue has an debug log, post it here, unless remove this section!

Describe your issue

Hi all, I have the following problem. My accounts were disabled very fast.. Just at the same day which I started using them. And I don't use Instagram client for likes, comments. I use it only for collecting data from instagram. I was thinking that it is due of different AndroidDevice values. But I had updated building my instagram client and still had the problem just after several hours of usage.

var userSession = new UserSessionData {
            UserName = _radarSettings.UserName,
            Password = _radarSettings.UserPassword
        };
        var device = new AndroidDevice
        {
            AndroidBoardName = "HONOR",
            DeviceBrand = "HUAWEI",
            HardwareManufacturer = "HUAWEI",
            DeviceModel = "PRA-LA1",
            DeviceModelIdentifier = "PRA-LA1",
            FirmwareBrand = "HWPRA-H",
            HardwareModel = "hi6250",
            DeviceGuid = new Guid("be897499-c663-492e-a125-f4c8d3785ebf"),
            PhoneGuid = new Guid("7b72321f-dd9a-425e-b3ee-d4aaf476ec52"),
            DeviceId = ApiRequestMessage.GenerateDeviceIdFromGuid(new Guid("be897499-c663-492e-a125-f4c8d3785ebf")),
            Resolution = "1080x1812",
            Dpi = "480dpi",
        };
        var delay = RequestDelay.FromSeconds(2, 4);

        try {
            s_instaApi = InstaApiBuilder.CreateBuilder()
                .SetUser(userSession)
                .UseLogger(new DebugLogger(InstagramApiSharp.Logger.LogLevel.Exceptions))
                .UseLogger(new DebugLogger(InstagramApiSharp.Logger.LogLevel.Request))
                .SetDevice(device)
                .SetRequestDelay(delay)
                .Build();
        } catch (Exception e) {
            return;
        } 

Could someone help me with that? What I should do to protect my account from disabling?

TNSGXhosts commented 4 months ago

I realised that my problem is a reaching request limits.

var followingsPage = await instaData.InstaApi.UserProcessor .GetUserFollowingAsync( username, PaginationParameters.Empty );

This request responds unsuccessful because it reaches limits every time even if there are only like 800 followings.. Is it possible to receive all followings without timeout?