Fixed year problem...
This commit is contained in:
@@ -116,7 +116,11 @@ func (r *Runner) GetIntsaEgagement(urls []string) []InstaPost {
|
||||
fmt.Print(".")
|
||||
err = r.page.Navigate("https://www.instagram.com" + url)
|
||||
}
|
||||
r.page.MustWaitLoad()
|
||||
err = r.page.Timeout(5 * time.Second).WaitLoad()
|
||||
for err != nil {
|
||||
fmt.Print(".")
|
||||
err = r.page.Timeout(5 * time.Second).WaitLoad()
|
||||
}
|
||||
r.Scroll(10, 250)
|
||||
|
||||
data := r.page.MustEval(instagram_post_data).JSON("", "")
|
||||
@@ -145,8 +149,7 @@ func (r *Runner) GetIntsaEgagement(urls []string) []InstaPost {
|
||||
|
||||
if res.Views != 0 {
|
||||
res.Type = "Video"
|
||||
//res.Engagement = res.Views + res.Comments
|
||||
res.Engagement = 0
|
||||
res.Engagement = res.Likes + res.Comments
|
||||
} else {
|
||||
res.Type = "Image"
|
||||
res.Engagement = res.Likes + res.Comments
|
||||
|
||||
Reference in New Issue
Block a user