Playwrightprepack

package module
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 27, 2024 License: MIT Imports: 9 Imported by: 0

README

Go Reference

Playwright Pre Pack

This is a personal package that automatically prepacks my preferred playwright setup and reduce personal project bloat.

Also using this as an excuse to really get familiar with go testing package

Documentation

Overview

Package Playwrightprepack pre-sets a lot of the default configurations I usually use to scrape or test websites.

Index

Constants

This section is empty.

Variables

View Source
var IpAgentList = []string{

	"iPhone X", "iPhone XR",
	"iPhone XS", "iPhone XS Max",
	"iPhone 11", "iPhone 11 Pro", "iPhone 11 Pro Max",
	"iPhone SE (2nd generation)",
	"iPhone 12 mini", "iPhone 12", "iPhone 12 Pro", "iPhone 12 Pro Max",
	"iPhone 13 mini", "iPhone 13", "iPhone 13 Pro", "iPhone 13 Pro Max",
	"iPhone 14 mini", "iPhone 14", "iPhone 14 Pro", "iPhone 14 Pro Max",
	"iPhone 15", "iPhone 15 Plus", "iPhone 15 Pro", "iPhone 15 Pro Max",
	"iPhone 16", "iPhone 16 Pro", "iPhone 16 Pro Max",
}

IpAgentList contains all iphones from iphone X to 16.

Functions

func PlaywrightInit

func PlaywrightInit(prx *playwright.Proxy, plt int8, hdl bool, pw *playwright.Playwright) (playwright.BrowserContext, error)

PlaywrightInit Returns a browser with predefined settings. one browser per proxy.

Proxy - instantly pass the proxy from the pre-built collection, alternatively can be nil platform - 1 for webkit - 2 for firefox - any other number defaults to chromium headless - boolean for headless playwright - playwright instance to create the browser from

func ProxyLoad

func ProxyLoad(dir string) ([]*playwright.Proxy, error)

ProxyLoad Returns a Slice of all proxies from a given csv file

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL