From c224e2fe0155a4190d38ecc29c8046a558885d2f Mon Sep 17 00:00:00 2001 From: Daniel Lauzon Date: Fri, 17 Jan 2020 15:10:54 -0500 Subject: [PATCH] Move navToEnd logging line --- main.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main.go b/main.go index 17df7ad..bb88e6f 100644 --- a/main.go +++ b/main.go @@ -312,9 +312,6 @@ func navToEnd(ctx context.Context) error { } prev = active } - if *verboseFlag { - log.Printf("Successfully jumped to the end: %s", active) - } chromedp.KeyEvent("\n").Do(ctx) time.Sleep(tick) @@ -323,8 +320,11 @@ func navToEnd(ctx context.Context) error { return err } - log.Printf("Entered Detail Page: %s", location) - time.Sleep(tick) + if active == location { + if *verboseFlag { + log.Printf("Successfully jumped to the end: %s", location) + } + } return nil }