ahmdrz / goinsta

Unofficial Instagram API written in Golang
MIT License
895 stars 247 forks source link

#321 Account.Saved() not working properly #320

Open tarasyarema opened 4 years ago

tarasyarema commented 4 years ago

Hi, today I was having a look to this repo because I want to manage my saved content. I noticed that there seems to be a bug in the insta.Account.Saved() method. Take a look at account.go#L313.

I cloned the repo and began playing with it. I also noticed that there's a constant (urlFeedSaved) that it is not used. I tried replacing the line noted above with account.inst.sendSimpleRequest(urlFeedSaved) and it returned the correct saved media.

There's one problem, tho. I seen that there's a pattern with the Media interface, about the Next method. After my modification the returned saved data is just a portion. I guess I would have to implement the interface for the SavedMedia type.

Take a look, I don't know if you already knew about that or wanted to implement it in the future. I could fork and try to help with it.

issue-label-bot[bot] commented 4 years ago

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.96. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

tarasyarema commented 4 years ago

As a side note, I saw the issue you created about wanting contributors for the project. That's why I said that I could try to implement it myself.

felipeinf commented 4 years ago

Como nota al margen, vi el problema que creó acerca de querer colaboradores para el proyecto. Por eso dije que podría intentar implementarlo yo mismo.

Hello, upload your changes and I can approve them!

We can also be in contact because I am also working in the library, greetings.

tarasyarema commented 4 years ago

Perfecto! jaja I'll have a look this week and maybe make a PR.

As a side-note, how do you test the API requests? Do you have a Insomnia/Postman workspace? As I noted that the requests have a lot of headers/variables. I understand that the idea is to "fake" a mobile connection and access to the API within that?

felipeinf commented 4 years ago

Hablas español? jajaj

About the other, it is just as you said. Goinsta makes requests as if it were a Smartphone, so I recommend you make requests using the SendRequest() method of the library and try to do all the tests with an IG account for development, trying to save a time difference between the requests that you do for example with a Sleep().

Anything I am attentive, greetings!

tarasyarema commented 4 years ago

Created a pull request #321.

tarasyarema commented 3 years ago

Hi! Will this PR be merged anytime soon?