extractor

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractAll

func ExtractAll(ctx context.Context, e *Extractor, urls []string) ([]*media.Stream, error)

ExtractAll runs Extract concurrently on all given URLs (bounded by the extractor's MaxConcurrency) and returns deduplicated streams.

Types

type Extractor

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

Extractor captures video stream URLs from a page using headless Chrome. It holds only capture and action config (patterns, timing) — no proxies or templates.

func NewExtractor

func NewExtractor(browserCfg app.BrowserConfig, cfg app.CaptureConfig, actionCfg app.ActionConfig) (*Extractor, error)

NewExtractor creates an Extractor from a BrowserConfig, CaptureConfig, and ActionConfig.

func (*Extractor) Extract

func (e *Extractor) Extract(ctx context.Context, targetURL string) ([]*media.Stream, error)

Extract runs a single session+pipeline extraction attempt.

type Profile

type Profile struct {
	UserAgent           string
	Brands              [][2]string // [brand, majorVersion]
	FullVersionList     [][2]string // [brand, fullVersion]
	Platform            string      // Client Hints platform (e.g. "Windows")
	PlatformVersion     string      // Client Hints platform version
	Architecture        string
	Bitness             string
	NavigatorPlatform   string // navigator.platform value
	AcceptLanguage      string
	Languages           []string
	HardwareConcurrency int64
	DeviceMemory        int
	ScreenWidth         int
	ScreenHeight        int
	CenterX             float64 // ScreenWidth/2, pre-computed for MouseClickXY
	CenterY             float64 // ScreenHeight/2, pre-computed for MouseClickXY
	ColorDepth          int
	WebGLVendor         string
	WebGLRenderer       string
	TimezoneID          string
	NoiseSeed           uint32  // per-session PRNG seed for canvas/audio/rect/font noise
	FontNoisePx         float64 // sub-pixel offset for measureText [0.001, 0.099]
	RectNoisePx         float64 // sub-pixel offset for getClientRects [0.001, 0.099]
	AudioNoiseMag       float64 // noise magnitude for AudioContext [0.00001, 0.0001]
}

Profile holds a coherent set of browser fingerprint values for a single extraction session. Every field is internally consistent — UA, platform, WebGL, locale, Client Hints, etc. all match the same virtual identity.

func NewProfile

func NewProfile() *Profile

NewProfile builds a randomized but internally-consistent browser fingerprint.

Jump to

Keyboard shortcuts

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