Davincible / goinsta

Unofficial Instagram API written in Golang (v2022)
MIT License
183 stars 56 forks source link

Cannot unmarshal array into Go struct field SearchResult.clear_client_cache of type bool exit status 1 #54

Closed wbdb closed 1 year ago

wbdb commented 1 year ago

Sometimes I get this error message:

https://github.com/Davincible/goinsta/blob/9cdb8e46417dbcbfd8bc98c07a5be8d447ea0ffb/search.go#L56

cannot unmarshal array into Go struct field SearchResult.clear_client_cache of type bool exit status 1

followers := profile.User.Followers("")
for followers.Next()  {
    for _, follower := range followers.Users {
    }
}

What I noticed in the Debug Mode JSON:

There are some typos in the JSON data, such as "proofile_pic_url" instead of "profile_pic_url" and "is_privatee" instead of "is_private". Each occurring once.

\"is_privatee\":false,\"
\"proofile_pic_url\":

Steps to reproduce:

_, err = insta.VisitProfile("armin_laschet")

Error: search.go Line 403

wbdb commented 1 year ago

Edit search.go to:

ClearClientCache interface{} `json:"clear_client_cache"`
Davincible commented 1 year ago

Thanks for the research, why did you close the PR?

wbdb commented 1 year ago

@Davincible That was the Github automatism. I thought it stays open even if I merge and close the branch in the fork. I resent the PR.

FrauElster commented 1 year ago

Can you make a new release with this change. The current release is v3.2.6 is almost 10 months old and this change solves a breaking bug.

Thanks in advance :)

FrauElster commented 10 months ago

Can you make a new release with this change. The current release is v3.2.6 is almost 10 months old and this change solves a breaking bug.

Thanks in advance :)

Just as a reminder, the last release is now a year behind.