Open HuwSy opened 3 years ago
I like the simplicity of your solution, but would want to be more sure the program doesn't skip any of my images. Maybe this is related to #26?
Also related to slow connections and simple solution to these. The left button and related keyboard shortcut doesn't always load if the image/video takes to long to load which then breaks navLeft function. Even rerunning the script fails as it loads the same image and it is still a big picture and doesn't load in a timely manner. After resizing accidentally I noticed the button appear. So locally I have changed this function to begin;
func navLeft(ctx context.Context) error {
var res []string
chromedp.EvaluateAsDevTools(window.resize();
, &res)
time.Sleep(tick)
Which seems to do the trick without overcomplicating anything.
The navToEnd function on slower internet connections does not achieve the expected because the unloaded images gray boxes makes the process think it has reached the end as there are identical screen shots. Updating line 362 as follows resolves this issue without impacting the process too much.
time.Sleep(10 * tick)