fix: stealth thing
This commit is contained in:
parent
70ec5f5273
commit
3f2a4447a8
@ -2,4 +2,4 @@ import { PuppeteerExtra } from 'puppeteer-extra'
|
|||||||
import Stealth from 'puppeteer-extra-plugin-stealth'
|
import Stealth from 'puppeteer-extra-plugin-stealth'
|
||||||
|
|
||||||
/** @type {(_: PuppeteerExtra) => () => PuppeteerExtra} */
|
/** @type {(_: PuppeteerExtra) => () => PuppeteerExtra} */
|
||||||
export const install = p => () => p.use(Stealth())
|
export const install = p => () => p.use(Stealth({}))
|
||||||
|
@ -18,7 +18,7 @@ import Prelude
|
|||||||
import Control.Promise (Promise)
|
import Control.Promise (Promise)
|
||||||
import Control.Promise as Promise
|
import Control.Promise as Promise
|
||||||
import Data.Map (Map)
|
import Data.Map (Map)
|
||||||
import Data.Maybe (Maybe(..))
|
import Data.Maybe (Maybe(..), fromMaybe)
|
||||||
import Effect (Effect)
|
import Effect (Effect)
|
||||||
import Effect.Aff (Aff)
|
import Effect.Aff (Aff)
|
||||||
import Effect.Unsafe (unsafePerformEffect)
|
import Effect.Unsafe (unsafePerformEffect)
|
||||||
@ -151,7 +151,7 @@ prepareLaunchOptions
|
|||||||
, handleSIGHUP: FFI.maybeToUndefined handleSIGHUP
|
, handleSIGHUP: FFI.maybeToUndefined handleSIGHUP
|
||||||
, handleSIGINT: FFI.maybeToUndefined handleSIGINT
|
, handleSIGINT: FFI.maybeToUndefined handleSIGINT
|
||||||
, handleSIGTERM: FFI.maybeToUndefined handleSIGTERM
|
, handleSIGTERM: FFI.maybeToUndefined handleSIGTERM
|
||||||
, args: FFI.maybeToUndefined args
|
, args: fromMaybe [] args
|
||||||
, debuggingPort: FFI.maybeToUndefined debuggingPort
|
, debuggingPort: FFI.maybeToUndefined debuggingPort
|
||||||
, devtools: FFI.maybeToUndefined devtools
|
, devtools: FFI.maybeToUndefined devtools
|
||||||
, headless: if headless then writeImpl "new" else writeImpl false
|
, headless: if headless then writeImpl "new" else writeImpl false
|
||||||
|
@ -92,8 +92,14 @@ spec = describe "Plugin" do
|
|||||||
describe "Stealth" do
|
describe "Stealth" do
|
||||||
test "install" do
|
test "install" do
|
||||||
pup <- Pup.new
|
pup <- Pup.new
|
||||||
void $ liftEffect $ Pup.Stealth.install pup
|
pup' <- liftEffect $ Pup.Stealth.install pup
|
||||||
|
b <- Pup.launch_ pup'
|
||||||
|
p <- Pup.Page.new b
|
||||||
|
pure unit
|
||||||
describe "AnonymousUserAgent" do
|
describe "AnonymousUserAgent" do
|
||||||
test "install" do
|
test "install" do
|
||||||
pup <- Pup.new
|
pup <- Pup.new
|
||||||
void $ liftEffect $ Pup.AnonUA.install pup
|
pup' <- liftEffect $ Pup.AnonUA.install pup
|
||||||
|
b <- Pup.launch_ pup'
|
||||||
|
p <- Pup.Page.new b
|
||||||
|
pure unit
|
||||||
|
Loading…
Reference in New Issue
Block a user