browser

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: MIT Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const DefaultTarget = "127.0.0.1:9222"

Variables

View Source
var ErrCDPUnavailable = errors.New("Chrome DevTools unavailable (start Chrome with --remote-debugging-port=9222)")

Functions

func ResolveTarget

func ResolveTarget(target string) (string, error)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func Connect

func Connect(ctx context.Context, target string) (*Client, error)

func (*Client) Close

func (c *Client) Close() error

func (*Client) Endpoint

func (c *Client) Endpoint() string

func (*Client) SetCookies

func (c *Client) SetCookies(ctx context.Context, cookies []CookieParam) (int, error)

type CookieConversion

type CookieConversion struct {
	Cookies []CookieParam
	Skipped int
}

func CookiesToParams

func CookiesToParams(stored []auth.StoredCookie) CookieConversion

type CookieParam

type CookieParam struct {
	Name     string   `json:"name"`
	Value    string   `json:"value"`
	URL      string   `json:"url,omitempty"`
	Domain   string   `json:"domain,omitempty"`
	Path     string   `json:"path,omitempty"`
	Secure   bool     `json:"secure,omitempty"`
	HTTPOnly bool     `json:"httpOnly,omitempty"`
	Expires  *float64 `json:"expires,omitempty"`
	SameSite string   `json:"sameSite,omitempty"`
}

type SyncResult

type SyncResult struct {
	CDP       string `json:"cdp"`
	Attempted int    `json:"attempted"`
	Set       int    `json:"set"`
	Skipped   int    `json:"skipped"`
}

func SyncCookies

func SyncCookies(ctx context.Context, sessionFile, target string) (*SyncResult, error)

Jump to

Keyboard shortcuts

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