From 2a9b3a84a5810b15b98358bb8aa0ac0bc615c5ad Mon Sep 17 00:00:00 2001 From: mpl Date: Tue, 27 Aug 2019 10:28:13 +0200 Subject: [PATCH] add sleeps to fix first jump to end --- main.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/main.go b/main.go index f548d5e..ea9eea9 100644 --- a/main.go +++ b/main.go @@ -315,21 +315,37 @@ func main() { chromedp.Sleep(5000*time.Millisecond), // TODO(mpl): do it the smart(er) way: nav right in photo view until the URL does not change anymore. Or something. chromedp.KeyEvent(kb.ArrowRight), + chromedp.Sleep(500*time.Millisecond), chromedp.KeyEvent(kb.ArrowRight), + chromedp.Sleep(500*time.Millisecond), chromedp.KeyEvent(kb.ArrowRight), + chromedp.Sleep(500*time.Millisecond), chromedp.KeyEvent(kb.ArrowRight), + chromedp.Sleep(500*time.Millisecond), chromedp.KeyEvent(kb.ArrowRight), + chromedp.Sleep(500*time.Millisecond), chromedp.KeyEvent(kb.ArrowRight), + chromedp.Sleep(500*time.Millisecond), chromedp.KeyEvent(kb.ArrowRight), + chromedp.Sleep(500*time.Millisecond), chromedp.KeyEvent(kb.ArrowRight), + chromedp.Sleep(500*time.Millisecond), chromedp.KeyEvent(kb.ArrowRight), + chromedp.Sleep(500*time.Millisecond), chromedp.KeyEvent(kb.ArrowRight), + chromedp.Sleep(500*time.Millisecond), chromedp.KeyEvent(kb.ArrowRight), + chromedp.Sleep(500*time.Millisecond), chromedp.KeyEvent(kb.ArrowRight), + chromedp.Sleep(500*time.Millisecond), chromedp.KeyEvent(kb.ArrowRight), + chromedp.Sleep(500*time.Millisecond), chromedp.KeyEvent(kb.ArrowRight), + chromedp.Sleep(500*time.Millisecond), chromedp.KeyEvent(kb.ArrowRight), + chromedp.Sleep(500*time.Millisecond), chromedp.KeyEvent(kb.ArrowRight), + chromedp.Sleep(500*time.Millisecond), chromedp.ActionFunc(firstNav), chromedp.ActionFunc(dlAndMoveW()), chromedp.ActionFunc(navN("left", *nItemsFlag-1)),