Documentation
¶
Index ¶
- type Arg
- type CdpHelper
- func (h *CdpHelper) Attributes(sel any, opts ...chromedp.QueryOption) (map[string]string, error)
- func (h *CdpHelper) AttributesAll(sel any, opts ...chromedp.QueryOption) ([]map[string]string, error)
- func (h *CdpHelper) ChildNode(ctx context.Context, parent cdp.NodeID, cssSel string) (context.Context, cdp.NodeID, error)
- func (h *CdpHelper) ChildNodeTextContent(parent *cdp.Node, cssSel string) (string, error)
- func (h *CdpHelper) ChildNodes(parent *cdp.Node, cssSel string) ([]cdp.NodeID, error)
- func (h *CdpHelper) Click(sel any, opts ...chromedp.QueryOption) error
- func (h *CdpHelper) ClickChild(parent *cdp.Node, cssSel string, opts ...chromedp.MouseOption) error
- func (h *CdpHelper) Download(path string, isNewTarget bool) (*chan string, context.Context, error)
- func (h *CdpHelper) HasChildNode(parent *cdp.Node, cssSel string) (cdp.NodeID, bool)
- func (h *CdpHelper) Navigate(url string) error
- func (h *CdpHelper) NewBlankTab(targetId string) (*CdpHelper, error)
- func (h *CdpHelper) NewBrowserExecutor(ctx context.Context) context.Context
- func (h *CdpHelper) NewTargetExecutor(ctx context.Context) context.Context
- func (h *CdpHelper) NodeTextContent(sel any, opts ...chromedp.QueryOption) (string, error)
- func (h *CdpHelper) Nodes(sel any, opts ...chromedp.QueryOption) ([]*cdp.Node, error)
- func (h *CdpHelper) Run(actions ...chromedp.Action) error
- func (h *CdpHelper) RunWithTimeout(t time.Duration, actions ...chromedp.Action) error
- func (h *CdpHelper) SendKeys(sel any, v string, opts ...chromedp.QueryOption) error
- func (h *CdpHelper) SetAttributeValue(sel any, name string, value string, opts ...chromedp.QueryOption) error
- func (h *CdpHelper) SetAttributes(sel any, attributes map[string]string, opts ...chromedp.QueryOption) error
- func (h *CdpHelper) Sleep(d time.Duration) error
- func (h *CdpHelper) Tasks(actions ...chromedp.Action) error
- func (h *CdpHelper) WaitReady(sel any, opts ...chromedp.QueryOption) error
- func (h *CdpHelper) WithTextTimeout(timeout time.Duration)
- func (h *CdpHelper) WithTimeout(timeout time.Duration)
- type ContextWithCancel
- type DefaultLogger
- type Job
- type Logger
- type Scheduler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CdpHelper ¶
type CdpHelper struct {
// Allocator represents chromedp allocator with cancel func
Allocator ContextWithCancel
Browser ContextWithCancel
Current *ContextWithCancel
Timeout time.Duration
TextTimeout time.Duration
DownloadTimeout time.Duration
}
func NewBrowser ¶
func NewRemoteBrowser ¶
func (*CdpHelper) Attributes ¶
func (*CdpHelper) AttributesAll ¶
func (*CdpHelper) ChildNodeTextContent ¶ added in v0.9.10
func (*CdpHelper) ChildNodes ¶ added in v0.9.5
func (*CdpHelper) ClickChild ¶ added in v0.9.4
func (*CdpHelper) HasChildNode ¶ added in v0.9.6
func (*CdpHelper) NewBlankTab ¶
NewBlankTab returns a new CdpHelper instance, and CdpHelper.Current points to the new tab
func (*CdpHelper) NewBrowserExecutor ¶ added in v0.9.4
func (*CdpHelper) NewTargetExecutor ¶ added in v0.9.4
func (*CdpHelper) NodeTextContent ¶ added in v0.9.10
func (*CdpHelper) RunWithTimeout ¶ added in v0.9.1
func (*CdpHelper) SetAttributeValue ¶
func (*CdpHelper) SetAttributes ¶
func (*CdpHelper) WaitReady ¶
func (h *CdpHelper) WaitReady(sel any, opts ...chromedp.QueryOption) error
func (*CdpHelper) WithTextTimeout ¶
func (*CdpHelper) WithTimeout ¶
type ContextWithCancel ¶
type ContextWithCancel struct {
Context context.Context
Cancel context.CancelFunc
}
type DefaultLogger ¶
type DefaultLogger struct {
}
func (*DefaultLogger) Debugf ¶
func (*DefaultLogger) Debugf(format string, args ...any)
func (*DefaultLogger) Errorf ¶
func (*DefaultLogger) Errorf(format string, args ...any)
func (*DefaultLogger) Logf ¶
func (*DefaultLogger) Logf(format string, args ...any)
Click to show internal directories.
Click to hide internal directories.