Robots.txt support implemented

This commit is contained in:
Musab Gültekin
2019-07-06 16:18:03 +03:00
parent 2cab68d2ce
commit 42faa92ece
9 changed files with 154 additions and 64 deletions

View File

@ -74,11 +74,10 @@ func NewClient(maxBodySize int64, charsetDetectDisabled bool, retryTimes int, re
// DoRequest selects appropriate request handler, client or Chrome
func (c *Client) DoRequest(req *Request) (*Response, error) {
if !req.Rendered {
return c.DoRequestClient(req)
} else {
if req.Rendered {
return c.DoRequestChrome(req)
}
return c.DoRequestClient(req)
}
// DoRequestClient is a simple wrapper to read response according to options.