Skip to content
Snippets Groups Projects
Commit f5da0b2e authored by Jonas Kjærandsen's avatar Jonas Kjærandsen
Browse files

Commented out saving of screenshot to file

parent 3b9ba7f3
No related branches found
No related tags found
1 merge request!2Merge react-branch into main.
package utils
import (
"strings"
"context"
"io/ioutil"
"log"
"strings"
//"github.com/chromedp/cdproto/page"
"github.com/chromedp/chromedp"
......@@ -66,7 +65,6 @@ var SearchURL string
SearchURL = "https://" + url
}
ctx, cancel := chromedp.NewContext(
context.Background(),
// chromedp.WithDebugf(log.Printf),
......@@ -90,9 +88,10 @@ if err := ioutil.WriteFile("elementScreenshot.png", screenshotbuf, 0o644); err !
if err := chromedp.Run(ctx, fullScreenshot(SearchURL, 90, &screenshotbuf)); err != nil {
log.Fatal(err)
}
/*
if err := ioutil.WriteFile("fullScreenshot.png", screenshotbuf, 0o644); err != nil {
log.Fatal(err)
}
}*/
log.Printf("wrote elementScreenshot.png and fullScreenshot.png")
Response.Screenshot = screenshotbuf
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment