opt-in to "new headless"
This commit is contained in:
parent
09e5c805e3
commit
a3c016fc84
@ -18,7 +18,7 @@ RUN go mod download
|
|||||||
|
|
||||||
RUN PWGO_VER=$(grep -oE "playwright-go v\S+" go.mod | sed 's/playwright-go //g') \
|
RUN PWGO_VER=$(grep -oE "playwright-go v\S+" go.mod | sed 's/playwright-go //g') \
|
||||||
&& go install github.com/playwright-community/playwright-go/cmd/playwright@${PWGO_VER}
|
&& go install github.com/playwright-community/playwright-go/cmd/playwright@${PWGO_VER}
|
||||||
RUN playwright install --with-deps chromium && \
|
RUN playwright install --with-deps --no-shell chromium && \
|
||||||
mkdir /home/pwuser/.cache && \
|
mkdir /home/pwuser/.cache && \
|
||||||
mv /root/.cache/ms-playwright* /home/pwuser/.cache/ && \
|
mv /root/.cache/ms-playwright* /home/pwuser/.cache/ && \
|
||||||
chown -R pwuser:pwuser /home/pwuser/.cache && \
|
chown -R pwuser:pwuser /home/pwuser/.cache && \
|
||||||
|
|||||||
@ -51,6 +51,7 @@ func New(cfg Config) (*PwExtractor, error) {
|
|||||||
return nil, fmt.Errorf("parse proxy: %w", err)
|
return nil, fmt.Errorf("parse proxy: %w", err)
|
||||||
}
|
}
|
||||||
e.chrome, err = e.pw.Chromium.Launch(playwright.BrowserTypeLaunchOptions{
|
e.chrome, err = e.pw.Chromium.Launch(playwright.BrowserTypeLaunchOptions{
|
||||||
|
Channel: playwright.String("chromium"),
|
||||||
ChromiumSandbox: playwright.Bool(true),
|
ChromiumSandbox: playwright.Bool(true),
|
||||||
HandleSIGINT: playwright.Bool(false),
|
HandleSIGINT: playwright.Bool(false),
|
||||||
Proxy: proxy,
|
Proxy: proxy,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user