Skip to content

Commit

Permalink
feat: WaitPageLoad was with wrong timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielFillol committed Jul 11, 2024
1 parent cd4d3a1 commit f171e2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions goSpider.go
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ func (nav *Navigator) WaitPageLoad() (string, error) {
start := time.Now()
var pageHTML string
for {
if time.Since(start) > nav.Timeout {
if time.Since(start) > time.Minute {
nav.Logger.Println("Error - Timeout waiting for page to fully load")
return "", fmt.Errorf("error - timeout waiting for page to fully load")
}
Expand All @@ -551,7 +551,7 @@ func (nav *Navigator) WaitPageLoad() (string, error) {
break
}
nav.Logger.Println("INFO: Page is not fully loaded yet, retrying...")
time.Sleep(300 * time.Millisecond)
time.Sleep(nav.Timeout)
}

nav.Logger.Println("INFO: Page is fully loaded")
Expand Down

0 comments on commit f171e2b

Please sign in to comment.