8000 GitHub - Leo-xxx/chromedp: A faster, simpler way to drive browsers supporting the Chrome DevTools Protocol.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
forked from chromedp/chromedp

A faster, simpler way to drive browsers supporting the Chrome DevTools Protocol.

License

Notifications You must be signed in to change notification settings

Leo-xxx/chromedp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8000
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About chromedp GoDoc Build Status

Package chromedp is a faster, simpler way to drive browsers supporting the Chrome DevTools Protocol in Go using the without external dependencies (like Selenium or PhantomJS).

Installing

Install in the usual Go way:

go get -u github.com/chromedp/chromedp

Examples

Refer to the GoDoc page for the documentation and examples. The examples repository contains more complex scenarios.

Frequently Asked Questions

  • I can't see any Chrome browser window

By default, it's run in headless mode. See DefaultExecAllocatorOptions, and an example to override said options.

  • I'm seeing "context canceled" errors

If the connection to the browser is dropped, the context will be cancelled, which can be an unexpected reason for this error. For example, if the browser is closed manually.

  • Chrome exits as soon as my Go program finishes

This is set up on Linux to avoid leaking resources. If you want Chrome to be a long-running process, start it separately and connect to it via RemoteAllocator.

  • Execute an action results in "invalid context"

By default, a chromedp context doesn't have an executor set up. You can specify one; see #326.

  • I can't use an Action with Run because it returns many values

Wrap it with an ActionFunc:

chromedp.Do(ctx, ActionFunc(func(ctx context.Context) error {
	_, err := domain.SomeAction().Do(ctx)
	return err
}))

Resources

About

A faster, simpler way to drive browsers supporting the Chrome DevTools Protocol.

4EB7

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%
0