Davincible / goinsta

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

Get hashtag it return hashtag.NumResults = 0 #49

Open thanhbk113 opened 1 year ago

thanhbk113 commented 1 year ago

my code to get post from hashtag but it return zero result:


package main

import (
    "fmt"

    "github.com/Davincible/goinsta/v3"
)

func main() {
    insta, err := goinsta.Import("./goinsta")
    if err != nil {
        panic(err)
    }

    tag := "golang"
    hashtag, err := insta.Searchbar.SearchHashtag(tag)
    if err != nil {
        panic(err)
    }

    fmt.Println(hashtag.NumResults)

}
Vaansh commented 1 year ago

Not exactly the same issue but the following snippet also doesn’t work correctly

if err := insta.Login(); err != nil {
    panic(err)
}

var following = insta.Account.Following("", goinsta.DefaultOrder) // unexpectedly returns 0 Users
yms2772 commented 1 year ago

Do hashtag.Tags[0].Next() before running fmt.Println(hashtag.NumResults)