Fix for scanning two week back
This commit is contained in:
@@ -58,7 +58,7 @@ func (r *Runner) CheckInstaGram() {
|
||||
func (r *Runner) InstaPageNavigate(index int) {
|
||||
r.page.MustNavigate(r.Targets[index].Instagram)
|
||||
r.page.MustWaitLoad()
|
||||
r.Scroll(3, 250)
|
||||
r.Scroll(4, 250)
|
||||
}
|
||||
|
||||
func (r *Runner) InstaGetRes() InstaRes {
|
||||
@@ -87,6 +87,22 @@ func (r *Runner) GetInstaDataByIndex(index int) Result {
|
||||
r.InstaPageNavigate(index)
|
||||
|
||||
res := r.InstaGetRes()
|
||||
r.Scroll(3, 250)
|
||||
res2 := r.InstaGetRes()
|
||||
fmt.Println(len(res.Urls))
|
||||
fmt.Println(len(res2.Urls))
|
||||
for _, url2 := range res.Urls {
|
||||
wasIn := false
|
||||
for _, url := range res2.Urls {
|
||||
if url == url2 {
|
||||
wasIn = true
|
||||
}
|
||||
}
|
||||
if !wasIn {
|
||||
res.Urls = append(res.Urls, url2)
|
||||
}
|
||||
}
|
||||
fmt.Println(len(res.Urls))
|
||||
posts := r.GetIntsaEgagement(res.Urls)
|
||||
total_engagement, total_posts := r.calcInstaPostData(posts)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user