starter

package module
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2022 License: GPL-3.0 Imports: 17 Imported by: 0

README

Starter

Go Reference Releases

Starter is a tool for packaging and storing Chrome extensions are used with Xvfb.

Background

Websites may contain challenges such as paywalls and various CAPTCHAs, and quite well solutions including puppeteer-extra do not work in all cases. It is hoped that this project will provide a solution that, to some extent, reproduces the real browser workplace.

How it works

  1. Packaging Chrome extensions into the binary.
  2. Launching Chrome to load extensions with a specified directory to stores user data.
  3. Launch a remote debugging browser with the flag --user-data-dir={workspace}/UserDataDir.

Note: remote debugging address is default to listen on 0.0.0.0:9222.

Prerequisite

  • Go (requires Go 1.18 or later)
  • GNU Make
  • Docker/Podman

Building

File the secrets of buster to hack/secrets.json

make build

Installation

sh <(wget https://github.com/wabarc/starter/raw/main/install.sh -O-)

Or

curl -fsSL https://github.com/wabarc/starter/raw/main/install.sh | sh

Extensions

License

This software is released under the terms of the GNU General Public License v3.0. See the LICENSE file for details.

Documentation

Index

Constants

View Source
const (
	ExtEntry = "extensions" // Entry directory of extensions

)

Variables

This section is empty.

Functions

func RunXvfb

func RunXvfb(ctx context.Context) error

Types

type Browser

type Browser struct {
	UserDataDir string
	RemotePort  int
	CacheSize   uint64
}

func (*Browser) Exit

func (b *Browser) Exit(cancel context.CancelFunc)

func (*Browser) Init

func (b *Browser) Init(ctx context.Context, ext *Extension, stopped chan bool) error

initial a chrome

type Extension

type Extension struct {
	// A directory where extensions can be saved for future use in Chrome.
	// If no directory is specified, it defaults to a temporary directory.
	Base string
}

func (*Extension) Store

func (e *Extension) Store() error

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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