README.md
Lightning Fast and Elegant Scraping Framework for Gophers
Colly provides a clean interface to write any kind of crawler/scraper/spider.
With Colly you can easily extract structured data from websites, which can be used for a wide range of applications, like data mining, data processing or archiving.
import (
"fmt"
"github.com/gocolly/colly/v2"
)
func main() {
c := colly.NewCollector()
// Find and visit all links
c.OnHTML("a[href]", func(e *colly.HTMLElement) {
e.Request.Visit(e.Attr("href"))
})
c.OnRequest(func(r *colly.Request) {
fmt.Println("Visiting", r.URL)
})
c.Visit("http://go-colly.org/")
}
See examples folder for more detailed examples.
go get github.com/gocolly/colly/v2
Bugs or suggestions? Visit the issue tracker or join #colly on freenode
Below is a list of public, open source projects that use Colly:
If you are using Colly in a project please send a pull request to add it to the list.
This project exists thanks to all the people who contribute. [Contribute]. <a href="https://github.com/gocolly/colly/graphs/contributors"></a>
Thank you to all our backers! 🙏 [Become a backer]
<a href="https://opencollective.com/colly#backers" target="_blank"></a>
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]
<a href="https://opencollective.com/colly/sponsor/0/website" target="_blank"></a> <a href="https://opencollective.com/colly/sponsor/1/website" target="_blank"></a> <a href="https://opencollective.com/colly/sponsor/2/website" target="_blank"></a> <a href="https://opencollective.com/colly/sponsor/3/website" target="_blank"></a> <a href="https://opencollective.com/colly/sponsor/4/website" target="_blank"></a> <a href="https://opencollective.com/colly/sponsor/5/website" target="_blank"></a> <a href="https://opencollective.com/colly/sponsor/6/website" target="_blank"></a> <a href="https://opencollective.com/colly/sponsor/7/website" target="_blank"></a> <a href="https://opencollective.com/colly/sponsor/8/website" target="_blank"></a> <a href="https://opencollective.com/colly/sponsor/9/website" target="_blank"></a>