MCPcopy Create free account
hub / github.com/MMadmer/EpicAssetsNotifyBot / NewBrowserSource

Function NewBrowserSource

internal/fab/browser_source.go:37–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35}
36
37func NewBrowserSource() (*BrowserSource, error) {
38 browserPath, err := resolveBrowserOverride()
39 if err != nil {
40 return nil, err
41 }
42
43 return &BrowserSource{
44 BrowserPath: browserPath,
45 URL: defaultHomepageURL,
46 UserAgent: defaultBrowserUserAgent,
47 Timeout: 60 * time.Second,
48 PostLoadDelay: 1500 * time.Millisecond,
49 }, nil
50}
51
52func (s *BrowserSource) Fetch(ctx context.Context) (document string, err error) {
53 if s == nil {

Callers 2

NewFunction · 0.92
GetFreeAssetsFunction · 0.85

Calls 1

resolveBrowserOverrideFunction · 0.85

Tested by

no test coverage detected