aboutsummaryrefslogtreecommitdiff
path: root/worker.go
diff options
context:
space:
mode:
Diffstat (limited to 'worker.go')
-rw-r--r--worker.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/worker.go b/worker.go
index ac25bf4..700c9a5 100644
--- a/worker.go
+++ b/worker.go
@@ -137,6 +137,10 @@ func (wrk *worker) scan(linkq linkQueue) {
if linkq.kind == atom.Img {
return
}
+ if !strings.HasPrefix(linkq.url, wrk.baseUrl.String()) {
+ // Do not parse the page from external domain.
+ return
+ }
err = wrk.parseHTML(linkq.url, httpResp.Body)
if err != nil {
wrk.errq <- fmt.Errorf(`%s %s: %w`, logp, linkq.url, err)