Giter Site home page Giter Site logo

ramtinak / instagramapisharp Goto Github PK

View Code? Open in Web Editor NEW
773.0 773.0 234.0 3.71 MB

A complete Private Instagram API for .NET (C#, VB.NET).

License: MIT License

C# 100.00%
csharp dotnet igtv insta instagram instagram-api instagram-scraper instagram-sdk instagram-tv instagramapisharp net net-core net-framework net-standard reels

instagramapisharp's Introduction

زندگی هیچوقت به کام نیست...
private static readonly 
    Lazy<Ramtin> LazyRamtinIsHere =
        new(() => new());

instagramapisharp's People

Contributors

adeilsoncs avatar amastaneh avatar anushiravani avatar bman46 avatar bynifaciy avatar coryshaw1 avatar estgold avatar fatihdumanli avatar gojice avatar juliendu11 avatar letubert avatar lorymi avatar mihey8800 avatar ngame1 avatar raminmt avatar ramtinak avatar sh2ezo avatar sharifpour avatar u8989332 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

instagramapisharp's Issues

Using Only One Device/Useragent

I tried with examples and everytime it is using same device for login. Random android device function is not working. I think it should auto use random devices / useragents for different accounts. Or can you guide how i bind different device to different account?

Challenge

Challenge account is not work.
its return error: "Object reference not set to an instance of an object."

Can we use always same device

When user login, after instagram send an email. (Diffirent device login detected.) Can we use always same device for login? Or can we select manuel device ?

And some account login perfect but not authenticated? Why can be it ? Thank you.

IGTV

سلام. ممنون از توسعه ی این کتابخونه.
چطور میتونیم ویدیو های اینستاگرام تی وی رو بگیریم؟
و همچنین نمایش دادن لایو ها به چه شکل هست؟ میشه مثال بزنید. ممنون میشم

CommentProcessor.LikeCommentAsync() method return false

CommentProcessor.LikeCommentAsync(), CommentProcessor.UnlikeCommentAsync() methods returns
Unexpected character encountered while parsing value: <. Path '', line 0, position 0.

Methods not works.

Test Media Id: 1087766394295620421
Test Comment Id: 17844117637064604

Create New account

I open an account. Why does it turn off after 10 seconds? I am using a proxy.

Exception on call fuction GetStateDataAsStream()

Hi. In the xamarin project (net standart 2.0, uwp) app close with exception:
Exception thrown: "System.Runtime.Serialization.SerializationException" в System.Runtime.Serialization.Formatters.dll
Exception thrown: "System.Runtime.Serialization.SerializationException" в System.Private.CoreLib.dll
Exception thrown: "System.Runtime.Serialization.SerializationException" в System.Private.CoreLib.dll
Exception thrown: "System.Runtime.Serialization.SerializationException" в System.Private.CoreLib.dll
Exception thrown: "System.Runtime.Serialization.SerializationException" в System.Private.CoreLib.dll

ChildCommentCount not work

Hello.

  1. In CommentProcessor() ChildCommentCount() method not work. And child comment always come like parent comment. How can we get only parent comment and their child commet ? Thank you.
    test

  2. if you call InstaApiBuilder.CreateBuilder() method more about 3-4 time consecutive, it is not working and not response. (i dont know, but may be httpClient must use with IDisposable, in using() statement)

Reset Password

سلام. میشه قابلیت ریست و بازیابی پسورد رو هم به کتابخونه اضافه کنین. ممنون

Timeout

hi. how i can set Timeout for the requests ?

Development

HI. thanks for Development this library.
I am using of InstaSharper in my project.
But I don't have time to add all the capabilities/functions to InstaSharper.
so If you completing your library, i will replace the library.

Form freeze while commenting

hey thanx for this amazing lib bro, I have a problem when commenting the form be frozen but I using async awaiting method

Highlight

hi, please add Highlights (get-upload-delete) functions to this library.
thanks.

Media URL To ID

How Can I media url to id
GetMediaIdFromUrlAsync not working.

Using Proxy On API

How do i construct an instance with a proxy associated to it? Does it support proxy with user authentication? And i hope once instance is created using proxy association all future request will go through proxy as well.

Hello!

if (paginationParameters.MaximumPagesToLoad > 1)

Hi, I see you're updating the API. We have the same source, but you changed the implementation of some methods, because of this I can not send PR.
I have updated all the direct messages if you want to look at
(https://github.com/pictos/InstaSharper/blob/2dfc09fe2269a08d114846e9f9d3bfc1741c36df/InstaSharper/API/Processors/MessagingProcessor.cs#L58) and now I updating the stories.

I hope we can help each other.

Respectfully.

Object reference not set to an instance of an object

Hi, yesterday we spoke about similar problem.

When I tried to upload photo I had exception: Object reference not set to an instance of an object, does not matter I used Uri for file or bytes

{System.NullReferenceException: Object reference not set to an instance of an object. at InstagramApiSharp.Converters.Json.InstaMediaDataConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonConverter[] converters) at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonConverter[] converters) at InstagramApiSharp.API.Processors.HelperProcessor.ConfigureMediaPhotoAsync(Action1 progress, InstaUploaderProgress upProgress, String uploadId, String caption, InstaLocationShort location)}

Business Support

Hey, this is a good library! Thanks.
please add support of business accounts.

And please create a example for login with Facebook in WPF. (I can't ports your codes of Windows Forms to WPF)

It's Like Instagram App is Updated For User

Since i started to use this library,version was 35 and now it is updated to 61(The user-agent and obviously version code). Since than i have many accounts with their state saved that mean they will use older useragent and older version code on useragent but since library is updated to newer version to support new api it will be a good mesaure to check which version library is using and what is saved on the state file. If this is different then update the state file with new useragent(Just change the necessary part but remain the device info same) while loading statefile and save changes instantly. This way it looks like user have updated to newer version of instagram app.

follow up process

I want to ask a question. How can I find someone following me?
GetUserInfoByIdAsync has no such option. help please

Consent Required

I've accounts created from USA IP and When i try to login from EU Ip instagram is showing consent required message(Something related to GDPR). So i think it should be included on latest version.
I'm happy to give some test accounts so that it will be easier to see those messages.

FeedProcessor.GetUserTimelineFeedAsync - The type requires a JSON array (e.g. [1,2,3]) to deserialize correctly

When calling FeedProcessor.GetUserTimelineFeedAsync when there are no posts in the user's feed:

Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Collections.Generic.List`1[InstagramApiSharp.Classes.ResponseWrappers.InstaUserResponse]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly.
To fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.
Path 'suggested_users.title', line 1, position 341.

This is the part of the JSON it seems to have trouble with:

{"num_results": 0, "more_available": false, "auto_load_more_enabled": true, "feed_items": [], "is_direct_v2_enabled": true, "next_max_id": null, "pagination_info": {"source": null, "group_id": null}, "view_state_version": "1537912656029-db0ef7bc7e7647f395c67b5c064bd352", "client_feed_changelist_applied": false, "suggested_users": {"title": "Suggestions for You", "style": "with_content_thumbnail", "suggestions":

Stack trace:

at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType, JsonSerializer jsonSerializer)
at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType)
at Newtonsoft.Json.Linq.JToken.ToObjectT
at InstagramApiSharp.Converters.Json.InstaFeedResponseDataConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonConverter[] converters)
at InstagramApiSharp.API.Processors.FeedProcessor.GetUserTimelineFeedAsync(PaginationParameters paginationParameters)
Stacktrace: at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType, JsonSerializer jsonSerializer)
at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType)
at Newtonsoft.Json.Linq.JToken.ToObjectT
at InstagramApiSharp.Converters.Json.InstaFeedResponseDataConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonConverter[] converters)
at InstagramApiSharp.API.Processors.FeedProcessor.GetUserTimelineFeedAsync(PaginationParameters paginationParameters)

Challange At First Login

I'm processing some new created accounts which are neither phone verified nor email verified. When i try to login then library can detect it needs challange but problem is it is not for already verified email/phone. I have to include new phone number for it. For that i tried to use method GetChallengeRequireVerifyMethodAsync but it is not working as i can't see server sending json stepdata values. Can you have a look on this.
May be there we need another method/function to add phone numbers to such accounts.

How do I get my latest follow-up?

How do I get my latest follow-up?

var sontakip = await _instaApi.GetUserFollowersAsync(currentUser.Value.UserName, PaginationParameters.MaxPagesToLoad(1));

var firstMedia = sontakip.Value.FirstOrDefault();
label1.text= firstMedia.UserName;

does not the last follower come?

Can we give story link

Hello.

  1. When upload a story can we give to link same time to it?

2)And what is the best sizes for story video? Because when i upload a video(450x800) it seems very bad on browser, why can be?

Thank you.

Stroy browser screenshot (videoSize: 450x800):
browser

Strory mobil screenshot (videoSize: 450x800):
mobil

Null Error

ERROR PİCTURE
https://i.hizliresim.com/VDYZ2Z.jpg

if (dahaonce != null && dahaonce.Value != null && $"{dahaonce.Value.OutgoingRequest}" == null)
{
MessageBox.Show("ERROR");
}

I wrote that but it still gives an error.

Challenge

hi, i use of new challenge functions.
after enter security code and call function VerifyCodeForChallengeRequireAsync (I entered the correct code)
LoggedinUser is null !

21123321

333333

Get Pending Friend Requests

Pending Dating Requests Get your account information incorrectly.

example
in reality

username: mesajdenemesi1 is private true
but
screen output
username: mesajdenemesi1 is private false

var i = await _instaApi.GetPendingFriendRequests();
                foreach (var item in i.Value.Users)
                {

                   
           
                    listBox4.Items.Add(item.UserName+"---"+item.IsPrivate);
     

                }

GetRandomAndriodVersion() creates endless loop (again)

why i don't know but this problem continue again :( when using static class it is always overwrite itself. so i did something like that. Create a new class for AndroidVersion in Classess > Android > DeviceInfo > AndroidVersionClass.cs and change something in AndroidVersion.cs & AndroidDevice.cs. i hope this is help for that. i tested it is working.

DeviceInfo.zip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.