Skip to content

Commit

Permalink
fix: more robust waiting mechanism after exporting resources
Browse files Browse the repository at this point in the history
  • Loading branch information
cecobask committed Jul 10, 2024
1 parent a48a6d9 commit 114d9ff
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/client/imdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -404,10 +404,8 @@ func (c *IMDbClient) exportResource(url string) error {
if err = exportButton.Click(proto.InputMouseButtonLeft, 1); err != nil {
return fmt.Errorf("failure clicking on export resource button: %w", err)
}
if _, err = tab.Element("a.exp-pmpt__btn"); err != nil {
return fmt.Errorf("failure finding exports page button: %w", err)
}
return nil
tab.WaitRequestIdle(time.Second, nil, []string{"hblg.media.net"}, nil)()
return tab.WaitDOMStable(time.Second, 0)
}

func (c *IMDbClient) waitExportsReady(tab *rod.Page, ids ...string) error {
Expand Down

0 comments on commit 114d9ff

Please sign in to comment.