Skip to content

Commit

Permalink
Trim white space prefix in line of robots.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
gigarashi committed Feb 20, 2021
1 parent e39a514 commit 9ba0782
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/collector/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ func (c *Collector) parseRobots(url string, reqsMade *syncList) {

for _, line := range lines {
if re.MatchString(line) {
urlstring := re.ReplaceAllString(line, "")
urlstring := strings.TrimLeft(re.ReplaceAllString(line, ""), " ")
if c.conf.IncludeRobots || c.conf.IncludeAll {
_ = c.recordIfInScope(c.au.BrightMagenta("[robots]"), url, url+urlstring, reqsMade)
}
Expand Down

0 comments on commit 9ba0782

Please sign in to comment.