INITIAL COMMIT
This commit is contained in:
parent
429aff878a
commit
1e96429e5f
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
.env
|
.env
|
||||||
k8s/deployment.yml
|
k8s/deployment.yml
|
||||||
|
bin/*
|
||||||
Binary file not shown.
Binary file not shown.
@ -11,7 +11,6 @@ import (
|
|||||||
|
|
||||||
"unicode"
|
"unicode"
|
||||||
|
|
||||||
"github.com/maximotejeda/us_dop_scrapper/helpers"
|
|
||||||
"github.com/playwright-community/playwright-go"
|
"github.com/playwright-community/playwright-go"
|
||||||
"golang.org/x/text/runes"
|
"golang.org/x/text/runes"
|
||||||
"golang.org/x/text/transform"
|
"golang.org/x/text/transform"
|
||||||
@ -136,7 +135,7 @@ func CreateBrowser(log *slog.Logger) (chrome *playwright.BrowserContext, firefox
|
|||||||
pw, err := playwright.Run(&playwright.RunOptions{
|
pw, err := playwright.Run(&playwright.RunOptions{
|
||||||
Verbose: true,
|
Verbose: true,
|
||||||
})
|
})
|
||||||
ua := helpers.NewMobileUA()
|
ua := NewMobileUA()
|
||||||
|
|
||||||
headless := true
|
headless := true
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -161,7 +160,6 @@ func CreateBrowser(log *slog.Logger) (chrome *playwright.BrowserContext, firefox
|
|||||||
Width: 412,
|
Width: 412,
|
||||||
Height: 915,
|
Height: 915,
|
||||||
},
|
},
|
||||||
IsMobile: &headless,
|
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("could not start browser firefox context", "error", err)
|
log.Error("could not start browser firefox context", "error", err)
|
||||||
@ -184,7 +182,6 @@ func CreateBrowser(log *slog.Logger) (chrome *playwright.BrowserContext, firefox
|
|||||||
Width: 412,
|
Width: 412,
|
||||||
Height: 915,
|
Height: 915,
|
||||||
},
|
},
|
||||||
IsMobile: &headless,
|
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("could not start browser chorme context", "error", err)
|
log.Error("could not start browser chorme context", "error", err)
|
||||||
@ -207,7 +204,6 @@ func CreateBrowser(log *slog.Logger) (chrome *playwright.BrowserContext, firefox
|
|||||||
Width: 412,
|
Width: 412,
|
||||||
Height: 915,
|
Height: 915,
|
||||||
},
|
},
|
||||||
IsMobile: &headless,
|
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("could not start browser safari context", "error", err)
|
log.Error("could not start browser safari context", "error", err)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user