Skip to content
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.

how do I repeat with max_id when the results of feedTag.MoreAvailable is true? #266

Closed
danie234 opened this issue Aug 9, 2019 · 2 comments
Labels

Comments

@danie234
Copy link

danie234 commented Aug 9, 2019

for {
feedTag, err := insta.Feed.Tags(tag)
if err != nil {
fmt.Println(err)
return
}

for _, item := range feedTag.RankedItems {
  err := FindCode(item.Code)
  if err != nil {
    fmt.Println("sudah ada di database. code:", item.Code)
  } else {
    fmt.Println("tidak ada di database, mulai memasukkan ke database. code:", item.Code)
    input := database.C("target_posts_new").Insert(item)
    if input != nil {
      fmt.Println("gagal memasukkan code:", item.Code)
    } else {
      fmt.Println("berhasil memasukkan code:", item.Code)
    }
  }

}
nextID := feedTag.NextID
fmt.Println(nextID)

moreAvailable := feedTag.MoreAvailable
fmt.Println(moreAvailable)
if(!moreAvailable){
  break
}
time.Sleep(15 * time.Second)

}

how do I repeat with max_id when the results of feedTag.MoreAvailable is true?

@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label question to this issue, with a confidence of 0.79. Please mark this comment with 👍 or 👎 to give our bot feedback!

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

@ahmdrz
Copy link
Owner

ahmdrz commented Aug 9, 2019

Reference to #264, #265. I'll merge it soon.
Special thanks to @sviande.

@ahmdrz ahmdrz closed this as completed Aug 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants