gocolly / colly

Elegant Scraper and Crawler Framework for Golang
https://go-colly.org/
Apache License 2.0
23.2k stars 1.76k forks source link

Extend basic example with more callbacks #90

Closed rongyi closed 6 years ago

rongyi commented 6 years ago

There are five main callbacks in colly and they are:

  1. OnRequest
  2. OnError
  3. OnResponse
  4. OnHTML
  5. OnScraped

We want to show reader these callbacks at the very beginning, so how about we extend the basic example with all those callbacks?

asciimoo commented 6 years ago

@rongyi There is no intent to extend the basic example with all the supported features. We have a dedicated documentation section which describes all the callbacks: http://go-colly.org/docs/introduction/start/#callbacks. What about adding a comment with this link to the basic example?

rongyi commented 6 years ago

Wow! Colly doc is great, I would not open this issue if I saw the page. I read your code to get all these callbacks, there's no need to duplicate this. It would be better if you add a doc link in README, so reader can just jump to doc. Thanks @asciimoo