vendor/github.com/go-rod/rod/README.md

51 lines · 2953 bytes

 1# Overview
 2
 3[![Go Reference](https://pkg.go.dev/badge/github.com/go-rod/rod.svg)](https://pkg.go.dev/github.com/go-rod/rod)
 4[![Discord Chat](https://img.shields.io/discord/719933559456006165.svg)][discord room]
 5
 6## [Documentation](https://go-rod.github.io/) | [API reference](https://pkg.go.dev/github.com/go-rod/rod?tab=doc) | [FAQ](https://go-rod.github.io/#/faq/README)
 7
 8Rod is a high-level driver directly based on [DevTools Protocol](https://chromedevtools.github.io/devtools-protocol).
 9It's designed for web automation and scraping for both high-level and low-level use, senior developers can use the low-level packages and functions to easily
10customize or build up their own version of Rod, the high-level functions are just examples to build a default version of Rod.
11
12[中文 API 文档](https://pkg.go.dev/github.com/go-rod/go-rod-chinese)
13
14## Features
15
16- Chained context design, intuitive to timeout or cancel the long-running task
17- Auto-wait elements to be ready
18- Debugging friendly, auto input tracing, remote monitoring headless browser
19- Thread-safe for all operations
20- Automatically find or download [browser](lib/launcher)
21- High-level helpers like WaitStable, WaitRequestIdle, HijackRequests, WaitDownload, etc
22- Two-step WaitEvent design, never miss an event ([how it works](https://github.com/ysmood/goob))
23- Correctly handles nested iframes or shadow DOMs
24- No zombie browser process after the crash ([how it works](https://github.com/ysmood/leakless))
25- [CI](https://github.com/go-rod/rod/actions) enforced 100% test coverage
26
27## Examples
28
29Please check the [examples_test.go](examples_test.go) file first, then check the [examples](lib/examples) folder.
30
31For more detailed examples, please search the unit tests.
32Such as the usage of method `HandleAuth`, you can search all the `*_test.go` files that contain `HandleAuth`,
33for example, use Github online [search in repository](https://github.com/go-rod/rod/search?q=HandleAuth&unscoped_q=HandleAuth).
34You can also search the GitHub [issues](https://github.com/go-rod/rod/issues) or [discussions](https://github.com/go-rod/rod/discussions),
35a lot of usage examples are recorded there.
36
37[Here](lib/examples/compare-chromedp) is a comparison of the examples between rod and Chromedp.
38
39If you have questions, please raise an [issues](https://github.com/go-rod/rod/issues)/[discussions](https://github.com/go-rod/rod/discussions) or join the [chat room][discord room].
40
41## Join us
42
43Your help is more than welcome! Even just open an issue to ask a question may greatly help others.
44
45Please read [How To Ask Questions The Smart Way](http://www.catb.org/~esr/faqs/smart-questions.html) before you ask questions.
46
47We use Github Projects to manage tasks, you can see the priority and progress of the issues [here](https://github.com/go-rod/rod/projects).
48
49If you want to contribute please read the [Contributor Guide](.github/CONTRIBUTING.md).
50
51[discord room]: https://discord.gg/CpevuvY